diff options
author | Peter Stephenson <p.w.stephenson@ntlworld.com> | 2015-01-08 21:39:26 +0000 |
---|---|---|
committer | Peter Stephenson <p.w.stephenson@ntlworld.com> | 2015-01-09 21:33:39 +0000 |
commit | cfd91eac0732da8ece012ca4ab051d928a85c9dd (patch) | |
tree | 68ef32e118a060de0c7685c848e0267e64cf5137 /Src/zsh.h | |
parent | 6291d38848680b84252799d9e33110bca842efe8 (diff) | |
download | zsh-cfd91eac0732da8ece012ca4ab051d928a85c9dd.tar.gz zsh-cfd91eac0732da8ece012ca4ab051d928a85c9dd.tar.xz zsh-cfd91eac0732da8ece012ca4ab051d928a85c9dd.zip |
Rearrange context saving.
Variables are now associated with the module that declares them, being initialised and saved/restored there. However, as many variables are used for communication between modules, many of them are set in multiple places, so the assignment is ambiguous.
Diffstat (limited to 'Src/zsh.h')
-rw-r--r-- | Src/zsh.h | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/Src/zsh.h b/Src/zsh.h index 475b7824f..8fb4f977a 100644 --- a/Src/zsh.h +++ b/Src/zsh.h @@ -2691,6 +2691,71 @@ struct sortelt { typedef struct sortelt *SortElt; +/*********************************************************/ +/* Structures to save and restore for individual modules */ +/*********************************************************/ + +/* History */ +struct hist_stack { + int histactive; + int histdone; + int stophist; + int hlinesz; + char *hline; + char *hptr; + short *chwords; + int chwordlen; + int chwordpos; + int hwgetword; + int (*hgetc) _((void)); + void (*hungetc) _((int)); + void (*hwaddc) _((int)); + void (*hwbegin) _((int)); + void (*hwend) _((void)); + void (*addtoline) _((int)); + unsigned char *cstack; + int csp; +}; + +/* Lexical analyser */ +struct lex_stack { + int dbparens; + int isfirstln; + int isfirstch; + int lexflags; + enum lextok tok; + char *tokstr; + char *zshlextext; + char *bptr; + int bsiz; + int len; + int lex_add_raw; + char *tokstr_raw; + char *bptr_raw; + int bsiz_raw; + int len_raw; + int lexstop; + zlong toklineno; +}; + +/* Parser */ +struct parse_stack { + struct heredocs *hdocs; + + int incmdpos; + int aliasspaceflag; + int incond; + int inredir; + int incasepat; + int isnewlin; + int infor; + + int eclen, ecused, ecnpats; + Wordcode ecbuf; + Eccstr ecstrs; + int ecsoffs, ecssub, ecnfunc; +}; + /************************/ /* Flags to casemodifiy */ /************************/ |