PR/49872:Yorick Hardy: sed functions 'i' and 'a' discard leading white space
FIxed as suggested, behavior now matches gnu-sed.
This commit is contained in:
parent
b1bf748a07
commit
7a955c4ce5
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: compile.c,v 1.46 2015/03/12 12:40:41 christos Exp $ */
|
||||
/* $NetBSD: compile.c,v 1.47 2016/04/05 00:13:03 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1992 Diomidis Spinellis.
|
||||
@ -38,7 +38,7 @@
|
||||
#endif
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__RCSID("$NetBSD: compile.c,v 1.46 2015/03/12 12:40:41 christos Exp $");
|
||||
__RCSID("$NetBSD: compile.c,v 1.47 2016/04/05 00:13:03 christos Exp $");
|
||||
#ifdef __FBSDID
|
||||
__FBSDID("$FreeBSD: head/usr.bin/sed/compile.c 259132 2013-12-09 18:57:20Z eadler $");
|
||||
#endif
|
||||
@ -747,7 +747,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