diff options
-rw-r--r-- | big.c | 2 | ||||
-rw-r--r-- | big.h | 2 | ||||
-rw-r--r-- | reduce.c | 8 | ||||
-rw-r--r-- | rules.y | 2 | ||||
-rw-r--r-- | y.tab.c | 2 |
5 files changed, 8 insertions, 8 deletions
@@ -395,7 +395,7 @@ word sto_int(long long i) } /* mira bigint to C long long */ -long long get_int(word x) +long long big_toll(word x) { long long n = digit0(x); word sign = big_is_negative(x); @@ -22,7 +22,7 @@ #define getsmallint(x) (hd[x]&SIGNBIT?-digit0(x):digit(x)) #define stosmallint(x) make(INT,(x)<0?SIGNBIT|(-(x)):(x),0) -long long get_int(word); +long long big_toll(word); word sto_int(long long); double bigtodbl(word); double biglog(word); @@ -677,7 +677,7 @@ word e; upleft; arg1=tl[hd[e]]=reduce(tl[hd[e]]); /* ### */ if(tag[arg1]!=INT)int_error("drop"); - { long long n=get_int(arg1); + { long long n=big_toll(arg1); while(n-- >0) if((lastarg=reduce(lastarg))==NIL) /* ### */ { simpl(NIL); goto DONE; } @@ -693,7 +693,7 @@ word e; if(lastarg==NIL)subs_error(); { long long indx; if(tag[arg1]==ATOM)indx=arg1;/* small indexes represented directly */ - else if(tag[arg1]==INT)indx=get_int(arg1); + else if(tag[arg1]==INT)indx=big_toll(arg1); else int_error("!"); /* problem, indx may be followed by gc - cannot make static, because of ### below */ @@ -1633,7 +1633,7 @@ L3: if(arg1==NIL)lexfail(lastarg); GETARG(arg1); upleft; if(tag[arg1]!=INT)int_error("take"); - { long long n=get_int(arg1); + { long long n=big_toll(arg1); if(n<=0||(lastarg=reduce(lastarg))==NIL) /* ### */ { simpl(NIL); goto DONE; } setcell(CONS,hd[lastarg],ap2(TAKE,sto_int(n-1),tl[lastarg])); } @@ -1868,7 +1868,7 @@ L3: if(arg1==NIL)lexfail(lastarg); case READY(DECODE): /* int to char type conversion */ UPLEFT; if(tag[lastarg]==DOUBLE)int_error("decode"); - long long val=get_int(lastarg); + long long val=big_toll(lastarg); if(val<0||val>UMAX) { fprintf(stderr,"\nCHARACTER OUT-OF-RANGE decode(%lld)\n",val); outstats(); @@ -845,7 +845,7 @@ lpostfix: $$ = i; }| LBEGIN CONST - = { if(!isnat($2)||get_int($2)!=0) + = { if(!isnat($2)||big_toll($2)!=0) syntax("%begin not followed by IDENTIFIER or 0\n"); $$ = 0; }; @@ -2604,7 +2604,7 @@ case 160: break; case 161: #line 848 "rules.y" - { if(!isnat(yystack.l_mark[0])||get_int(yystack.l_mark[0])!=0) + { if(!isnat(yystack.l_mark[0])||big_toll(yystack.l_mark[0])!=0) syntax("%begin not followed by IDENTIFIER or 0\n"); yyval = 0; } break; |