summaryrefslogtreecommitdiffstats
path: root/eval.c
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2017-02-20 00:05:31 -0800
committerBryan Newbold <bnewbold@robocracy.org>2017-02-20 00:05:31 -0800
commitae2b295c7deaf2d7c18ad1ed9b6050970e56bae7 (patch)
treeeee15e02ae016333546d3841712be591b2bcb06f /eval.c
parent302e3218b7d487539ec305bf23881a6ee7d5be99 (diff)
downloadscm-ae2b295c7deaf2d7c18ad1ed9b6050970e56bae7.tar.gz
scm-ae2b295c7deaf2d7c18ad1ed9b6050970e56bae7.zip
Import Upstream version 5e2upstream/5e2
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c192
1 files changed, 96 insertions, 96 deletions
diff --git a/eval.c b/eval.c
index 3e39bee..778d7e4 100644
--- a/eval.c
+++ b/eval.c
@@ -174,7 +174,7 @@ static SCM m_binding P((SCM name, SCM value, SCM env, SCM ctxt));
static SCM m_bindings P((SCM name, SCM value, SCM env, SCM ctxt));
static SCM m_seq P((SCM x, SCM env, SCM ctxt));
static SCM m_expr P((SCM x, SCM env, SCM ctxt));
-static void checked_define P((SCM name, SCM val, char *what));
+static void checked_define P((SCM name, SCM val, const char *what));
static int topdenote_eq P((SCM sym, SCM id, SCM env));
static int constant_p P((SCM x));
static int prinenv P((SCM exp, SCM port, int writing));
@@ -188,9 +188,9 @@ static void env_tail P((int depth));
static void unpaint P((SCM *p));
static void ecache_evalx P((SCM x));
static int ecache_eval_args P((SCM proc, SCM arg1, SCM arg2, SCM arg3, SCM x));
-static int varcheck P((SCM vars, SCM op, char *what));
+static int varcheck P((SCM vars, SCM op, const char *what));
#ifdef CAREFUL_INTS
-static void debug_env_warn P((char *fnam, int line, char *what));
+static void debug_env_warn P((char *fnam, int line, const char *what));
static void debug_env_save P((char *fnam, int line));
#endif
@@ -233,7 +233,7 @@ SCM scm_trace, scm_trace_env;
#endif
#define ENV_MAY_POP(p, guard) if (p>0 && !(guard)) {ENV_POP; p=-1;}
#define ENV_MAY_PUSH(p) if (p<=0) {ENV_PUSH; p=1;}
-#define SIDEVAL_1(x) if NIMP(x) ceval_1(x)
+#define SIDEVAL_1(x) if (NIMP(x)) ceval_1(x)
#define STATIC_ENV (scm_estk_ptr[2])
#ifdef CAUTIOUS
# define TRACE(x) {scm_estk_ptr[3]=(x);}
@@ -342,7 +342,7 @@ int ecache_p(x)
SCM x;
{
register CELLPTR ptr;
- if NCELLP(x) return 0;
+ if (NCELLP(x)) return 0;
ptr = (CELLPTR)SCM2PTR(x);
if (PTR_LE(scm_ecache, ptr)
&& PTR_GT(scm_ecache+scm_ecache_len, ptr))
@@ -352,7 +352,7 @@ int ecache_p(x)
static void debug_env_warn(fnam, line, what)
char *fnam;
int line;
- char *what;
+ const char *what;
{
lputs(fnam, cur_errp);
lputc(':', cur_errp);
@@ -419,7 +419,7 @@ SCM *ilookup(iloc)
eloc = &CAR(er);
for (ir = IDIST(iloc); 0 != ir; --ir)
eloc = &CDR(*eloc);
- if ICDRP(iloc) return eloc;
+ if (ICDRP(iloc)) return eloc;
return &CAR(*eloc);
}
SCM *farlookup(farloc)
@@ -641,7 +641,7 @@ static SCM evalatomcar(x, toplevelp)
return CAR(CDR(ret));
case tc7_smob:
#ifdef MACRO
- if M_IDENTP(CAR(x)) goto lookup;
+ if (M_IDENTP(CAR(x))) goto lookup;
#endif
/* fall through */
case tcs_uves:
@@ -818,10 +818,10 @@ static int ecache_eval_args(proc, arg1, arg2, arg3, x)
proc = CDR(proc);
proc = CDR(proc);
for (; NIMP(proc); proc=CDR(proc)) {
- if IMP(x) return 0;
+ if (IMP(x)) return 0;
x = CDR(x);
}
- if NIMP(x) return 0;
+ if (NIMP(x)) return 0;
#endif
return 1;
}
@@ -839,10 +839,10 @@ static SCM asubr_apply(proc, arg1, arg2, arg3, args)
}
return arg1;
case tc7_rpsubr:
- if FALSEP(SUBRF(proc)(arg1, arg2)) return BOOL_F;
+ if (FALSEP(SUBRF(proc)(arg1, arg2))) return BOOL_F;
while (!0) {
- if FALSEP(SUBRF(proc)(arg2, arg3)) return BOOL_F;
- if IMP(args) return BOOL_T;
+ if (FALSEP(SUBRF(proc)(arg2, arg3))) return BOOL_F;
+ if (IMP(args)) return BOOL_T;
arg2 = arg3;
arg3 = CAR(args);
args = CDR(args);
@@ -855,7 +855,7 @@ static char s_values[] = "values";
static char s_call_wv[] = "call-with-values";
SCM scm_values(arg1, arg2, rest, what)
SCM arg1, arg2, rest;
- char *what;
+ const char *what;
{
DEFER_INTS_EGC;
ASRTER(IM_VALUES_TOKEN==scm_env_tmp, UNDEFINED, "one value expected", what);
@@ -877,7 +877,7 @@ static char s_clauses[] = "bad or missing clauses";
static char s_formals[] = "bad formals";
static char s_expr[] = "bad expression";
#define ASSYNT(_cond, _arg, _pos, _subr)\
- if(!(_cond))scm_experr(_arg, (char *)_pos, _subr);
+ if (!(_cond))scm_experr(_arg, (char *)_pos, _subr);
/* These symbols are needed by the reader, in repl.c */
SCM i_dot, i_quote, i_quasiquote, i_unquote, i_uq_splicing;
@@ -888,7 +888,7 @@ static SCM i_bind, i_anon, i_side_effect, i_test, i_procedure,
static SCM f_begin, f_define;
-#define ASRTSYNTAX(cond_, msg_) if(!(cond_))wta(xorig, (msg_), what);
+#define ASRTSYNTAX(cond_, msg_) if (!(cond_))wta(xorig, (msg_), what);
#ifdef MACRO
# define TOPLEVELP(x, env) (topdenote_eq(UNDEFINED, (x), (env)))
# define TOPDENOTE_EQ topdenote_eq
@@ -907,7 +907,7 @@ static int topdenote_eq(sym, id, env)
static SCM id2sym(id)
SCM id;
{
- if NIMP(id)
+ if (NIMP(id))
while M_IDENTP(id)
id = IDENT_PARENT(id);
return id;
@@ -924,7 +924,7 @@ static void unpaint(p)
{
SCM x;
while NIMP((x = *p)) {
- if CONSP(x) {
+ if (CONSP(x)) {
if (NIMP(CAR(x)))
unpaint(&CAR(x));
else if (SCM_LINUMP(CAR(x))) {
@@ -933,7 +933,7 @@ static void unpaint(p)
}
p = &CDR(*p);
}
- else if VECTORP(x) {
+ else if (VECTORP(x)) {
sizet i = LENGTH(x);
if (0==i) return;
while (i-- > 1) unpaint(&(VELTS(x)[i]));
@@ -1144,7 +1144,7 @@ SCM m_cond(xorig, env, ctxt)
static int varcheck(vars, op, what)
SCM vars, op;
- char *what;
+ const char *what;
{
SCM v1, vs;
char *opstr = ISYMCHARS(op) + 2;
@@ -1351,15 +1351,15 @@ static SCM iqq(form)
SCM form;
{
SCM tmp;
- if IMP(form) return form;
- if VECTORP(form) {
+ if (IMP(form)) return form;
+ if (VECTORP(form)) {
long i = LENGTH(form);
SCM *data = VELTS(form);
tmp = EOL;
for(;--i >= 0;) tmp = cons(data[i], tmp);
return vector(iqq(tmp));
}
- if NCONSP(form) return form;
+ if (NCONSP(form)) return form;
tmp = CAR(form);
if (IM_UNQUOTE==tmp)
return evalcar(CDR(form));
@@ -1374,8 +1374,8 @@ static SCM m_iqq(form, depth, env, ctxt)
{
SCM tmp;
int edepth = depth;
- if IMP(form) return form;
- if VECTORP(form) {
+ if (IMP(form)) return form;
+ if (VECTORP(form)) {
long i = LENGTH(form);
SCM *data = VELTS(form);
tmp = EOL;
@@ -1387,7 +1387,7 @@ static SCM m_iqq(form, depth, env, ctxt)
}
return form;
}
- if NCONSP(form) {
+ if (NCONSP(form)) {
#ifdef MACRO
while M_IDENTP(form) form = IDENT_PARENT(form);
#endif
@@ -1395,8 +1395,8 @@ static SCM m_iqq(form, depth, env, ctxt)
}
form = scm_check_linum(form, 0L); /* needed? */
tmp = scm_check_linum(CAR(form), 0L);
- if NIMP(tmp) {
- if IDENTP(tmp) {
+ if (NIMP(tmp)) {
+ if (IDENTP(tmp)) {
#ifdef MACRO
while M_IDENTP(tmp) tmp = IDENT_PARENT(tmp);
#endif
@@ -1447,11 +1447,11 @@ SCM m_delay(xorig, env, ctxt)
static int built_inp(name, x)
SCM name, x;
{
- if NIMP(x) {
+ if (NIMP(x)) {
tail:
switch TYP7(x) {
case tcs_subrs: return CHARS(name)==SNAME(x);
- case tc7_smob: if MACROP(x) {x = CDR(x); goto tail;}
+ case tc7_smob: if (MACROP(x)) {x = CDR(x); goto tail;}
/* else fall through */
}
}
@@ -1465,7 +1465,7 @@ char s_built_in_syntax[] = "built-in syntax ";
#endif
static void checked_define(name, val, what)
SCM name, val;
- char *what;
+ const char *what;
{
SCM old, vcell;
#ifdef MACRO
@@ -1519,9 +1519,9 @@ static SCM m_parse_let(imm, xorig, x, vars, inits)
SCM clause, bdgs, *varloc = vars, *initloc = inits;
int len = ilength(x);
#ifdef MACRO
- char *what = CHARS(ident2sym(CAR(xorig)));
+ const char *what = CHARS(ident2sym(CAR(xorig)));
#else
- char *what = CHARS(CAR(xorig));
+ const char *what = CHARS(CAR(xorig));
#endif
*varloc = imm;
*initloc = EOL;
@@ -1613,12 +1613,12 @@ static SCM m_body(xorig, env, ctxt)
SCM xorig, env, ctxt;
{
SCM form, denv = env, x = xorig, defs = EOL;
- char *what = 0; /* Should this be passed in? */
+ const char *what = 0; /* Should this be passed in? */
ASRTSYNTAX(ilength(xorig) >= 1, s_expression);
while NIMP(x) {
form = scm_check_linum(CAR(x), 0L);
if (IMP(form) || NCONSP(form)) break;
- if IMP(CAR(form)) break;
+ if (IMP(CAR(form))) break;
if (! IDENTP(CAR(form))) break;
form = macroexp1(CAR(x), denv, i_check_defines, 1);
if (IM_DEFINE==CAR(form)) {
@@ -1635,7 +1635,7 @@ static SCM m_body(xorig, env, ctxt)
else
x = append(cons2(form, x, EOL));
}
- else if NIMP(defs) {
+ else if (NIMP(defs)) {
break;
}
else {
@@ -1736,7 +1736,7 @@ static SCM macroexp1(xorig, env, ctxt, mode)
#ifndef RECKLESS
SCM trace = scm_trace, trace_env = scm_trace_env;
long argc;
- char *what = s_wtap;
+ const char *what = s_wtap;
MACROEXP_TRACE(xorig, env);
#endif
x = scm_check_linum(xorig, &linum);
@@ -1914,8 +1914,8 @@ int badargsp(formals, args)
SCM formals, args;
{
while NIMP(formals) {
- if NCONSP(formals) return 0;
- if IMP(args) return 1;
+ if (NCONSP(formals)) return 0;
+ if (IMP(args)) return 1;
formals = CDR(formals);
args = CDR(args);
}
@@ -1925,7 +1925,7 @@ int badargsp(formals, args)
int scm_arity_check(proc, argc, what)
SCM proc;
long argc;
- char *what;
+ const char *what;
{
SCM p = proc;
if (IMP(p) || argc < 0) goto badproc;
@@ -1991,7 +1991,7 @@ char s_call_cc[] = "call-with-current-continuation"; /* s_apply[] = "apply"; */
/* {return (NIMP(ctxt) && i_check_defines==CAR(ctxt));} */
/* static SCM wrapenv() */
/* {register SCM z; */
-/* DEFER_INTS_EGC; if NULLP(scm_env) return EOL; */
+/* DEFER_INTS_EGC; if (NULLP(scm_env)) return EOL; */
/* NEWCELL(z); DEFER_INTS_EGC; */
/* if (NIMP(scm_env) && ENVP(scm_env)) return scm_env; */
/* CDR(z) = scm_env; CAR(z) = tc16_env; */
@@ -2101,11 +2101,11 @@ static SCM ceval_1(x)
x = arg1;
}
carloop: /* eval car of last form in list */
- if NCELLP(CAR(x)) {
+ if (NCELLP(CAR(x))) {
x = CAR(x);
x = IMP(x) ? EVALIMP(x) : I_VAL(x);
}
- else if ATOMP(CAR(x))
+ else if (ATOMP(CAR(x)))
x = evalatomcar(x, 0);
else {
x = CAR(x);
@@ -2123,9 +2123,9 @@ static SCM ceval_1(x)
while(NIMP(x = CDR(x))) {
proc = CAR(x);
arg1 = EVALCAR(proc);
- if NFALSEP(arg1) {
+ if (NFALSEP(arg1)) {
x = CDR(proc);
- if NULLP(x) {
+ if (NULLP(x)) {
x = arg1;
goto retx;
}
@@ -2156,12 +2156,12 @@ static SCM ceval_1(x)
EXTEND_VALENV;
}
x = CDR(proc);
- if NULLP(x) {x = UNSPECIFIED; goto retx;}
+ if (NULLP(x)) {x = UNSPECIFIED; goto retx;}
goto begin;
case (127 & IM_IF):
x = CDR(x);
- if NFALSEP(EVALCAR(x)) x = CDR(x);
- else if IMP(x = CDR(CDR(x))) {x = UNSPECIFIED; goto retx;}
+ if (NFALSEP(EVALCAR(x))) x = CDR(x);
+ else if (IMP(x = CDR(CDR(x)))) {x = UNSPECIFIED; goto retx;}
goto carloop;
case (127 & IM_LET):
ENV_MAY_PUSH(envpp);
@@ -2198,7 +2198,7 @@ static SCM ceval_1(x)
x = CDR(x);
proc = CDR(CAR(x));
/* No longer happens.
- if IMP(proc) {
+ if (IMP(proc)) {
scm_env_tmp = EOL;
EXTEND_VALENV;
goto cdrxbegin;
@@ -2218,7 +2218,7 @@ static SCM ceval_1(x)
arg1 = x;
while(NNULLP(arg1 = CDR(arg1))) {
x = EVALCAR(x);
- if NFALSEP(x) goto retx;
+ if (NFALSEP(x)) goto retx;
x = arg1;
}
goto carloop;
@@ -2234,8 +2234,8 @@ static SCM ceval_1(x)
proc = CAR(x);
switch (7 & (int)proc) {
case 0:
- if ECONSP(proc)
- if ISYMP(CAR(proc)) *farlookup(proc) = arg2;
+ if (ECONSP(proc))
+ if (ISYMP(CAR(proc))) *farlookup(proc) = arg2;
else {
x = scm_multi_set(proc, arg2);
goto retx;
@@ -2342,7 +2342,7 @@ static SCM ceval_1(x)
x = macroexp1(x, STATIC_ENV, EOL, 3);
goto loop;
#else
- if ATOMP(CAR(x)) {
+ if (ATOMP(CAR(x))) {
proc = scm_lookupval(x, 0);
if (KEYWORDP(proc)) {
x = macroexp1(x, STATIC_ENV, EOL, 3);
@@ -2356,7 +2356,7 @@ static SCM ceval_1(x)
position and x has the form which is being evaluated. */
ASRTGO(NIMP(proc), badfun);
scm_estk_ptr[0] = scm_env; /* For error reporting at wrongnumargs. */
- if NULLP(CDR(x)) {
+ if (NULLP(CDR(x))) {
evap0:
TOP_TRACE(xorig, STATIC_ENV);
ENV_MAY_POP(envpp, CLOSUREP(proc));
@@ -2386,12 +2386,12 @@ static SCM ceval_1(x)
DEFER_INTS_EGC;
arg2 = scm_env_tmp;
while NIMP(arg1) {
- if NCONSP(arg1) goto clo_unchecked;
- if IMP(arg2) goto umwrongnumargs;
+ if (NCONSP(arg1)) goto clo_unchecked;
+ if (IMP(arg2)) goto umwrongnumargs;
arg1 = CDR(arg1);
arg2 = CDR(arg2);
}
- if NNULLP(arg2) goto umwrongnumargs;
+ if (NNULLP(arg2)) goto umwrongnumargs;
}
#else /* def CAUTIOUS */
clo_checked:
@@ -2447,7 +2447,7 @@ static SCM ceval_1(x)
#endif
arg1 = EVALCAR(x);
x = CDR(x);
- if NULLP(x) {
+ if (NULLP(x)) {
TOP_TRACE(xorig, STATIC_ENV);
evap1:
ENV_MAY_POP(envpp, CLOSUREP(proc));
@@ -2460,14 +2460,14 @@ evap1:
return SUBRF(proc)(arg1);
case tc7_cxr:
#ifdef FLOATS
- if SUBRF(proc) {
- if INUMP(arg1)
+ if (SUBRF(proc)) {
+ if (INUMP(arg1))
return makdbl(DSUBRF(proc)((double) INUM(arg1)), 0.0);
ASRTGO(NIMP(arg1), floerr);
- if REALP(arg1)
+ if (REALP(arg1))
return makdbl(DSUBRF(proc)(REALPART(arg1)), 0.0);
# ifdef BIGDIG
- if BIGP(arg1)
+ if (BIGP(arg1))
return makdbl(DSUBRF(proc)(big2dbl(arg1)), 0.0);
# endif
floerr:
@@ -2561,7 +2561,7 @@ evap1:
{ /* have two or more arguments */
arg2 = EVALCAR(x);
x = CDR(x);
- if NULLP(x) { /* have two arguments */
+ if (NULLP(x)) { /* have two arguments */
TOP_TRACE(xorig, STATIC_ENV);
evap2:
ENV_MAY_POP(envpp, CLOSUREP(proc));
@@ -2582,7 +2582,7 @@ evap1:
case tc16_apply:
proc = arg1;
ASRTGO(NIMP(proc), badfun);
- if NULLP(arg2) goto evap0;
+ if (NULLP(arg2)) goto evap0;
if (IMP(arg2) || NCONSP(arg2)) {
x = arg2;
badlst: wta(x, (char *)ARGn, s_apply);
@@ -2590,17 +2590,17 @@ evap1:
arg1 = CAR(arg2);
x = CDR(arg2);
apply3:
- if NULLP(x) goto evap1;
+ if (NULLP(x)) goto evap1;
ASRTGO(NIMP(x) && CONSP(x), badlst);
arg2 = CAR(x);
x = CDR(x);
apply4:
- if NULLP(x) goto evap2;
+ if (NULLP(x)) goto evap2;
ASRTGO(NIMP(x) && CONSP(x), badlst);
arg3 = x;
x = scm_cp_list(CDR(x), 0);
#ifndef RECKLESS
- if UNBNDP(x) {x = arg3; goto badlst;}
+ if (UNBNDP(x)) {x = arg3; goto badlst;}
#endif
arg3 = CAR(arg3);
goto evap3;
@@ -2665,7 +2665,7 @@ evap1:
{ /* have 3 or more arguments */
arg3 = EVALCAR(x);
x = CDR(x);
- if NIMP(x) {
+ if (NIMP(x)) {
if (CLOSUREP(proc) && 3==ARGC(proc)) {
ALLOW_INTS_EGC;
ENV_MAY_PUSH(envpp);
@@ -2716,12 +2716,12 @@ evap1:
proc = arg1;
ASRTGO(NIMP(proc), badfun);
arg1 = arg2;
- if IMP(x) {
+ if (IMP(x)) {
x = arg3;
goto apply3;
}
arg2 = arg3;
- if IMP(CDR(x)) {
+ if (IMP(CDR(x))) {
x = CAR(x);
goto apply4;
}
@@ -2756,7 +2756,7 @@ evap1:
SCM procedurep(obj)
SCM obj;
{
- if NIMP(obj) switch TYP7(obj) {
+ if (NIMP(obj)) switch TYP7(obj) {
case tcs_closures:
case tc7_contin:
case tcs_subrs:
@@ -2838,8 +2838,8 @@ SCM apply(proc, arg1, args)
SCM proc, arg1, args;
{
ASRTGO(NIMP(proc), badproc);
- if NULLP(args)
- if NULLP(arg1) arg1 = UNDEFINED;
+ if (NULLP(args))
+ if (NULLP(arg1)) arg1 = UNDEFINED;
else {
args = CDR(arg1);
arg1 = CAR(arg1);
@@ -2855,7 +2855,7 @@ SCM apply(proc, arg1, args)
wrongnumargs:
wta(proc, (char *)WNA, s_apply);
case tc7_subr_2o:
- if NULLP(args) {
+ if (NULLP(args)) {
args = UNDEFINED;
return SUBRF(proc)(arg1, args);
}
@@ -2874,14 +2874,14 @@ SCM apply(proc, arg1, args)
case tc7_cxr:
ASRTGO(NULLP(args), wrongnumargs);
#ifdef FLOATS
- if SUBRF(proc) {
- if INUMP(arg1)
+ if (SUBRF(proc)) {
+ if (INUMP(arg1))
return makdbl(DSUBRF(proc)((double) INUM(arg1)), 0.0);
ASRTGO(NIMP(arg1), floerr);
- if REALP(arg1)
+ if (REALP(arg1))
return makdbl(DSUBRF(proc)(REALPART(arg1)), 0.0);
# ifdef BIGDIG
- if BIGP(arg1)
+ if (BIGP(arg1))
return makdbl(DSUBRF(proc)(big2dbl(arg1)), 0.0);
# endif
floerr:
@@ -2911,7 +2911,7 @@ SCM apply(proc, arg1, args)
ASRTGO(NIMP(args) && CONSP(args), wrongnumargs);
return SUBRF(proc)(arg1, CAR(args), CDR(args));
case tc7_asubr:
- if NULLP(args) return SUBRF(proc)(arg1, UNDEFINED);
+ if (NULLP(args)) return SUBRF(proc)(arg1, UNDEFINED);
while NIMP(args) {
ASRTER(CONSP(args), args, ARG2, s_apply);
arg1 = SUBRF(proc)(arg1, CAR(args));
@@ -2919,10 +2919,10 @@ SCM apply(proc, arg1, args)
}
return arg1;
case tc7_rpsubr:
- if NULLP(args) return BOOL_T;
+ if (NULLP(args)) return BOOL_T;
while NIMP(args) {
ASRTER(CONSP(args), args, ARG2, s_apply);
- if FALSEP(SUBRF(proc)(arg1, CAR(args))) return BOOL_F;
+ if (FALSEP(SUBRF(proc)(arg1, CAR(args)))) return BOOL_F;
arg1 = CAR(args);
args = CDR(args);
}
@@ -2978,14 +2978,14 @@ SCM scm_cvapply(proc, n, argv)
return SUBRF(proc)(argv[0]);
case tc7_cxr:
#ifdef FLOATS
- if SUBRF(proc) {
- if INUMP(argv[0])
+ if (SUBRF(proc)) {
+ if (INUMP(argv[0]))
return makdbl(DSUBRF(proc)((double) INUM(argv[0])), 0.0);
ASRTGO(NIMP(argv[0]), floerr);
- if REALP(argv[0])
+ if (REALP(argv[0]))
return makdbl(DSUBRF(proc)(REALPART(argv[0])), 0.0);
# ifdef BIGDIG
- if BIGP(argv[0])
+ if (BIGP(argv[0]))
return makdbl(DSUBRF(proc)(big2dbl(argv[0])), 0.0);
# endif
floerr:
@@ -3019,7 +3019,7 @@ SCM scm_cvapply(proc, n, argv)
case tc7_rpsubr:
if (1 >= n) return BOOL_T;
for (i = 0; i < n-1; i++)
- if FALSEP(SUBRF(proc)(argv[i], argv[i+1])) return BOOL_F;
+ if (FALSEP(SUBRF(proc)(argv[i], argv[i+1]))) return BOOL_F;
return BOOL_T;
case tcs_closures: {
SCM p = proc;
@@ -3070,7 +3070,7 @@ SCM map(proc, arg1, args)
SCM *ve = auto_ve, *ave = auto_ave;
long i, n = ilength(args) + 1;
scm_protect_temp(&heap_ve); /* Keep heap_ve from being optimized away. */
- if NULLP(arg1) return res;
+ if (NULLP(arg1)) return res;
#ifndef RECKLESS
scm_arity_check(proc, n, s_map);
#endif
@@ -3099,7 +3099,7 @@ SCM map(proc, arg1, args)
while (1) {
arg1 = EOL;
for (i = n-1;i >= 0;i--) {
- if IMP(ve[i]) {
+ if (IMP(ve[i])) {
/* We could check for lists the same length here. */
return res;
}
@@ -3118,7 +3118,7 @@ SCM for_each(proc, arg1, args)
SCM *ve = auto_ve, *ave = auto_ave;
long i, n = ilength(args) + 1;
scm_protect_temp(&heap_ve); /* Keep heap_ve from being optimized away. */
- if NULLP(arg1) return UNSPECIFIED;
+ if (NULLP(arg1)) return UNSPECIFIED;
#ifndef RECKLESS
scm_arity_check(proc, n, s_for_each);
#endif
@@ -3147,7 +3147,7 @@ SCM for_each(proc, arg1, args)
while (1) {
arg1 = EOL;
for (i = n-1;i >= 0;i--) {
- if IMP(ve[i]) {
+ if (IMP(ve[i])) {
return UNSPECIFIED;
}
ASRTER(CONSP(ve[i]), ve[i], 0==i ? ARG2 : ARGn, s_for_each);
@@ -3205,7 +3205,7 @@ static int prinprom(exp, port, writing)
static SCM makro(code, flags, what)
SCM code;
long flags;
- char *what;
+ const char *what;
{
register SCM z;
ASRTER(scm_arity_check(code, (MAC_PRIMITIVE & flags ? 3L : 2L),
@@ -3371,14 +3371,14 @@ SCM copytree(obj)
SCM obj;
{
SCM ans, tl;
- if IMP(obj) return obj;
- if VECTORP(obj) {
+ if (IMP(obj)) return obj;
+ if (VECTORP(obj)) {
sizet i = LENGTH(obj);
ans = make_vector(MAKINUM(i), UNSPECIFIED);
while(i--) VELTS(ans)[i] = copytree(VELTS(obj)[i]);
return ans;
}
- if NCONSP(obj) return obj;
+ if (NCONSP(obj)) return obj;
/* return cons(copytree(CAR(obj)), copytree(CDR(obj))); */
ans = tl = cons(copytree(CAR(obj)), UNSPECIFIED);
while(NIMP(obj = CDR(obj)) && CONSP(obj))
@@ -3425,9 +3425,9 @@ SCM ident_eqp(id1, id2, env)
{
SCM s1 = id1, s2 = id2;
# ifndef RECKLESS
- if IMP(id1)
+ if (IMP(id1))
badarg1: wta(id1, (char *)ARG1, s_ident_eqp);
- if IMP(id1)
+ if (IMP(id1))
badarg2: wta(id2, (char *)ARG2, s_ident_eqp);
# endif
if (id1==id2) return BOOL_T;