freebsd-skq/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 Consistently use FBSDID 2002-06-30 05:15:05 +00:00
alias.h o __P has been reoved 2002-02-02 06:50:57 +00:00
arith_lex.l Quiet warnings about copyright[]. 2003-05-01 16:58:57 +00:00
arith.h o __P has been reoved 2002-02-02 06:50:57 +00:00
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 Add a -P/-o physical option which behaves similarly to bash/ksh's options 2002-07-25 10:57:39 +00:00
cd.h o __P has been reoved 2002-02-02 06:50:57 +00:00
error.c Convert the remaining callers of errmsg() to use strerror(), and remove 2002-09-29 11:37:39 +00:00
error.h Convert the remaining callers of errmsg() to use strerror(), and remove 2002-09-29 11:37:39 +00:00
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 Implement the P1003.2 `command' builtin command, which is used to suppress 2002-07-21 06:49:14 +00:00
exec.c Restore "not found" error message when searching for (or executing) 2002-10-01 11:48:18 +00:00
exec.h o __P has been reoved 2002-02-02 06:50:57 +00:00
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 Delete worthless comments. 2002-10-30 06:34:52 +00:00
init.h o __P has been reoved 2002-02-02 06:50:57 +00:00
input.c Avoid calling el_resize() from a signal handler, even though libedit 2002-07-24 02:06:07 +00:00
input.h o __P has been reoved 2002-02-02 06:50:57 +00:00
jobs.c Flush the output buffers before forking a child process to avoid 2003-03-17 11:28:56 +00:00
jobs.h Avoid using ints or shorts to store process id's, use pid_t instead. 2002-07-18 10:22:42 +00:00
mail.c Consistently use FBSDID 2002-06-30 05:15:05 +00:00
mail.h o __P has been reoved 2002-02-02 06:50:57 +00:00
main.c Remove some kind of profiling support that required the 4.2BSD monitor() 2002-10-01 01:30:33 +00:00
main.h o __P has been reoved 2002-02-02 06:50:57 +00:00
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 o __P has been reoved 2002-02-02 06:50:57 +00:00
miscbltin.c - Don't use quad_t when we really mean rlim_t. 2002-10-01 11:44:38 +00:00
mkbuiltins Avoid accidentally making "-h" a synonym for "fc". 2002-10-18 10:33:32 +00:00
mkinit.c Consistently use FBSDID 2002-06-30 05:15:05 +00:00
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 Minor const cleanup. 2002-06-20 05:20:50 +00:00
myhistedit.h Add a `bind' builtin command, which is simply a wrapper around libedit's 2002-07-23 11:50:53 +00:00
mystring.c Consistently use FBSDID 2002-06-30 05:15:05 +00:00
mystring.h o __P has been reoved 2002-02-02 06:50:57 +00:00
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 Implement the -C (-o noclobber) option, which prevents existing regular 2002-05-19 06:03:05 +00:00
options.c Consistently use FBSDID 2002-06-30 05:15:05 +00:00
options.h Add a -P/-o physical option which behaves similarly to bash/ksh's options 2002-07-25 10:57:39 +00:00
output.c Back out experimental changes to fmtstr() that I didn't mean to include 2002-10-01 13:41:13 +00:00
output.h Missing prototypes from previous commit. 2002-06-04 13:13:54 +00:00
parser.c Disallow empty condition parts of "if", "while" and "until" compound 2002-10-06 06:35:51 +00:00
parser.h o __P has been reoved 2002-02-02 06:50:57 +00:00
redir.c Remove dead code which supported systems without O_APPEND, O_CREAT or SIGTSTP. 2002-09-29 12:38:25 +00:00
redir.h o __P has been reoved 2002-02-02 06:50:57 +00:00
sh.1 mdoc(7) police: A better version of the same. 2003-05-16 21:19:32 +00:00
shell.h Remove broken and incomplete support for old releases of System V, 2002-07-19 08:09:04 +00:00
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 o __P has been reoved 2002-02-02 06:50:57 +00:00
TOUR
trap.c Avoid calling el_resize() from a signal handler, even though libedit 2002-07-24 02:06:07 +00:00
trap.h Avoid calling el_resize() from a signal handler, even though libedit 2002-07-24 02:06:07 +00:00
var.c Centralize _PATH_* definitions. 2003-05-05 22:49:23 +00:00
var.h Remove bits and pieces of support for atty, which was made obsolete by 2002-10-01 00:54:14 +00:00