mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-01 21:51:40 +02:00
zsh-workers/10143
This commit is contained in:
parent
53f0102525
commit
05eb5d93b1
2 changed files with 11 additions and 3 deletions
|
@ -568,6 +568,9 @@ setupvals(void)
|
|||
|
||||
init_eprog();
|
||||
|
||||
zero_mnumber.type = MN_INTEGER;
|
||||
zero_mnumber.u.l = 0;
|
||||
|
||||
getkeyptr = NULL;
|
||||
|
||||
lineno = 1;
|
||||
|
|
11
Src/math.c
11
Src/math.c
|
@ -37,6 +37,11 @@
|
|||
/**/
|
||||
int noeval;
|
||||
|
||||
/* integer zero */
|
||||
|
||||
/**/
|
||||
mnumber zero_mnumber;
|
||||
|
||||
/* last input base we used */
|
||||
|
||||
/**/
|
||||
|
@ -1018,13 +1023,13 @@ mathparse(int pc)
|
|||
push(yyval, NULL);
|
||||
break;
|
||||
case ID:
|
||||
push(getnparam(yylval), yylval);
|
||||
push((noeval ? zero_mnumber : getnparam(yylval)), yylval);
|
||||
break;
|
||||
case CID:
|
||||
push(getcvar(yylval), yylval);
|
||||
push((noeval ? zero_mnumber : getcvar(yylval)), yylval);
|
||||
break;
|
||||
case FUNC:
|
||||
push(callmathfunc(yylval), yylval);
|
||||
push((noeval ? zero_mnumber : callmathfunc(yylval)), yylval);
|
||||
break;
|
||||
case M_INPAR:
|
||||
mathparse(TOPPREC);
|
||||
|
|
Loading…
Reference in a new issue