Author: pfg Date: Wed Apr 6 00:55:39 2016 New Revision: 297602 URL: https://svnweb.freebsd.org/changeset/base/297602
Log: 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 Modified: head/sys/sys/param.h head/usr.bin/sed/compile.c Modified: head/sys/sys/param.h ============================================================================== --- head/sys/sys/param.h Wed Apr 6 00:52:30 2016 (r297601) +++ head/sys/sys/param.h Wed Apr 6 00:55:39 2016 (r297602) @@ -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, Modified: head/usr.bin/sed/compile.c ============================================================================== --- head/usr.bin/sed/compile.c Wed Apr 6 00:52:30 2016 (r297601) +++ head/usr.bin/sed/compile.c Wed Apr 6 00:55:39 2016 (r297602) @@ -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; _______________________________________________ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"