summaryrefslogtreecommitdiffstats
path: root/scl.c
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2017-02-20 00:05:37 -0800
committerBryan Newbold <bnewbold@robocracy.org>2017-02-20 00:05:37 -0800
commit710a97992705d67c3ded0d4b270c5978ce29b11f (patch)
treeddcb2f7a91cbb86ce582e74227768b7b898c29e1 /scl.c
parent50eb784bfcf15ee3c6b0b53d747db92673395040 (diff)
downloadscm-955168ab5c534b63c9e15a33f468b4750f6c1007.tar.gz
scm-955168ab5c534b63c9e15a33f468b4750f6c1007.zip
Import Upstream version 5e4upstream/5e4
Diffstat (limited to 'scl.c')
-rw-r--r--scl.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/scl.c b/scl.c
index 7f17cc6..b7c3f35 100644
--- a/scl.c
+++ b/scl.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1997, 2005 Free Software Foundation, Inc.
+/* Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1997, 2005, 2006 Free Software Foundation, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -350,7 +350,7 @@ static SCM big2str(b, radix)
}
ch = s[0]=='-' ? 1 : 0; /* jeh */
if (ch < j) { /* jeh */
- for(i = j;j < LENGTH(ss);j++) s[ch+j-i] = s[j]; /* jeh */
+ for (i = j;j < LENGTH(ss);j++) s[ch+j-i] = s[j]; /* jeh */
resizuve(ss, (SCM)MAKINUM(ch+LENGTH(ss)-i)); /* jeh */
}
return ss;
@@ -405,7 +405,7 @@ int floprint(sexp, port, writing)
return !0;
} else
#endif
- ipruk("float", sexp, port);
+ scm_ipruk("float", sexp, port);
return !0;
}
int bigprint(exp, port, writing)
@@ -420,7 +420,7 @@ int bigprint(exp, port, writing)
return !0;
} else
#endif
- ipruk("bignum", exp, port);
+ scm_ipruk("bignum", exp, port);
return !0;
}
/*** END nums->strs ***/
@@ -884,7 +884,7 @@ SCM eqv(x, y)
SCM memv(x, lst) /* m.borza 12.2.91 */
SCM x, lst;
{
- for(;NIMP(lst);lst = CDR(lst)) {
+ for (;NIMP(lst);lst = CDR(lst)) {
ASRTGO(CONSP(lst), badlst);
if (NFALSEP(eqv(CAR(lst), x))) return lst;
}
@@ -898,7 +898,7 @@ SCM assv(x, alist) /* m.borza 12.2.91 */
SCM x, alist;
{
SCM tmp;
- for(;NIMP(alist);alist = CDR(alist)) {
+ for (;NIMP(alist);alist = CDR(alist)) {
ASRTGO(CONSP(alist), badlst);
tmp = CAR(alist);
ASRTGO(NIMP(tmp) && CONSP(tmp), badlst);
@@ -933,7 +933,7 @@ SCM string2list(str)
unsigned char *src;
ASRTER(NIMP(str) && STRINGP(str), str, ARG1, s_str2list);
src = UCHARS(str);
- for(i = LENGTH(str)-1;i >= 0;i--) res = cons((SCM)MAKICHR(src[i]), res);
+ for (i = LENGTH(str)-1;i >= 0;i--) res = cons((SCM)MAKICHR(src[i]), res);
return res;
}
SCM string_copy(str)
@@ -951,7 +951,7 @@ SCM string_fill(str, chr)
ASRTER(ICHRP(chr), chr, ARG2, s_st_fill);
c = ICHR(chr);
dst = CHARS(str);
- for(k = LENGTH(str)-1;k >= 0;k--) dst[k] = c;
+ for (k = LENGTH(str)-1;k >= 0;k--) dst[k] = c;
return UNSPECIFIED;
}
SCM vector2list(v)
@@ -962,7 +962,7 @@ SCM vector2list(v)
SCM *data;
ASRTER(NIMP(v) && VECTORP(v), v, ARG1, s_vect2list);
data = VELTS(v);
- for(i = LENGTH(v)-1;i >= 0;i--) res = cons(data[i], res);
+ for (i = LENGTH(v)-1;i >= 0;i--) res = cons(data[i], res);
return res;
}
SCM vector_fill(v, fill)
@@ -972,14 +972,14 @@ SCM vector_fill(v, fill)
register SCM *data;
ASRTER(NIMP(v) && VECTORP(v), v, ARG1, s_ve_fill);
data = VELTS(v);
- for(i = LENGTH(v)-1;i >= 0;i--) data[i] = fill;
+ for (i = LENGTH(v)-1;i >= 0;i--) data[i] = fill;
return UNSPECIFIED;
}
static SCM vector_equal(x, y)
SCM x, y;
{
long i;
- for(i = LENGTH(x)-1;i >= 0;i--)
+ for (i = LENGTH(x)-1;i >= 0;i--)
if (FALSEP(equal(VELTS(x)[i], VELTS(y)[i]))) return BOOL_F;
return BOOL_T;
}
@@ -2697,7 +2697,7 @@ unsigned long hasher(obj, n, d)
unsigned long n;
sizet d;
{
- switch (7 & (int) obj) {
+ switch (7 & PTR2INT(obj)) {
case 2: case 6: /* INUMP(obj) */
return INUM(obj) % n;
case 4: