From 948f015df0fee27f4e2c73b442a75c9434702550 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Fri, 14 Mar 2008 11:40:57 +0000 Subject: 24711: fix re-presentation of here-documents munged internally to here-strings --- Src/parse.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'Src/parse.c') diff --git a/Src/parse.c b/Src/parse.c index af3cba9d3..54543a642 100644 --- a/Src/parse.c +++ b/Src/parse.c @@ -1861,7 +1861,7 @@ par_redir(int *rp, char *idstring) void setheredoc(int pc, int type, char *str) { - ecbuf[pc] = WCB_REDIR(type); + ecbuf[pc] = WCB_REDIR(type | REDIR_FROM_HEREDOC_MASK); ecbuf[pc + 2] = ecstrcode(str); } @@ -2409,6 +2409,10 @@ ecgetredirs(Estate s) r->type = WC_REDIR_TYPE(code); r->fd1 = *s->pc++; r->name = ecgetstr(s, EC_DUP, NULL); + if (WC_REDIR_FROM_HEREDOC(code)) + r->flags = REDIRF_FROM_HEREDOC; + else + r->flags = 0; if (WC_REDIR_VARID(code)) r->varid = ecgetstr(s, EC_DUP, NULL); else -- cgit v1.2.3