NetBSD/bin/ksh
apb 3f6e3bc032 In foo="echo \"hi\"", the backslashes should be removed by the outer
double quotes, not seen by the inner backquotes.  Previously, ksh(1)
handled this correctly in non-posix mode but incorrectly in posix mode.

The previous comments in src/bin/ksh/lex.c quote parts of some version
of the POSIX specification.  The version of POSIX being quoted is not
identified, but the wording is very similar to that in SUSv3
<http://www.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html>.

It seems clear that the words "having escape characters removed"
mean, in that context, that the backslash before the double quote in
"...`...\"...`..." is removed as part of the handling of the outer
double quotes, so that the backslash is not present when the inner
backquotes are handled.  The new code in this commit follows this
interpretation.  The previous code followed a different interpretation
which is now believed to be incorrect.

Discussed in tech-userlevel.  Closes PR 26493.
2008-10-27 19:52:28 +00:00
..
alloc.c use __RCSID() 2007-12-12 22:55:42 +00:00
c_ksh.c Coverity CID 2993: Fix memory leak. 2006-04-24 20:00:31 +00:00
c_sh.c Coverity CID 1836: Free Source after return from shell. 2006-04-01 23:39:58 +00:00
c_test.c warns=3 2005-06-26 19:09:00 +00:00
c_test.h Cleanup of ksh memory handling from OpenBSD, via Stefan Krueger in PR 24962. 2004-07-07 19:20:09 +00:00
c_ulimit.c Avoid sign extention problems leading to: 2008-09-14 05:00:23 +00:00
conf-end.h
config.h Handle RESCUEDIR 2004-08-19 23:00:22 +00:00
edit.c * Escape '?', '[', ']' like other meta characters. 2007-01-28 20:20:25 +00:00
edit.h
emacs-gen.sh In shell scripts run during the build, add a SED variable, defaulting 2008-10-25 22:18:15 +00:00
emacs.c Coverity CID 3365: Fix inverted logic! 2006-05-13 21:58:51 +00:00
eval.c Applied patch by Arto Huusko from PR bin/24753 to append a slash to "." 2007-01-28 22:30:12 +00:00
exec.c Coverity CID 2994: Don't leak memory in the perm case. 2006-04-24 19:58:20 +00:00
expand.h
expr.c warns=3 2005-06-26 19:09:00 +00:00
history.c warns=3 2005-06-26 19:09:00 +00:00
io.c warns=3 2005-06-26 19:09:00 +00:00
jobs.c Fix typos, reported by Alexey Dobriyan ("Gathered from Linux"), 2006-02-25 00:58:34 +00:00
ksh_dir.h
ksh_limval.h
ksh_stat.h
ksh_time.h
ksh_times.h
ksh_wait.h
ksh.Man In foo="echo \"hi\"", the backslashes should be removed by the outer 2008-10-27 19:52:28 +00:00
lex.c In foo="echo \"hi\"", the backslashes should be removed by the outer 2008-10-27 19:52:28 +00:00
lex.h The following should print \"; from OpenBSD 2005-09-11 22:16:00 +00:00
mail.c Start 'You have mail in' with a capital Y. 2006-01-15 18:16:30 +00:00
main.c PR/36546: Aleksey Cheusov: problems with 8-bit input in /bin/ksh, needs to 2007-06-24 18:00:49 +00:00
Makefile Pass SED=${TOOL_SED:Q} in the environment to scripts run during the build. 2008-10-25 22:23:55 +00:00
misc.c warns=3 2005-06-26 19:09:00 +00:00
mkman In shell scripts invoked during a build, and in crunchgen, use ${AWK} 2008-10-19 22:10:04 +00:00
path.c warns=3 2005-06-26 19:09:00 +00:00
proto.h warns=3 2005-06-26 19:09:00 +00:00
sh.h warns=3 2005-06-26 19:09:00 +00:00
shf.c warns=3 2005-06-26 19:09:00 +00:00
shf.h
sigact.c Add NetBSD RCS Ids. 2003-06-23 11:38:51 +00:00
sigact.h
siglist.in
siglist.sh In shell scripts run during the build, add a SED variable, defaulting 2008-10-25 22:18:15 +00:00
syn.c use c99 initializers 2006-10-16 00:07:32 +00:00
table.c Add NetBSD RCS Ids. 2003-06-23 11:38:51 +00:00
table.h
trap.c use c99 initializers 2006-10-16 00:07:32 +00:00
tree.c warns=3 2005-06-26 19:09:00 +00:00
tree.h Cleanup of ksh memory handling from OpenBSD, via Stefan Krueger in PR 24962. 2004-07-07 19:20:09 +00:00
tty.c Add NetBSD RCS Ids. 2003-06-23 11:38:51 +00:00
tty.h
var.c Don't leak memory if RJUST|LJUST is specified. This might fix a whole bunch 2006-03-29 15:51:00 +00:00
version.c warns=3 2005-06-26 19:09:00 +00:00
vi.c warns=3 2005-06-26 19:09:00 +00:00