summaryrefslogtreecommitdiffstats
path: root/bin/sh/memalloc.c
diff options
context:
space:
mode:
authortegge <tegge@FreeBSD.org>1998-09-06 21:13:09 +0000
committertegge <tegge@FreeBSD.org>1998-09-06 21:13:09 +0000
commitac59a0c5cd4a2de80842186c8dd22ff48fe29da8 (patch)
treedda84e744f853179b31c4cd9bfa1676a63fa9c1e /bin/sh/memalloc.c
parent59e6a57bc195e6145db20a1292466fa6df067e24 (diff)
downloadFreeBSD-src-ac59a0c5cd4a2de80842186c8dd22ff48fe29da8.zip
FreeBSD-src-ac59a0c5cd4a2de80842186c8dd22ff48fe29da8.tar.gz
Better handling of word splitting. Don't record the same region
multiple times when performing nested variable expansion, and preserve some quoting information in order to avoid removing apparently empty expansion result.
Diffstat (limited to 'bin/sh/memalloc.c')
-rw-r--r--bin/sh/memalloc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/sh/memalloc.c b/bin/sh/memalloc.c
index 3f39825..64557dc 100644
--- a/bin/sh/memalloc.c
+++ b/bin/sh/memalloc.c
@@ -39,7 +39,7 @@
static char sccsid[] = "@(#)memalloc.c 8.3 (Berkeley) 5/4/95";
#endif
static const char rcsid[] =
- "$Id$";
+ "$Id: memalloc.c,v 1.9 1998/05/18 06:43:57 charnier Exp $";
#endif /* not lint */
#include "shell.h"
@@ -268,7 +268,7 @@ char *
growstackstr() {
int len = stackblocksize();
if (herefd >= 0 && len >= 1024) {
- xwrite(herefd, stackblock(), len);
+ xwrite(herefd, stackblock(), rmquotes(stackblock(), len));
sstrnleft = len - 1;
return stackblock();
}
OpenPOWER on IntegriCloud