From f1495f5099073e2e4896c13e28e8d936b4979fd3 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Tue, 14 Sep 2010 14:46:26 +0000 Subject: 28259: Finally fix some ancient problems with here-documents --- Src/zsh.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'Src/zsh.h') diff --git a/Src/zsh.h b/Src/zsh.h index a825a6bab..7849b6986 100644 --- a/Src/zsh.h +++ b/Src/zsh.h @@ -597,6 +597,8 @@ struct redir { int fd1, fd2; char *name; char *varid; + char *here_terminator; + char *munged_here_terminator; }; /* The number of fds space is allocated for * @@ -787,7 +789,9 @@ struct eccstr { #define WC_REDIR_FROM_HEREDOC(C) ((int)(wc_data(C) & REDIR_FROM_HEREDOC_MASK)) #define WCB_REDIR(T) wc_bld(WC_REDIR, (T)) /* Size of redir is 4 words if REDIR_VARID_MASK is set, else 3 */ -#define WC_REDIR_WORDS(C) (WC_REDIR_VARID(C) ? 4 : 3) +#define WC_REDIR_WORDS(C) \ + ((WC_REDIR_VARID(C) ? 4 : 3) + \ + (WC_REDIR_FROM_HEREDOC(C) ? 2 : 0)) #define WC_ASSIGN_TYPE(C) (wc_data(C) & ((wordcode) 1)) #define WC_ASSIGN_TYPE2(C) ((wc_data(C) & ((wordcode) 2)) >> 1) -- cgit 1.4.1