1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-09-02 10:01:11 +02:00

zsh-workers/10143

This commit is contained in:
Tanaka Akira 2000-03-15 09:36:27 +00:00
parent 53f0102525
commit 05eb5d93b1
2 changed files with 11 additions and 3 deletions

View file

@ -568,6 +568,9 @@ setupvals(void)
init_eprog(); init_eprog();
zero_mnumber.type = MN_INTEGER;
zero_mnumber.u.l = 0;
getkeyptr = NULL; getkeyptr = NULL;
lineno = 1; lineno = 1;

View file

@ -37,6 +37,11 @@
/**/ /**/
int noeval; int noeval;
/* integer zero */
/**/
mnumber zero_mnumber;
/* last input base we used */ /* last input base we used */
/**/ /**/
@ -1018,13 +1023,13 @@ mathparse(int pc)
push(yyval, NULL); push(yyval, NULL);
break; break;
case ID: case ID:
push(getnparam(yylval), yylval); push((noeval ? zero_mnumber : getnparam(yylval)), yylval);
break; break;
case CID: case CID:
push(getcvar(yylval), yylval); push((noeval ? zero_mnumber : getcvar(yylval)), yylval);
break; break;
case FUNC: case FUNC:
push(callmathfunc(yylval), yylval); push((noeval ? zero_mnumber : callmathfunc(yylval)), yylval);
break; break;
case M_INPAR: case M_INPAR:
mathparse(TOPPREC); mathparse(TOPPREC);