"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "subr.c" between
scm-5f2.zip and scm-5f3.zip

About: SCM is a Scheme Language Interpreter.

subr.c  (scm-5f2):subr.c  (scm-5f3)
skipping to change at line 1276 skipping to change at line 1276
SCM scm_ash(n, cnt) SCM scm_ash(n, cnt)
SCM n, cnt; SCM n, cnt;
{ {
SCM res; SCM res;
long ni = INUM(n); long ni = INUM(n);
int icnt = INUM(cnt); int icnt = INUM(cnt);
ASRTER(INUMP(cnt), cnt, ARG2, s_ash); ASRTER(INUMP(cnt), cnt, ARG2, s_ash);
if (INUMP(n)) { if (INUMP(n)) {
if (icnt < 0) { if (icnt < 0) {
if (-icnt >= LONG_BIT) return INUM0; if (-icnt >= LONG_BIT) return ni<0 ? MAKINUM(-1L) : INUM0;
return MAKINUM(SRS(ni, -icnt)); return MAKINUM(SRS(ni, -icnt));
} }
if (icnt >= LONG_BIT) goto ovflow; if (icnt >= LONG_BIT) goto ovflow;
res = MAKINUM(ni<<icnt); res = MAKINUM(ni<<icnt);
if (INUM(res)>>icnt != INUM(n)) if (INUM(res)>>icnt != INUM(n))
goto ovflow; goto ovflow;
else else
return res; return res;
} }
#ifdef BIGDIG #ifdef BIGDIG
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)