summaryrefslogtreecommitdiff
path: root/reduce.c
diff options
context:
space:
mode:
authorJakob Kaivo <jkk@ung.org>2022-03-28 16:30:25 -0400
committerJakob Kaivo <jkk@ung.org>2022-03-28 16:30:25 -0400
commit600b548442dc0679f89b16ebb6225bdc4465db37 (patch)
tree7340c3853ec96ad4f80a7f54e0a9daf537faa589 /reduce.c
parente7f58c20306c0ff2878e5251951a77fb60a3b9b2 (diff)
rename sto_int() to big_fromll()
Diffstat (limited to 'reduce.c')
-rw-r--r--reduce.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/reduce.c b/reduce.c
index 2be6ec0..6dcdb64 100644
--- a/reduce.c
+++ b/reduce.c
@@ -669,7 +669,7 @@ word e;
/* cannot make static because of ### below */
while((lastarg=reduce(lastarg))!=NIL) /* ### */
lastarg=tl[lastarg],n++;
- simpl(sto_int(n)); }
+ simpl(big_fromll(n)); }
goto DONE;
case DROP:
@@ -1636,7 +1636,7 @@ L3: if(arg1==NIL)lexfail(lastarg);
{ 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])); }
+ setcell(CONS,hd[lastarg],ap2(TAKE,big_fromll(n-1),tl[lastarg])); }
goto DONE;
case READY(FILEMODE): /* FILEMODE string => string'
@@ -1660,9 +1660,9 @@ L3: if(arg1==NIL)lexfail(lastarg);
Non-existent file has conventional ((inode,dev),mtime) of ((0,-1),0)
We assume time_t can be stored in int field, this may not port */
if(!stat(getstring(lastarg,"filestat"),&buf))
- setcell(CONS,cons(sto_int(buf.st_ino),
- sto_int(buf.st_dev) ),
- sto_int(buf.st_mtime) );
+ setcell(CONS,cons(big_fromll(buf.st_ino),
+ big_fromll(buf.st_dev) ),
+ big_fromll(buf.st_mtime) );
else setcell(CONS,cons(stosmallint(0),
stosmallint(-1) ),
stosmallint(0) );
@@ -1714,7 +1714,7 @@ L3: if(arg1==NIL)lexfail(lastarg);
fp=(FILE *)fdopen(fd[0],"r"),
fp_a=(FILE *)fdopen(fd_a[0],"r");
if(pid== -1||!fp||!fp_a)
- setcell(CONS,NIL,cons(piperrmess(pid),sto_int(-1))); else
+ setcell(CONS,NIL,cons(piperrmess(pid),big_fromll(-1))); else
setcell(CONS,ap(READ,fp),cons(ap(READ,fp_a),ap(WAIT,pid)));
}
else { /* child (writer) */
@@ -2245,7 +2245,7 @@ word lexstate(x) /* extracts initial state info from list of chars labelled
by LEX_COUNT - x is evaluated and known to be non-empty */
word x;
{ x = hd[hd[x]]; /* count field of first char */
- return(cons(sto_int(x>>8),stosmallint(x&255)));
+ return(cons(big_fromll(x>>8),stosmallint(x&255)));
}
word piperrmess(pid)