diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2017-02-20 00:05:29 -0800 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2017-02-20 00:05:29 -0800 |
commit | 302e3218b7d487539ec305bf23881a6ee7d5be99 (patch) | |
tree | bf1adafe552a17b3b78522048bb7c24787696dd3 /subr.c | |
parent | c7d035ae1a729232579a0fe41ed5affa131d3623 (diff) | |
download | scm-302e3218b7d487539ec305bf23881a6ee7d5be99.tar.gz scm-302e3218b7d487539ec305bf23881a6ee7d5be99.zip |
Import Upstream version 5e1upstream/5e1
Diffstat (limited to 'subr.c')
-rw-r--r-- | subr.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -1164,7 +1164,7 @@ SCM scm_logbitp(index, j1) #else ASRTER(INUMP(j1), j1, ARG2, s_logbitp); #endif - if (index >= LONG_BIT) return j1 < 0 ? BOOL_T : BOOL_F; + if (INUM(index) >= LONG_BIT) return j1 < 0 ? BOOL_T : BOOL_F; return ((1L << INUM(index)) & INUM(j1)) ? BOOL_T : BOOL_F; } @@ -1297,19 +1297,19 @@ SCM scm_bitif(mask, n0, n1) return MAKINUM((INUM(mask) & INUM(n0)) | (~(INUM(mask)) & INUM(n1))); } -SCM scm_copybitfield(to, start, rest) - SCM to, start, rest; +SCM scm_copybitfield(to, from, rest) + SCM to, from, rest; { long len; - SCM end, from; + SCM start, end; #ifndef RECKLESS if (!(NIMP(rest) && CONSP(rest))) wna: wta(UNDEFINED, (char *)WNA, s_copybitfield); #endif - end = CAR(rest); + start = CAR(rest); rest = CDR(rest); ASRTGO(NIMP(rest) && CONSP(rest), wna); - from = CAR(rest); + end = CAR(rest); ASRTGO(NULLP(CDR(rest)), wna); ASRTER(INUMP(start) && INUM(start)>=0, start, ARG2, s_copybitfield); len = INUM(end) - INUM(start); |