*/
#define SCM_CEVAL scm_ceval
-#define SIDEVAL(x, env) if SCM_NIMP(x) SCM_CEVAL((x), (env))
+#define SIDEVAL(x, env) if (SCM_NIMP(x)) SCM_CEVAL((x), (env))
#define EVALCELLCAR(x, env) (SCM_SYMBOLP (SCM_CAR(x)) \
? *scm_lookupcar(x, env) \
goto badforms;
proc = SCM_CDR (proc);
}
- if SCM_NNULLP
- (proc)
+ if (SCM_NNULLP (proc))
badforms:scm_wta (xorig, scm_s_formals, "lambda");
memlambda:
bodycheck (xorig, SCM_CDRLOC (x), "lambda");
SCM_ASSYNT (len >= 2, xorig, scm_s_body, s_letstar);
proc = SCM_CAR (x);
SCM_ASSYNT (scm_ilength (proc) >= 0, xorig, scm_s_bindings, s_letstar);
- while SCM_NIMP (proc)
+ while (SCM_NIMP (proc))
{
arg1 = SCM_CAR (proc);
SCM_ASSYNT (2 == scm_ilength (arg1), xorig, scm_s_bindings, s_letstar);
SCM_ASSYNT (len >= 2, xorig, scm_s_test, "do");
proc = SCM_CAR (x);
SCM_ASSYNT (scm_ilength (proc) >= 0, xorig, scm_s_bindings, "do");
- while SCM_NIMP
- (proc)
+ while (SCM_NIMP(proc))
{
arg1 = SCM_CAR (proc);
len = scm_ilength (arg1);
{
SCM tmp;
int edepth = depth;
- if SCM_IMP
- (form) return form;
+ if (SCM_IMP(form))
+ return form;
if (SCM_VECTORP (form))
{
long i = SCM_LENGTH (form);
tmp = scm_cons (data[i], tmp);
return scm_vector (iqq (tmp, env, depth));
}
- if SCM_NCONSP
- (form) return form;
+ if (SCM_NCONSP(form))
+ return form;
tmp = SCM_CAR (form);
if (scm_i_quasiquote == tmp)
{
ASRTSYNTAX (scm_ilength (x) >= 2, scm_s_body);
proc = SCM_CAR (x);
- if SCM_NULLP
- (proc) return scm_m_letstar (xorig, env); /* null binding, let* faster */
+ if (SCM_NULLP(proc))
+ return scm_m_letstar (xorig, env); /* null binding, let* faster */
ASRTSYNTAX (scm_ilength (proc) >= 1, scm_s_bindings);
do
{
*initloc = scm_cons (SCM_CAR (SCM_CDR (arg1)), SCM_EOL);
initloc = SCM_CDRLOC (*initloc);
}
- while SCM_NIMP
- (proc = SCM_CDR (proc));
+ while (SCM_NIMP (proc = SCM_CDR (proc)));
cdrx = scm_cons2 (vars, inits, SCM_CDR (x));
bodycheck (xorig, SCM_CDRLOC (SCM_CDR (cdrx)), what);
return scm_cons (SCM_IM_LETREC, cdrx);
SCM_ASSYNT (scm_ilength (x) >= 2, xorig, scm_s_body, s_let);
proc = SCM_CAR (x); /* bindings scm_list */
SCM_ASSYNT (scm_ilength (proc) >= 0, xorig, scm_s_bindings, s_let);
- while SCM_NIMP
- (proc)
+ while (SCM_NIMP (proc))
{ /* vars and inits both in order */
arg1 = SCM_CAR (proc);
SCM_ASSYNT (2 == scm_ilength (arg1), xorig, scm_s_bindings, s_let);
e = SCM_CDR (e);
s = SCM_CDR (s);
}
- while SCM_NIMP (v);
+ while (SCM_NIMP (v));
z = scm_cons (z, SCM_UNSPECIFIED);
SCM_SETCDR (ls, z);
if (SCM_CAR (ls) == scm_i_do)
env = EXTEND_ENV (SCM_CAR (b), SCM_BOOL_F, env);
b = SCM_CDR (SCM_CDR (b));
}
- while SCM_NIMP (b);
+ while (SCM_NIMP (b));
SCM_SETCDR (z, SCM_EOL);
letstar:
ls = scm_cons (scm_i_letstar, z = scm_cons (y, SCM_UNSPECIFIED));
z = SCM_CAR (x);
if (!SCM_ISYMP (z))
goto unmemo;
- switch SCM_ISYMNUM (z)
+ switch (SCM_ISYMNUM (z))
{
case (SCM_ISYMNUM (SCM_IM_APPLY)):
ls = z = scm_cons (scm_i_atapply, SCM_UNSPECIFIED);
SCM formals;
SCM args;
{
- while SCM_NIMP
- (formals)
+ while (SCM_NIMP (formals))
{
- if SCM_NCONSP
- (formals) return 0;
- if SCM_IMP
- (args) return 1;
+ if (SCM_NCONSP (formals))
+ return 0;
+ if (SCM_IMP(args))
+ return 1;
formals = SCM_CDR (formals);
args = SCM_CDR (args);
}
RETURN (scm_makdbl (SCM_DSUBRF (proc) (SCM_REALPART (arg1)), 0.0));
}
#ifdef SCM_BIGDIG
- if SCM_BIGP
- (arg1)
+ if (SCM_BIGP(arg1))
RETURN (scm_makdbl (SCM_DSUBRF (proc) (scm_big2dbl (arg1)), 0.0))
#endif
floerr:
SCM obj;
{
SCM ans, tl;
- if SCM_IMP
- (obj) return obj;
+ if (SCM_IMP(obj))
+ return obj;
if (SCM_VECTORP (obj))
{
scm_sizet i = SCM_LENGTH (obj);
SCM_VELTS (ans)[i] = scm_copy_tree (SCM_VELTS (obj)[i]);
return ans;
}
- if SCM_NCONSP (obj)
+ if (SCM_NCONSP (obj))
return obj;
/* return scm_cons(scm_copy_tree(SCM_CAR(obj)), scm_copy_tree(SCM_CDR(obj))); */
ans = tl = scm_cons (scm_copy_tree (SCM_CAR (obj)), SCM_UNSPECIFIED);
scm_sizet bas0 = 0;
int i, ndim = 1;
int exact = 2 /* 4 */ ; /* Don't care about values >2 (yet?) */
- if SCM_IMP
- (ra0) return 0;
+ if (SCM_IMP (ra0)) return 0;
switch (SCM_TYP7 (ra0))
{
default:
(ras)
{
ra1 = SCM_CAR (ras);
- if SCM_IMP
- (ra1) return 0;
+ if (SCM_IMP (ra1))
+ return 0;
switch SCM_TYP7
(ra1)
{
if (kmax < 0)
goto gencase;
vra0 = scm_array_contents (ra0, SCM_UNDEFINED);
- if SCM_IMP
- (vra0) goto gencase;
+ if (SCM_IMP (vra0)) goto gencase;
if (!SCM_ARRAYP (vra0))
{
vra1 = scm_make_ra (1);
case 1:
gencase: /* Have to loop over all dimensions. */
vra0 = scm_make_ra (1);
- if SCM_ARRAYP
- (ra0)
+ if (SCM_ARRAYP (ra0))
{
kmax = SCM_ARRAY_NDIM (ra0) - 1;
if (kmax < 0)
vra1 = scm_make_ra (1);
SCM_ARRAY_DIMS (vra1)->lbnd = SCM_ARRAY_DIMS (vra0)->lbnd;
SCM_ARRAY_DIMS (vra1)->ubnd = SCM_ARRAY_DIMS (vra0)->ubnd;
- if SCM_ARRAYP
- (ra1)
+ if (SCM_ARRAYP (ra1))
{
if (kmax >= 0)
SCM_ARRAY_DIMS (vra1)->inc = SCM_ARRAY_DIMS (ra1)[kmax].inc;
{
SCM e1 = SCM_UNDEFINED, e2 = SCM_UNDEFINED;
for (; n-- > 0; i0 += inc0, i1 += inc1, i2 += inc2)
- if BVE_REF
- (ra0, i0)
- if SCM_FALSEP
- (scm_eq_p (RVREF (ra1, i1, e1), RVREF (ra2, i2, e2)))
+ if (BVE_REF (ra0, i0))
+ if (SCM_FALSEP(scm_eq_p (RVREF (ra1, i1, e1), RVREF (ra2, i2, e2))))
BVE_CLR (ra0, i0);
break;
}
case scm_tc7_uvect:
case scm_tc7_ivect:
for (; n-- > 0; i0 += inc0, i1 += inc1, i2 += inc2)
- if BVE_REF
- (ra0, i0)
+ if (BVE_REF (ra0, i0))
if (SCM_VELTS (ra1)[i1] != SCM_VELTS (ra2)[i2])
BVE_CLR (ra0, i0);
break;
#ifdef SCM_SINGLES
case scm_tc7_fvect:
for (; n-- > 0; i0 += inc0, i1 += inc1, i2 += inc2)
- if BVE_REF
- (ra0, i0)
+ if (BVE_REF (ra0, i0))
if (((float *) SCM_VELTS (ra1))[i1] != ((float *) SCM_VELTS (ra2))[i2])
BVE_CLR (ra0, i0);
break;
#endif /*SCM_SINGLES*/
case scm_tc7_dvect:
for (; n-- > 0; i0 += inc0, i1 += inc1, i2 += inc2)
- if BVE_REF
- (ra0, i0)
+ if (BVE_REF (ra0, i0))
if (((double *) SCM_VELTS (ra1))[i1] != ((double *) SCM_VELTS (ra2))[i2])
BVE_CLR (ra0, i0);
break;
case scm_tc7_cvect:
for (; n-- > 0; i0 += inc0, i1 += inc1, i2 += inc2)
- if BVE_REF
- (ra0, i0)
+ if (BVE_REF (ra0, i0))
if (((double *) SCM_VELTS (ra1))[2 * i1] != ((double *) SCM_VELTS (ra2))[2 * i2] ||
((double *) SCM_VELTS (ra1))[2 * i1 + 1] != ((double *) SCM_VELTS (ra2))[2 * i2 + 1])
BVE_CLR (ra0, i0);
{
SCM e1 = SCM_UNDEFINED, e2 = SCM_UNDEFINED;
for (; n-- > 0; i0 += inc0, i1 += inc1, i2 += inc2)
- if BVE_REF
- (ra0, i0)
+ if (BVE_REF (ra0, i0))
if (opt ?
SCM_NFALSEP (scm_less_p (RVREF (ra1, i1, e1), RVREF (ra2, i2, e2))) :
SCM_FALSEP (scm_less_p (RVREF (ra1, i1, e1), RVREF (ra2, i2, e2))))
case scm_tc7_ivect:
for (; n-- > 0; i0 += inc0, i1 += inc1, i2 += inc2)
{
- if BVE_REF
- (ra0, i0)
+ if (BVE_REF (ra0, i0))
if (opt ?
SCM_VELTS (ra1)[i1] < SCM_VELTS (ra2)[i2] :
SCM_VELTS (ra1)[i1] >= SCM_VELTS (ra2)[i2])
#ifdef SCM_SINGLES
case scm_tc7_fvect:
for (; n-- > 0; i0 += inc0, i1 += inc1, i2 += inc2)
- if BVE_REF
- (ra0, i0)
+ if (BVE_REF(ra0, i0))
if (opt ?
((float *) SCM_VELTS (ra1))[i1] < ((float *) SCM_VELTS (ra2))[i2] :
((float *) SCM_VELTS (ra1))[i1] >= ((float *) SCM_VELTS (ra2))[i2])
#endif /*SCM_SINGLES*/
case scm_tc7_dvect:
for (; n-- > 0; i0 += inc0, i1 += inc1, i2 += inc2)
- if BVE_REF
- (ra0, i0)
+ if (BVE_REF (ra0, i0))
if (opt ?
((double *) SCM_VELTS (ra1))[i1] < ((double *) SCM_VELTS (ra2))[i2] :
((double *) SCM_VELTS (ra1))[i1] >= ((double *) SCM_VELTS (ra2))[i2])
scm_sizet i0 = SCM_ARRAY_BASE (ra0);
long inc0 = SCM_ARRAY_DIMS (ra0)->inc;
ra0 = SCM_ARRAY_V (ra0);
- if SCM_NNULLP
- (ras)
+ if (SCM_NNULLP(ras))
{
SCM ra1 = SCM_CAR (ras);
scm_sizet i1 = SCM_ARRAY_BASE (ra1);
scm_sizet i0 = SCM_ARRAY_BASE (ra0);
long inc0 = SCM_ARRAY_DIMS (ra0)->inc;
ra0 = SCM_ARRAY_V (ra0);
- if SCM_NULLP
- (ras)
+ if (SCM_NULLP (ras))
{
- switch SCM_TYP7
- (ra0)
+ switch (SCM_TYP7 (ra0))
{
default:
{
scm_sizet i0 = SCM_ARRAY_BASE (ra0);
long inc0 = SCM_ARRAY_DIMS (ra0)->inc;
ra0 = SCM_ARRAY_V (ra0);
- if SCM_NNULLP
- (ras)
+ if (SCM_NNULLP (ras))
{
SCM ra1 = SCM_CAR (ras);
scm_sizet i1 = SCM_ARRAY_BASE (ra1);
scm_sizet i0 = SCM_ARRAY_BASE (ra0);
long inc0 = SCM_ARRAY_DIMS (ra0)->inc;
ra0 = SCM_ARRAY_V (ra0);
- if SCM_NULLP
- (ras)
+ if (SCM_NULLP (ras))
{
- switch SCM_TYP7
- (ra0)
+ switch (SCM_TYP7 (ra0))
{
default:
{
long n = SCM_ARRAY_DIMS (ra0)->ubnd;
long base = SCM_ARRAY_BASE (ra0) - i * inc;
ra0 = SCM_ARRAY_V (ra0);
- if SCM_NULLP
- (ras)
+ if (SCM_NULLP (ras))
for (; i <= n; i++)
scm_array_set_x (ra0, scm_apply (proc, SCM_EOL, SCM_EOL), SCM_MAKINUM (i * inc + base));
else
long inc1 = SCM_ARRAY_DIMS (ra1)->inc;
ra1 = SCM_ARRAY_V (ra1);
ras = SCM_CDR (ras);
- if SCM_NULLP
- (ras)
+ if (SCM_NULLP(ras))
ras = scm_nullvect;
else
{
long n = SCM_ARRAY_DIMS (ra0)->ubnd - SCM_ARRAY_DIMS (ra1)->lbnd + 1;
ra0 = SCM_ARRAY_V (ra0);
ra1 = SCM_ARRAY_V (ra1);
- switch SCM_TYP7
- (ra0)
+ switch (SCM_TYP7 (ra0))
{
default:
gencase:
case scm_tc7_fvect:
{
float *dst = (float *) SCM_VELTS (ra0);
- switch SCM_TYP7
- (ra1)
+ switch (SCM_TYP7 (ra1))
{
default:
goto gencase;
case scm_tc7_dvect:
{
double *dst = (double *) SCM_VELTS (ra0);
- switch SCM_TYP7
- (ra1)
+ switch (SCM_TYP7 (ra1))
{
default:
goto gencase;
{
default:
for (; n-- > 0; i0 += inc0, i1 += inc1, i2 += inc2)
- if BVE_REF
- (ra0, i0)
- if SCM_FALSEP
- (SCM_SUBRF (proc) (RVREF (ra1, i1, e1), RVREF (ra2, i2, e2)))
+ if (BVE_REF (ra0, i0))
+ if (SCM_FALSEP (SCM_SUBRF (proc) (RVREF (ra1, i1, e1), RVREF (ra2, i2, e2))))
BVE_CLR (ra0, i0);
break;
case scm_tc7_uvect:
case scm_tc7_ivect:
for (; n-- > 0; i0 += inc0, i1 += inc1, i2 += inc2)
- if BVE_REF
- (ra0, i0)
+ if (BVE_REF (ra0, i0))
{
- if SCM_FALSEP
- (SCM_SUBRF (proc) (SCM_MAKINUM (SCM_VELTS (ra1)[i1]),
- SCM_MAKINUM (SCM_VELTS (ra2)[i2])))
+ if (SCM_FALSEP (SCM_SUBRF (proc) (SCM_MAKINUM (SCM_VELTS (ra1)[i1]),
+ SCM_MAKINUM (SCM_VELTS (ra2)[i2]))))
BVE_CLR (ra0, i0);
}
break;
{
SCM a1 = scm_makflo (1.0), a2 = scm_makflo (1.0);
for (; n-- > 0; i0 += inc0, i1 += inc1, i2 += inc2)
- if BVE_REF
- (ra0, i0)
+ if (BVE_REF (ra0, i0))
{
SCM_FLO (a1) = ((float *) SCM_VELTS (ra1))[i1];
SCM_FLO (a2) = ((float *) SCM_VELTS (ra2))[i2];
- if SCM_FALSEP
- (SCM_SUBRF (proc) (a1, a2))
+ if (SCM_FALSEP (SCM_SUBRF (proc) (a1, a2)))
BVE_CLR (ra0, i0);
}
break;
{
SCM a1 = scm_makdbl (1.0 / 3.0, 0.0), a2 = scm_makdbl (1.0 / 3.0, 0.0);
for (; n-- > 0; i0 += inc0, i1 += inc1, i2 += inc2)
- if BVE_REF
- (ra0, i0)
+ if (BVE_REF (ra0, i0))
{
SCM_REAL (a1) = ((double *) SCM_VELTS (ra1))[i1];
SCM_REAL (a2) = ((double *) SCM_VELTS (ra2))[i2];
- if SCM_FALSEP
- (SCM_SUBRF (proc) (a1, a2))
+ if (SCM_FALSEP (SCM_SUBRF (proc) (a1, a2)))
BVE_CLR (ra0, i0);
}
break;
{
SCM a1 = scm_makdbl (1.0, 1.0), a2 = scm_makdbl (1.0, 1.0);
for (; n-- > 0; i0 += inc0, i1 += inc1, i2 += inc2)
- if BVE_REF
- (ra0, i0)
+ if (BVE_REF (ra0, i0))
{
SCM_REAL (a1) = ((double *) SCM_VELTS (ra1))[2 * i1];
SCM_IMAG (a1) = ((double *) SCM_VELTS (ra1))[2 * i1 + 1];
SCM_REAL (a2) = ((double *) SCM_VELTS (ra2))[2 * i2];
SCM_IMAG (a2) = ((double *) SCM_VELTS (ra2))[2 * i2 + 1];
- if SCM_FALSEP
- (SCM_SUBRF (proc) (a1, a2))
+ if (SCM_FALSEP (SCM_SUBRF (proc) (a1, a2)))
BVE_CLR (ra0, i0);
}
break;
ra0 = SCM_ARRAY_V (ra0);
ra1 = SCM_ARRAY_V (ra1);
ras = SCM_CDR (ras);
- if SCM_NULLP
- (ras)
+ if (SCM_NULLP (ras))
{
if (scm_tc7_vector == SCM_TYP7 (ra0)
|| scm_tc7_wvect == SCM_TYP7 (ra0))
scm_sizet i0 = SCM_ARRAY_BASE (ra0);
long inc0 = SCM_ARRAY_DIMS (ra0)->inc;
ra0 = SCM_ARRAY_V (ra0);
- if SCM_NULLP
- (ras)
+ if (SCM_NULLP (ras))
for (; n-- > 0; i0 += inc0)
scm_array_set_x (ra0, SCM_SUBRF (proc) (RVREF (ra0, i0, e0), SCM_UNDEFINED), SCM_MAKINUM (i0));
else
return SCM_UNSPECIFIED;
}
case scm_tc7_asubr:
- if SCM_NULLP
- (lra)
+ if (SCM_NULLP (lra))
{
SCM prot, fill = SCM_SUBRF (proc) (SCM_UNDEFINED, SCM_UNDEFINED);
- if SCM_INUMP
- (fill)
+ if (SCM_INUMP(fill))
{
prot = scm_array_prototype (ra0);
if (SCM_NIMP (prot) && SCM_INEXP (prot))
}
scm_ramapc (ramap_2o, proc, ra0, lra, s_array_map_x);
lra = SCM_CDR (lra);
- if SCM_NIMP
- (lra)
+ if (SCM_NIMP (lra))
for (lra = SCM_CDR (lra); SCM_NIMP (lra); lra = SCM_CDR (lra))
scm_ramapc (ramap_a, proc, ra0, lra, s_array_map_x);
}
long inc0 = SCM_ARRAY_DIMS (ra0)->inc;
long n = SCM_ARRAY_DIMS (ra0)->ubnd;
ra0 = SCM_ARRAY_V (ra0);
- if SCM_NULLP
- (ras)
+ if (SCM_NULLP (ras))
for (; i <= n; i++, i0 += inc0)
scm_apply (proc, scm_cvref (ra0, i0, SCM_UNDEFINED), scm_listofnull);
else
long inc1 = SCM_ARRAY_DIMS (ra1)->inc;
ra1 = SCM_ARRAY_V (ra1);
ras = SCM_CDR (ras);
- if SCM_NULLP
- (ras)
+ if (SCM_NULLP(ras))
ras = scm_nullvect;
else
{
long inc0 = 1, inc1 = 1;
scm_sizet n = SCM_LENGTH (ra0);
ra1 = SCM_CAR (ra1);
- if SCM_ARRAYP
- (ra0)
+ if (SCM_ARRAYP(ra0))
{
n = SCM_ARRAY_DIMS (ra0)->ubnd - SCM_ARRAY_DIMS (ra0)->lbnd + 1;
i0 = SCM_ARRAY_BASE (ra0);
inc0 = SCM_ARRAY_DIMS (ra0)->inc;
ra0 = SCM_ARRAY_V (ra0);
}
- if SCM_ARRAYP
- (ra1)
+ if (SCM_ARRAYP (ra1))
{
i1 = SCM_ARRAY_BASE (ra1);
inc1 = SCM_ARRAY_DIMS (ra1)->inc;
ra1 = SCM_ARRAY_V (ra1);
}
- switch SCM_TYP7
- (ra0)
+ switch (SCM_TYP7 (ra0))
{
case scm_tc7_vector:
case scm_tc7_wvect:
default:
for (; n--; i0 += inc0, i1 += inc1)
{
- if SCM_FALSEP
- (as_equal)
+ if (SCM_FALSEP (as_equal))
{
- if SCM_FALSEP
- (scm_array_equal_p (RVREF (ra0, i0, e0), RVREF (ra1, i1, e1)))
+ if (SCM_FALSEP (scm_array_equal_p (RVREF (ra0, i0, e0), RVREF (ra1, i1, e1))))
return 0;
}
- else if SCM_FALSEP
- (scm_equal_p (RVREF (ra0, i0, e0), RVREF (ra1, i1, e1)))
+ else if (SCM_FALSEP (scm_equal_p (RVREF (ra0, i0, e0), RVREF (ra1, i1, e1))))
return 0;
}
return 1;
scm_array_dim *s0 = &dim0, *s1 = &dim1;
scm_sizet bas0 = 0, bas1 = 0;
int k, unroll = 1, vlen = 1, ndim = 1;
- if SCM_ARRAYP
- (ra0)
+ if (SCM_ARRAYP (ra0))
{
ndim = SCM_ARRAY_NDIM (ra0);
s0 = SCM_ARRAY_DIMS (ra0);
s0->ubnd = SCM_LENGTH (v0) - 1;
unroll = 0;
}
- if SCM_ARRAYP
- (ra1)
+ if (SCM_ARRAYP (ra1))
{
if (ndim != SCM_ARRAY_NDIM (ra1))
return 0;
{
if (SCM_IMP (ra0) || SCM_IMP (ra1))
callequal:return scm_equal_p (ra0, ra1);
- switch SCM_TYP7
- (ra0)
+ switch (SCM_TYP7(ra0))
{
default:
goto callequal;
if (!SCM_ARRAYP (ra0))
goto callequal;
}
- switch SCM_TYP7
- (ra1)
+ switch (SCM_TYP7 (ra1))
{
default:
goto callequal;