Fix sed functions 'i' and 'a' from discarding leading white space.
This appears to be implementation dependent but convenient and makes our sed behave more like GNU sed. Given that it is not the historic behavior, bump FreeBSD_version should userland/ports somehow depend on it. Obtained from: NetBSD (bin/49872) Reviewed by: bdrewery PR: 208554 Merge after: NEVER
This commit is contained in:
parent
c383e5c8ac
commit
678fec509d
@ -58,7 +58,7 @@
|
||||
* in the range 5 to 9.
|
||||
*/
|
||||
#undef __FreeBSD_version
|
||||
#define __FreeBSD_version 1100104 /* Master, propagated to newvers */
|
||||
#define __FreeBSD_version 1100105 /* Master, propagated to newvers */
|
||||
|
||||
/*
|
||||
* __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD,
|
||||
|
@ -730,7 +730,7 @@ compile_tr(char *p, struct s_tr **py)
|
||||
}
|
||||
|
||||
/*
|
||||
* Compile the text following an a or i command.
|
||||
* Compile the text following an a, c, or i command.
|
||||
*/
|
||||
static char *
|
||||
compile_text(void)
|
||||
@ -746,7 +746,6 @@ compile_text(void)
|
||||
while (cu_fgets(lbuf, sizeof(lbuf), NULL)) {
|
||||
op = s = text + size;
|
||||
p = lbuf;
|
||||
EATSPACE();
|
||||
for (esc_nl = 0; *p != '\0'; p++) {
|
||||
if (*p == '\\' && p[1] != '\0' && *++p == '\n')
|
||||
esc_nl = 1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user