freebsd-dev/usr.bin/sed
Pedro F. Giffuni d74b9e1311 Simplify redundant malloc'ing in sed -e.
When encountering an -e argument, sed currently mallocs a string to COPY
the optarg -- with '\n' appended. The appendage does not seem necessary --
indeed, the same call to add_compunit processing the sole command (given
without -e) passes the *argv verbatim: without making a copy, and without
appending newline.

This matches what is done in other BSDs.

Submitted by:	Mikhail T.
PR:		195929
MFC after:	2 weeks
2016-05-09 18:53:46 +00:00
..
tests Merge ^/user/ngie/release-pkg-fix-tests to unbreak how test files are installed 2016-05-04 23:20:53 +00:00
compile.c kernel: use our nitems() macro when it is available through param.h. 2016-04-21 21:30:51 +00:00
defs.h sed(1): Don't force a newline on last line, if input stream doesn't have one 2014-08-08 17:29:01 +00:00
extern.h
main.c Simplify redundant malloc'ing in sed -e. 2016-05-09 18:53:46 +00:00
Makefile Partial revert of r276832: 2015-01-08 17:23:59 +00:00
Makefile.depend Add META_MODE support. 2015-06-13 19:20:56 +00:00
misc.c
POSIX
process.c sed: rewrite the main loop. 2016-05-07 01:44:22 +00:00
sed.1 use .Mt to mark up email addresses consistently (part3) 2014-06-23 08:23:05 +00:00