freebsd-dev/bin/sh
Bill Fenner 99907703d9 Instead of eating trailing newlines after inserting them into the
output buffer, don't insert them at all.  This prevents a buffer
*underrun* when the substitution consists completely of newlines
(e.g. `echo`) and the byte before the source buffer to which p
points is a '\n', in which case more characters would be removed
from the output buffer than were inserted.

This fixes certain port builds on sparc64.

Approved by:	re (scottl)
Reviewed by:	des, tjr
2003-05-31 06:27:57 +00:00
..
bltin Add FBSDID. 2003-02-05 13:23:46 +00:00
funcs
alias.c
alias.h
arith_lex.l Quiet warnings about copyright[]. 2003-05-01 16:58:57 +00:00
arith.h
arith.y Quiet warnings about copyright[]. 2003-05-01 16:58:57 +00:00
builtins.def Add the "wordexp" shell built-in command which will be used to implement 2002-12-26 14:28:54 +00:00
cd.c
cd.h
error.c
error.h
eval.c Make this compile with DEBUG defined now that WARNS=0 has been removed 2003-01-21 10:06:04 +00:00
eval.h
exec.c
exec.h
expand.c Instead of eating trailing newlines after inserting them into the 2003-05-31 06:27:57 +00:00
expand.h Add the "wordexp" shell built-in command which will be used to implement 2002-12-26 14:28:54 +00:00
histedit.c
init.h
input.c
input.h
jobs.c Flush the output buffers before forking a child process to avoid 2003-03-17 11:28:56 +00:00
jobs.h
mail.c
mail.h
main.c
main.h
Makefile The is_name and is_in_name macros are FUBAR'ed. 2003-05-02 06:24:51 +00:00
memalloc.c Third attempt at removing machdep.h and using ALIGN from <sys/param.h>. 2003-02-24 08:07:05 +00:00
memalloc.h
miscbltin.c
mkbuiltins
mkinit.c
mknodes.c Quiet warnings about copyright[]. 2003-05-01 16:58:57 +00:00
mksyntax.c Quiet warnings about copyright[]. 2003-05-01 16:58:57 +00:00
mktokens
myhistedit.h
mystring.c
mystring.h
nodes.c.pat Third attempt at removing machdep.h and using ALIGN from <sys/param.h>. 2003-02-24 08:07:05 +00:00
nodetypes
options.c
options.h
output.c
output.h
parser.c
parser.h
redir.c
redir.h
sh.1 mdoc(7) police: A better version of the same. 2003-05-16 21:19:32 +00:00
shell.h
show.c Make this compile with DEBUG defined now that WARNS=0 has been removed 2003-01-21 10:06:04 +00:00
show.h
TOUR
trap.c
trap.h
var.c Centralize _PATH_* definitions. 2003-05-05 22:49:23 +00:00
var.h