1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-12-03 16:51:37 +01:00

45583/0007: WC_FUNCDEF: Add a placeholder element.

This commit is contained in:
Daniel Shahaf 2020-03-18 19:57:49 +00:00
parent fd1ef7d770
commit a3c6c5513d
5 changed files with 13 additions and 4 deletions

View file

@ -173,6 +173,7 @@ struct heredocs *hdocs;
* - followed by offset to first string
* - followed by length of string table
* - followed by number of patterns for body
* - followed by a placeholder
* - followed by codes for body
* - followed by strings for body
* - if number of names is 0, followed by:
@ -1691,6 +1692,7 @@ par_funcdef(int *cmplx)
ecadd(0); /* p + num + 2 */
ecadd(0); /* p + num + 3 */
ecadd(0); /* p + num + 4 */
ecadd(0); /* p + num + 5 */
nocorrect = 0;
incmdpos = 1;
@ -1730,6 +1732,7 @@ par_funcdef(int *cmplx)
ecbuf[p + num + 2] = so - oecssub;
ecbuf[p + num + 3] = ecsoffs - so; /* "length of string table" */
ecbuf[p + num + 4] = ecnpats; /* "number of patterns for body" */
ecbuf[p + num + 5] = 0;
ecbuf[p + 1] = num; /* "number of names" */
ecnpats = onp;
@ -2053,6 +2056,7 @@ par_simple(int *cmplx, int nr)
ecadd(0);
ecadd(0);
ecadd(0);
ecadd(0);
ecnfunc++;
ecssub = so = ecsoffs;
@ -2108,6 +2112,7 @@ par_simple(int *cmplx, int nr)
ecbuf[p + argc + 2] = so - oecssub;
ecbuf[p + argc + 3] = ecsoffs - so;
ecbuf[p + argc + 4] = ecnpats;
ecbuf[p + argc + 5] = 0;
ecnpats = onp;
ecssub = oecssub;