Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/sed PR/49872:Yorick Hardy: sed functions 'i' and 'a'...



details:   https://anonhg.NetBSD.org/src/rev/6185bc55ed5f
branches:  trunk
changeset: 344572:6185bc55ed5f
user:      christos <christos%NetBSD.org@localhost>
date:      Tue Apr 05 00:13:03 2016 +0000

description:
PR/49872:Yorick Hardy: sed functions 'i' and 'a' discard leading white space
FIxed as suggested, behavior now matches gnu-sed.

diffstat:

 usr.bin/sed/compile.c |  5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diffs (26 lines):

diff -r dce75b0f525d -r 6185bc55ed5f usr.bin/sed/compile.c
--- a/usr.bin/sed/compile.c     Mon Apr 04 23:59:41 2016 +0000
+++ b/usr.bin/sed/compile.c     Tue Apr 05 00:13:03 2016 +0000
@@ -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 @@
        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;



Home | Main Index | Thread Index | Old Index