summaryrefslogtreecommitdiff
path: root/reduce.c
diff options
context:
space:
mode:
authorJakob Kaivo <jkk@ung.org>2022-03-28 16:29:19 -0400
committerJakob Kaivo <jkk@ung.org>2022-03-28 16:29:19 -0400
commite7f58c20306c0ff2878e5251951a77fb60a3b9b2 (patch)
tree6a4c0435e694bf8939a95e2fcafd817f13cc4132 /reduce.c
parenta7a6a2229eaef80e55b6acaeb1cef4770ca91af2 (diff)
rename get_int() big_toll()
Diffstat (limited to 'reduce.c')
-rw-r--r--reduce.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/reduce.c b/reduce.c
index 6f41d50..2be6ec0 100644
--- a/reduce.c
+++ b/reduce.c
@@ -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();