From 600b548442dc0679f89b16ebb6225bdc4465db37 Mon Sep 17 00:00:00 2001 From: Jakob Kaivo Date: Mon, 28 Mar 2022 16:30:25 -0400 Subject: rename sto_int() to big_fromll() --- reduce.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'reduce.c') 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) -- cgit v1.2.1