Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-3-0]: src/bin/sh Pull up following revision(s) (requested by dsl ...
details: https://anonhg.NetBSD.org/src/rev/df388739816e
branches: netbsd-3-0
changeset: 579241:df388739816e
user: tron <tron%NetBSD.org@localhost>
date: Mon Jun 12 12:19:27 2006 +0000
description:
Pull up following revision(s) (requested by dsl in ticket #1336):
bin/sh/expand.c: revision 1.74
When expanding "$@" add a \0 byte after the last argument (as well as all
the earlier ones) so that a separator is added before it when it is empty.
This wasn't needed before a recent change that chenged the behaviour of
trailing whitespace IFS characters.
Fixed PR/33472
diffstat:
bin/sh/expand.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diffs (38 lines):
diff -r e5bef58b7c5d -r df388739816e bin/sh/expand.c
--- a/bin/sh/expand.c Thu Jun 08 22:23:09 2006 +0000
+++ b/bin/sh/expand.c Mon Jun 12 12:19:27 2006 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: expand.c,v 1.68.2.2 2005/04/07 11:37:39 tron Exp $ */
+/* $NetBSD: expand.c,v 1.68.2.2.2.1 2006/06/12 12:19:27 tron Exp $ */
/*-
* Copyright (c) 1991, 1993
@@ -37,7 +37,7 @@
#if 0
static char sccsid[] = "@(#)expand.c 8.5 (Berkeley) 5/15/95";
#else
-__RCSID("$NetBSD: expand.c,v 1.68.2.2 2005/04/07 11:37:39 tron Exp $");
+__RCSID("$NetBSD: expand.c,v 1.68.2.2.2.1 2006/06/12 12:19:27 tron Exp $");
#endif
#endif /* not lint */
@@ -874,8 +874,8 @@
if (flag & EXP_FULL && quoted) {
for (ap = shellparam.p ; (p = *ap++) != NULL ; ) {
STRTODEST(p);
- if (*ap)
- STPUTC('\0', expdest);
+ /* Nul forces a parameter split inside "" */
+ STPUTC('\0', expdest);
}
break;
}
@@ -1036,7 +1036,7 @@
* Some recent clarification of the Posix spec say that it
* should only generate one....
*/
- if (*start /* || (!ifsspc && start > string) */) {
+ if (*start) {
sp = (struct strlist *)stalloc(sizeof *sp);
sp->text = start;
*arglist->lastp = sp;
Home |
Main Index |
Thread Index |
Old Index