diff options
author | Axel Beckert <abe@deuxchevaux.org> | 2014-08-11 17:39:42 +0200 |
---|---|---|
committer | Axel Beckert <abe@deuxchevaux.org> | 2014-08-11 17:39:42 +0200 |
commit | 382c26acfc62a56744ab9eb603efc56130764fd3 (patch) | |
tree | 1b7cb9d3e372481007fc4546e7d06ce5bb1bc104 /Src/lex.c | |
parent | 73508e345b4925f33b7f652aba9bd313169e5ac2 (diff) | |
parent | f8ae47f29b766dc0330b19d7fdb35859d6aab930 (diff) | |
download | zsh-382c26acfc62a56744ab9eb603efc56130764fd3.tar.gz zsh-382c26acfc62a56744ab9eb603efc56130764fd3.zip |
New upstream release candidate: Merge branch 'upstream' into debian
Diffstat (limited to 'Src/lex.c')
-rw-r--r-- | Src/lex.c | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -30,6 +30,8 @@ #include "zsh.mdh" #include "lex.pro" +#define LEX_HEAP_SIZE (32) + /* tokens */ /**/ @@ -721,7 +723,7 @@ gettok(void) /* word includes the last character read and possibly \ before ! */ if (dbparens) { len = 0; - bptr = tokstr = (char *) hcalloc(bsiz = 32); + bptr = tokstr = (char *) hcalloc(bsiz = LEX_HEAP_SIZE); hungetc(c); cmdpush(CS_MATH); c = dquote_parse(infor ? ';' : ')', 0); @@ -775,7 +777,7 @@ gettok(void) if (lexflags & LEXFLAGS_COMMENTS_KEEP) { len = 0; - bptr = tokstr = (char *)hcalloc(bsiz = 32); + bptr = tokstr = (char *)hcalloc(bsiz = LEX_HEAP_SIZE); add(c); } hwend(); @@ -877,7 +879,7 @@ gettok(void) } if (incmdpos || (isset(SHGLOB) && !isset(KSHGLOB))) { len = 0; - bptr = tokstr = (char *) hcalloc(bsiz = 32); + bptr = tokstr = (char *) hcalloc(bsiz = LEX_HEAP_SIZE); switch (cmd_or_math(CS_MATH)) { case 1: return DINPAR; @@ -1027,7 +1029,7 @@ gettokstr(int c, int sub) peek = STRING; if (!sub) { len = 0; - bptr = tokstr = (char *) hcalloc(bsiz = 32); + bptr = tokstr = (char *) hcalloc(bsiz = LEX_HEAP_SIZE); } for (;;) { int act; |