diff options
author | Peter Stephenson <pws@users.sourceforge.net> | 2010-09-14 14:46:26 +0000 |
---|---|---|
committer | Peter Stephenson <pws@users.sourceforge.net> | 2010-09-14 14:46:26 +0000 |
commit | f1495f5099073e2e4896c13e28e8d936b4979fd3 (patch) | |
tree | d793cce372b9e1c4435db4174867c8a4cb37cb0c /Src/zsh.h | |
parent | 3b6b4982b9a61cb84888e8eba7200637fc3b3c12 (diff) | |
download | zsh-f1495f5099073e2e4896c13e28e8d936b4979fd3.tar.gz zsh-f1495f5099073e2e4896c13e28e8d936b4979fd3.tar.xz zsh-f1495f5099073e2e4896c13e28e8d936b4979fd3.zip |
28259: Finally fix some ancient problems with here-documents
Diffstat (limited to 'Src/zsh.h')
-rw-r--r-- | Src/zsh.h | 6 |
1 files changed, 5 insertions, 1 deletions
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) |