1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-12 06:41:13 +02:00

* (__scm.h, alist.c, eval.c, feature.c, gsubr.c, numbers.c,

options.c): Rename RECKLESS -> SCM_RECKLESS, CAUTIOUS ->
SCM_CAUTIOUS; this way, 1) there's only one version of each flag
to define (we used to have both RECKLESS and SCM_RECKLESS), and 2)
if we want to use them in a header file some day, we can.  (Thanks
to Michael Livshin.)
This commit is contained in:
Jim Blandy 1998-10-14 07:32:13 +00:00
parent ae6f9e24ce
commit cf7c17e976
7 changed files with 78 additions and 78 deletions

View file

@ -48,17 +48,17 @@
* These may be defined or undefined. * These may be defined or undefined.
*/ */
/* If the compile FLAG `CAUTIOUS' is #defined then the number of /* If the compile FLAG `SCM_CAUTIOUS' is #defined then the number of
* arguments is always checked for application of closures. If the * arguments is always checked for application of closures. If the
* compile FLAG `RECKLESS' is #defined then they are not checked. * compile FLAG `SCM_RECKLESS' is #defined then they are not checked.
* Otherwise, number of argument checks for closures are made only when * Otherwise, number of argument checks for closures are made only when
* the function position (whose value is the closure) of a combination is * the function position (whose value is the closure) of a combination is
* not an ILOC or GLOC. When the function position of a combination is a * not an ILOC or GLOC. When the function position of a combination is a
* symbol it will be checked only the first time it is evaluated because * symbol it will be checked only the first time it is evaluated because
* it will then be replaced with an ILOC or GLOC. * it will then be replaced with an ILOC or GLOC.
*/ */
#undef RECKLESS #undef SCM_RECKLESS
#define CAUTIOUS #define SCM_CAUTIOUS
/* After looking up a local for the first time, rewrite the /* After looking up a local for the first time, rewrite the
* code graph, caching its position. * code graph, caching its position.

View file

@ -161,7 +161,7 @@ scm_assv(x, alist)
SCM_ASRTGO(SCM_NIMP(tmp) && SCM_CONSP(tmp), badlst); SCM_ASRTGO(SCM_NIMP(tmp) && SCM_CONSP(tmp), badlst);
if SCM_NFALSEP(scm_eqv_p(SCM_CAR(tmp), x)) return tmp; if SCM_NFALSEP(scm_eqv_p(SCM_CAR(tmp), x)) return tmp;
} }
# ifndef RECKLESS # ifndef SCM_RECKLESS
if (!(SCM_NULLP(alist))) if (!(SCM_NULLP(alist)))
badlst: scm_wta(alist, (char *)SCM_ARG2, s_assv); badlst: scm_wta(alist, (char *)SCM_ARG2, s_assv);
# endif # endif

View file

@ -292,7 +292,7 @@ scm_lookupcar1 (SCM vloc, SCM genv)
if (SCM_CAR (fl) == var) if (SCM_CAR (fl) == var)
{ {
#ifdef MEMOIZE_LOCALS #ifdef MEMOIZE_LOCALS
#ifndef RECKLESS /* letrec inits to SCM_UNDEFINED */ #ifndef SCM_RECKLESS /* letrec inits to SCM_UNDEFINED */
if (SCM_UNBNDP (SCM_CAR (*al))) if (SCM_UNBNDP (SCM_CAR (*al)))
{ {
env = SCM_EOL; env = SCM_EOL;
@ -330,7 +330,7 @@ scm_lookupcar1 (SCM vloc, SCM genv)
else else
var = vcell; var = vcell;
} }
#ifndef RECKLESS #ifndef SCM_RECKLESS
if (SCM_NNULLP (env) || SCM_UNBNDP (SCM_CDR (var))) if (SCM_NNULLP (env) || SCM_UNBNDP (SCM_CDR (var)))
{ {
var = SCM_CAR (var); var = SCM_CAR (var);
@ -892,7 +892,7 @@ scm_m_define (x, env)
#endif #endif
arg1 = scm_sym2vcell (proc, env_top_level (env), SCM_BOOL_T); arg1 = scm_sym2vcell (proc, env_top_level (env), SCM_BOOL_T);
#if 0 #if 0
#ifndef RECKLESS #ifndef SCM_RECKLESS
if (SCM_NIMP (SCM_CDR (arg1)) && ((SCM) SCM_SNAME (SCM_CDR (arg1)) == proc) if (SCM_NIMP (SCM_CDR (arg1)) && ((SCM) SCM_SNAME (SCM_CDR (arg1)) == proc)
&& (SCM_CDR (arg1) != x)) && (SCM_CDR (arg1) != x))
scm_warn ("redefining built-in ", SCM_CHARS (proc)); scm_warn ("redefining built-in ", SCM_CHARS (proc));
@ -926,7 +926,7 @@ scm_m_undefine (x, env)
ASSYNT (SCM_NFALSEP (arg1) && !SCM_UNBNDP (SCM_CDR (arg1)), ASSYNT (SCM_NFALSEP (arg1) && !SCM_UNBNDP (SCM_CDR (arg1)),
x, "variable already unbound ", s_undefine); x, "variable already unbound ", s_undefine);
#if 0 #if 0
#ifndef RECKLESS #ifndef SCM_RECKLESS
if (SCM_NIMP (SCM_CDR (arg1)) && ((SCM) SCM_SNAME (SCM_CDR (arg1)) == x)) if (SCM_NIMP (SCM_CDR (arg1)) && ((SCM) SCM_SNAME (SCM_CDR (arg1)) == x))
scm_warn ("undefining built-in ", SCM_CHARS (x)); scm_warn ("undefining built-in ", SCM_CHARS (x));
else else
@ -1249,7 +1249,7 @@ scm_unmemocopy (x, env)
return unmemocopy (x, env); return unmemocopy (x, env);
} }
#ifndef RECKLESS #ifndef SCM_RECKLESS
int int
scm_badargsp (formals, args) scm_badargsp (formals, args)
@ -1284,7 +1284,7 @@ scm_eval_args (l, env, proc)
SCM results = SCM_EOL, *lloc = &results, res; SCM results = SCM_EOL, *lloc = &results, res;
while (SCM_NIMP (l)) while (SCM_NIMP (l))
{ {
#ifdef CAUTIOUS #ifdef SCM_CAUTIOUS
if (SCM_IMP (l)) if (SCM_IMP (l))
goto wrongnumargs; goto wrongnumargs;
else if (SCM_CONSP (l)) else if (SCM_CONSP (l))
@ -1308,7 +1308,7 @@ scm_eval_args (l, env, proc)
lloc = SCM_CDRLOC (*lloc); lloc = SCM_CDRLOC (*lloc);
l = SCM_CDR (l); l = SCM_CDR (l);
} }
#ifdef CAUTIOUS #ifdef SCM_CAUTIOUS
if (SCM_NNULLP (l)) if (SCM_NNULLP (l))
{ {
wrongnumargs: wrongnumargs:
@ -1479,7 +1479,7 @@ scm_deval_args (l, env, proc, lloc)
SCM *results = lloc, res; SCM *results = lloc, res;
while (SCM_NIMP (l)) while (SCM_NIMP (l))
{ {
#ifdef CAUTIOUS #ifdef SCM_CAUTIOUS
if (SCM_IMP (l)) if (SCM_IMP (l))
goto wrongnumargs; goto wrongnumargs;
else if (SCM_CONSP (l)) else if (SCM_CONSP (l))
@ -1503,7 +1503,7 @@ scm_deval_args (l, env, proc, lloc)
lloc = SCM_CDRLOC (*lloc); lloc = SCM_CDRLOC (*lloc);
l = SCM_CDR (l); l = SCM_CDR (l);
} }
#ifdef CAUTIOUS #ifdef SCM_CAUTIOUS
if (SCM_NNULLP (l)) if (SCM_NNULLP (l))
{ {
wrongnumargs: wrongnumargs:
@ -1941,7 +1941,7 @@ dispatch:
#ifdef DEVAL #ifdef DEVAL
debug.info->a.args = t.arg1; debug.info->a.args = t.arg1;
#endif #endif
#ifndef RECKLESS #ifndef SCM_RECKLESS
if (scm_badargsp (SCM_CAR (SCM_CODE (proc)), t.arg1)) if (scm_badargsp (SCM_CAR (SCM_CODE (proc)), t.arg1))
goto wrongnumargs; goto wrongnumargs;
#endif #endif
@ -2018,8 +2018,8 @@ dispatch:
case (127 & SCM_ILOC00): case (127 & SCM_ILOC00):
proc = *scm_ilookup (SCM_CAR (x), env); proc = *scm_ilookup (SCM_CAR (x), env);
SCM_ASRTGO (SCM_NIMP (proc), badfun); SCM_ASRTGO (SCM_NIMP (proc), badfun);
#ifndef RECKLESS #ifndef SCM_RECKLESS
#ifdef CAUTIOUS #ifdef SCM_CAUTIOUS
goto checkargs; goto checkargs;
#endif #endif
#endif #endif
@ -2030,8 +2030,8 @@ dispatch:
case scm_tcs_cons_gloc: case scm_tcs_cons_gloc:
proc = SCM_GLOC_VAL (SCM_CAR (x)); proc = SCM_GLOC_VAL (SCM_CAR (x));
SCM_ASRTGO (SCM_NIMP (proc), badfun); SCM_ASRTGO (SCM_NIMP (proc), badfun);
#ifndef RECKLESS #ifndef SCM_RECKLESS
#ifdef CAUTIOUS #ifdef SCM_CAUTIOUS
goto checkargs; goto checkargs;
#endif #endif
#endif #endif
@ -2111,8 +2111,8 @@ dispatch:
else else
proc = SCM_CEVAL (SCM_CAR (x), env); proc = SCM_CEVAL (SCM_CAR (x), env);
SCM_ASRTGO (SCM_NIMP (proc), badfun); SCM_ASRTGO (SCM_NIMP (proc), badfun);
#ifndef RECKLESS #ifndef SCM_RECKLESS
#ifdef CAUTIOUS #ifdef SCM_CAUTIOUS
checkargs: checkargs:
#endif #endif
if (SCM_CLOSUREP (proc)) if (SCM_CLOSUREP (proc))
@ -2210,7 +2210,7 @@ evapply:
/* must handle macros by here */ /* must handle macros by here */
x = SCM_CDR (x); x = SCM_CDR (x);
#ifdef CAUTIOUS #ifdef SCM_CAUTIOUS
if (SCM_IMP (x)) if (SCM_IMP (x))
goto wrongnumargs; goto wrongnumargs;
else if (SCM_CONSP (x)) else if (SCM_CONSP (x))
@ -2346,7 +2346,7 @@ evapply:
goto badfun; goto badfun;
} }
} }
#ifdef CAUTIOUS #ifdef SCM_CAUTIOUS
if (SCM_IMP (x)) if (SCM_IMP (x))
goto wrongnumargs; goto wrongnumargs;
else if (SCM_CONSP (x)) else if (SCM_CONSP (x))
@ -2462,7 +2462,7 @@ evapply:
goto cdrxbegin; goto cdrxbegin;
} }
} }
#ifdef CAUTIOUS #ifdef SCM_CAUTIOUS
if (SCM_IMP (x) || SCM_NECONSP (x)) if (SCM_IMP (x) || SCM_NECONSP (x))
goto wrongnumargs; goto wrongnumargs;
#endif #endif
@ -2944,7 +2944,7 @@ tail:
#else #else
arg1 = (SCM_UNBNDP (arg1) ? SCM_EOL : scm_cons (arg1, args)); arg1 = (SCM_UNBNDP (arg1) ? SCM_EOL : scm_cons (arg1, args));
#endif #endif
#ifndef RECKLESS #ifndef SCM_RECKLESS
if (scm_badargsp (SCM_CAR (SCM_CODE (proc)), arg1)) if (scm_badargsp (SCM_CAR (SCM_CODE (proc)), arg1))
goto wrongnumargs; goto wrongnumargs;
#endif #endif
@ -3085,7 +3085,7 @@ scm_map (proc, arg1, args)
} }
args = scm_vector (scm_cons (arg1, args)); args = scm_vector (scm_cons (arg1, args));
ve = SCM_VELTS (args); ve = SCM_VELTS (args);
#ifndef RECKLESS #ifndef SCM_RECKLESS
for (i = SCM_LENGTH (args) - 1; i >= 0; i--) for (i = SCM_LENGTH (args) - 1; i >= 0; i--)
SCM_ASSERT (SCM_NIMP (ve[i]) && SCM_CONSP (ve[i]), args, SCM_ARG2, s_map); SCM_ASSERT (SCM_NIMP (ve[i]) && SCM_CONSP (ve[i]), args, SCM_ARG2, s_map);
#endif #endif
@ -3130,7 +3130,7 @@ scm_for_each (proc, arg1, args)
} }
args = scm_vector (scm_cons (arg1, args)); args = scm_vector (scm_cons (arg1, args));
ve = SCM_VELTS (args); ve = SCM_VELTS (args);
#ifndef RECKLESS #ifndef SCM_RECKLESS
for (i = SCM_LENGTH (args) - 1; i >= 0; i--) for (i = SCM_LENGTH (args) - 1; i >= 0; i--)
SCM_ASSERT (SCM_NIMP (ve[i]) && SCM_CONSP (ve[i]), args, SCM_ARG2, s_for_each); SCM_ASSERT (SCM_NIMP (ve[i]) && SCM_CONSP (ve[i]), args, SCM_ARG2, s_for_each);
#endif #endif

View file

@ -94,7 +94,7 @@ void
scm_init_feature() scm_init_feature()
{ {
scm_loc_features = SCM_CDRLOC (scm_sysintern ("*features*", SCM_EOL)); scm_loc_features = SCM_CDRLOC (scm_sysintern ("*features*", SCM_EOL));
#ifdef RECKLESS #ifdef SCM_RECKLESS
scm_add_feature("reckless"); scm_add_feature("reckless");
#endif #endif
#ifndef _Windows #ifndef _Windows

View file

@ -122,7 +122,7 @@ scm_gsubr_apply(args)
#endif #endif
args = SCM_CDR(args); args = SCM_CDR(args);
for (i = 0; i < SCM_GSUBR_REQ(typ); i++) { for (i = 0; i < SCM_GSUBR_REQ(typ); i++) {
#ifndef RECKLESS #ifndef SCM_RECKLESS
if (SCM_IMP(args)) if (SCM_IMP(args))
wnargs: scm_wrong_num_args (SCM_SNAME(SCM_GSUBR_PROC(self))); wnargs: scm_wrong_num_args (SCM_SNAME(SCM_GSUBR_PROC(self)));
#endif #endif

View file

@ -198,7 +198,7 @@ scm_quotient(x, y)
#endif #endif
} }
if SCM_NINUMP(y) { if SCM_NINUMP(y) {
# ifndef RECKLESS # ifndef SCM_RECKLESS
if (!(SCM_NIMP(y) && SCM_BIGP(y))) if (!(SCM_NIMP(y) && SCM_BIGP(y)))
bady: scm_wta(y, (char *)SCM_ARG2, s_quotient); bady: scm_wta(y, (char *)SCM_ARG2, s_quotient);
# endif # endif
@ -254,7 +254,7 @@ scm_remainder(x, y)
return scm_divbigint(x, z, SCM_BIGSIGN(x), 0); return scm_divbigint(x, z, SCM_BIGSIGN(x), 0);
} }
if SCM_NINUMP(y) { if SCM_NINUMP(y) {
# ifndef RECKLESS # ifndef SCM_RECKLESS
if (!(SCM_NIMP(y) && SCM_BIGP(y))) if (!(SCM_NIMP(y) && SCM_BIGP(y)))
bady: scm_wta(y, (char *)SCM_ARG2, s_remainder); bady: scm_wta(y, (char *)SCM_ARG2, s_remainder);
# endif # endif
@ -300,7 +300,7 @@ scm_modulo(x, y)
return scm_divbigint(x, z, y < 0, (SCM_BIGSIGN(x) ? (y > 0) : (y < 0)) ? 1 : 0); return scm_divbigint(x, z, y < 0, (SCM_BIGSIGN(x) ? (y > 0) : (y < 0)) ? 1 : 0);
} }
if SCM_NINUMP(y) { if SCM_NINUMP(y) {
# ifndef RECKLESS # ifndef SCM_RECKLESS
if (!(SCM_NIMP(y) && SCM_BIGP(y))) if (!(SCM_NIMP(y) && SCM_BIGP(y)))
bady: scm_wta(y, (char *)SCM_ARG2, s_modulo); bady: scm_wta(y, (char *)SCM_ARG2, s_modulo);
# endif # endif
@ -1439,7 +1439,7 @@ scm_number_to_string(x, radix)
# ifdef SCM_BIGDIG # ifdef SCM_BIGDIG
SCM_ASRTGO(SCM_NIMP(x), badx); SCM_ASRTGO(SCM_NIMP(x), badx);
if SCM_BIGP(x) return big2str(x, (unsigned int)SCM_INUM(radix)); if SCM_BIGP(x) return big2str(x, (unsigned int)SCM_INUM(radix));
# ifndef RECKLESS # ifndef SCM_RECKLESS
if (!(SCM_INEXP(x))) if (!(SCM_INEXP(x)))
badx: scm_wta(x, (char *)SCM_ARG1, s_number_to_string); badx: scm_wta(x, (char *)SCM_ARG1, s_number_to_string);
# endif # endif
@ -2034,7 +2034,7 @@ scm_num_eq_p (x, y)
SCM t; SCM t;
if SCM_NINUMP(x) { if SCM_NINUMP(x) {
# ifdef SCM_BIGDIG # ifdef SCM_BIGDIG
# ifndef RECKLESS # ifndef SCM_RECKLESS
if (!(SCM_NIMP(x))) if (!(SCM_NIMP(x)))
badx: scm_wta(x, (char *)SCM_ARG1, s_eq_p); badx: scm_wta(x, (char *)SCM_ARG1, s_eq_p);
# endif # endif
@ -2067,12 +2067,12 @@ scm_num_eq_p (x, y)
# ifdef SCM_BIGDIG # ifdef SCM_BIGDIG
SCM_ASRTGO(SCM_NIMP(y), bady); SCM_ASRTGO(SCM_NIMP(y), bady);
if SCM_BIGP(y) return SCM_BOOL_F; if SCM_BIGP(y) return SCM_BOOL_F;
# ifndef RECKLESS # ifndef SCM_RECKLESS
if (!(SCM_INEXP(y))) if (!(SCM_INEXP(y)))
bady: scm_wta(y, (char *)SCM_ARG2, s_eq_p); bady: scm_wta(y, (char *)SCM_ARG2, s_eq_p);
# endif # endif
# else # else
# ifndef RECKLESS # ifndef SCM_RECKLESS
if (!(SCM_NIMP(y) && SCM_INEXP(y))) if (!(SCM_NIMP(y) && SCM_INEXP(y)))
bady: scm_wta(y, (char *)SCM_ARG2, s_eq_p); bady: scm_wta(y, (char *)SCM_ARG2, s_eq_p);
# endif # endif
@ -2089,7 +2089,7 @@ scm_num_eq_p (x, y)
return (0==scm_bigcomp(x, y)) ? SCM_BOOL_T : SCM_BOOL_F; return (0==scm_bigcomp(x, y)) ? SCM_BOOL_T : SCM_BOOL_F;
} }
if SCM_NINUMP(y) { if SCM_NINUMP(y) {
# ifndef RECKLESS # ifndef SCM_RECKLESS
if (!(SCM_NIMP(y) && SCM_BIGP(y))) if (!(SCM_NIMP(y) && SCM_BIGP(y)))
bady: scm_wta(y, (char *)SCM_ARG2, s_eq_p); bady: scm_wta(y, (char *)SCM_ARG2, s_eq_p);
# endif # endif
@ -2115,7 +2115,7 @@ scm_less_p(x, y)
#ifdef SCM_FLOATS #ifdef SCM_FLOATS
if SCM_NINUMP(x) { if SCM_NINUMP(x) {
# ifdef SCM_BIGDIG # ifdef SCM_BIGDIG
# ifndef RECKLESS # ifndef SCM_RECKLESS
if (!(SCM_NIMP(x))) if (!(SCM_NIMP(x)))
badx: scm_wta(x, (char *)SCM_ARG1, s_less_p); badx: scm_wta(x, (char *)SCM_ARG1, s_less_p);
# endif # endif
@ -2145,12 +2145,12 @@ scm_less_p(x, y)
# ifdef SCM_BIGDIG # ifdef SCM_BIGDIG
SCM_ASRTGO(SCM_NIMP(y), bady); SCM_ASRTGO(SCM_NIMP(y), bady);
if SCM_BIGP(y) return SCM_BIGSIGN(y) ? SCM_BOOL_F : SCM_BOOL_T; if SCM_BIGP(y) return SCM_BIGSIGN(y) ? SCM_BOOL_F : SCM_BOOL_T;
# ifndef RECKLESS # ifndef SCM_RECKLESS
if (!(SCM_REALP(y))) if (!(SCM_REALP(y)))
bady: scm_wta(y, (char *)SCM_ARG2, s_less_p); bady: scm_wta(y, (char *)SCM_ARG2, s_less_p);
# endif # endif
# else # else
# ifndef RECKLESS # ifndef SCM_RECKLESS
if (!(SCM_NIMP(y) && SCM_REALP(y))) if (!(SCM_NIMP(y) && SCM_REALP(y)))
bady: scm_wta(y, (char *)SCM_ARG2, s_less_p); bady: scm_wta(y, (char *)SCM_ARG2, s_less_p);
# endif # endif
@ -2166,7 +2166,7 @@ scm_less_p(x, y)
return (1==scm_bigcomp(x, y)) ? SCM_BOOL_T : SCM_BOOL_F; return (1==scm_bigcomp(x, y)) ? SCM_BOOL_T : SCM_BOOL_F;
} }
if SCM_NINUMP(y) { if SCM_NINUMP(y) {
# ifndef RECKLESS # ifndef SCM_RECKLESS
if (!(SCM_NIMP(y) && SCM_BIGP(y))) if (!(SCM_NIMP(y) && SCM_BIGP(y)))
bady: scm_wta(y, (char *)SCM_ARG2, s_less_p); bady: scm_wta(y, (char *)SCM_ARG2, s_less_p);
# endif # endif
@ -2228,7 +2228,7 @@ scm_zero_p(z)
# ifdef SCM_BIGDIG # ifdef SCM_BIGDIG
SCM_ASRTGO(SCM_NIMP(z), badz); SCM_ASRTGO(SCM_NIMP(z), badz);
if SCM_BIGP(z) return SCM_BOOL_F; if SCM_BIGP(z) return SCM_BOOL_F;
# ifndef RECKLESS # ifndef SCM_RECKLESS
if (!(SCM_INEXP(z))) if (!(SCM_INEXP(z)))
badz: scm_wta(z, (char *)SCM_ARG1, s_zero_p); badz: scm_wta(z, (char *)SCM_ARG1, s_zero_p);
# endif # endif
@ -2263,7 +2263,7 @@ scm_positive_p(x)
# ifdef SCM_BIGDIG # ifdef SCM_BIGDIG
SCM_ASRTGO(SCM_NIMP(x), badx); SCM_ASRTGO(SCM_NIMP(x), badx);
if SCM_BIGP(x) return SCM_TYP16(x)==scm_tc16_bigpos ? SCM_BOOL_T : SCM_BOOL_F; if SCM_BIGP(x) return SCM_TYP16(x)==scm_tc16_bigpos ? SCM_BOOL_T : SCM_BOOL_F;
# ifndef RECKLESS # ifndef SCM_RECKLESS
if (!(SCM_REALP(x))) if (!(SCM_REALP(x)))
badx: scm_wta(x, (char *)SCM_ARG1, s_positive_p); badx: scm_wta(x, (char *)SCM_ARG1, s_positive_p);
# endif # endif
@ -2298,7 +2298,7 @@ scm_negative_p(x)
# ifdef SCM_BIGDIG # ifdef SCM_BIGDIG
SCM_ASRTGO(SCM_NIMP(x), badx); SCM_ASRTGO(SCM_NIMP(x), badx);
if SCM_BIGP(x) return SCM_TYP16(x)==scm_tc16_bigpos ? SCM_BOOL_F : SCM_BOOL_T; if SCM_BIGP(x) return SCM_TYP16(x)==scm_tc16_bigpos ? SCM_BOOL_F : SCM_BOOL_T;
# ifndef RECKLESS # ifndef SCM_RECKLESS
if (!(SCM_REALP(x))) if (!(SCM_REALP(x)))
badx: scm_wta(x, (char *)SCM_ARG1, s_negative_p); badx: scm_wta(x, (char *)SCM_ARG1, s_negative_p);
# endif # endif
@ -2332,7 +2332,7 @@ scm_max(x, y)
double z; double z;
#endif #endif
if SCM_UNBNDP(y) { if SCM_UNBNDP(y) {
#ifndef RECKLESS #ifndef SCM_RECKLESS
if (!(SCM_NUMBERP(x))) if (!(SCM_NUMBERP(x)))
badx: scm_wta(x, (char *)SCM_ARG1, s_max); badx: scm_wta(x, (char *)SCM_ARG1, s_max);
#endif #endif
@ -2370,12 +2370,12 @@ scm_max(x, y)
# ifdef SCM_BIGDIG # ifdef SCM_BIGDIG
SCM_ASRTGO(SCM_NIMP(y), bady); SCM_ASRTGO(SCM_NIMP(y), bady);
if SCM_BIGP(y) return SCM_BIGSIGN(y) ? x : y; if SCM_BIGP(y) return SCM_BIGSIGN(y) ? x : y;
# ifndef RECKLESS # ifndef SCM_RECKLESS
if (!(SCM_REALP(y))) if (!(SCM_REALP(y)))
bady: scm_wta(y, (char *)SCM_ARG2, s_max); bady: scm_wta(y, (char *)SCM_ARG2, s_max);
# endif # endif
# else # else
# ifndef RECKLESS # ifndef SCM_RECKLESS
if (!(SCM_NIMP(y) && SCM_REALP(y))) if (!(SCM_NIMP(y) && SCM_REALP(y)))
bady: scm_wta(y, (char *)SCM_ARG2, s_max); bady: scm_wta(y, (char *)SCM_ARG2, s_max);
# endif # endif
@ -2391,7 +2391,7 @@ scm_max(x, y)
return (1==scm_bigcomp(x, y)) ? y : x; return (1==scm_bigcomp(x, y)) ? y : x;
} }
if SCM_NINUMP(y) { if SCM_NINUMP(y) {
# ifndef RECKLESS # ifndef SCM_RECKLESS
if (!(SCM_NIMP(y) && SCM_BIGP(y))) if (!(SCM_NIMP(y) && SCM_BIGP(y)))
bady: scm_wta(y, (char *)SCM_ARG2, s_max); bady: scm_wta(y, (char *)SCM_ARG2, s_max);
# endif # endif
@ -2419,7 +2419,7 @@ scm_min(x, y)
double z; double z;
#endif #endif
if SCM_UNBNDP(y) { if SCM_UNBNDP(y) {
#ifndef RECKLESS #ifndef SCM_RECKLESS
if (!(SCM_NUMBERP(x))) if (!(SCM_NUMBERP(x)))
badx:scm_wta(x, (char *)SCM_ARG1, s_min); badx:scm_wta(x, (char *)SCM_ARG1, s_min);
#endif #endif
@ -2455,12 +2455,12 @@ scm_min(x, y)
# ifdef SCM_BIGDIG # ifdef SCM_BIGDIG
SCM_ASRTGO(SCM_NIMP(y), bady); SCM_ASRTGO(SCM_NIMP(y), bady);
if SCM_BIGP(y) return SCM_BIGSIGN(y) ? y : x; if SCM_BIGP(y) return SCM_BIGSIGN(y) ? y : x;
# ifndef RECKLESS # ifndef SCM_RECKLESS
if (!(SCM_REALP(y))) if (!(SCM_REALP(y)))
bady: scm_wta(y, (char *)SCM_ARG2, s_min); bady: scm_wta(y, (char *)SCM_ARG2, s_min);
# endif # endif
# else # else
# ifndef RECKLESS # ifndef SCM_RECKLESS
if (!(SCM_NIMP(y) && SCM_REALP(y))) if (!(SCM_NIMP(y) && SCM_REALP(y)))
bady: scm_wta(y, (char *)SCM_ARG2, s_min); bady: scm_wta(y, (char *)SCM_ARG2, s_min);
# endif # endif
@ -2476,7 +2476,7 @@ scm_min(x, y)
return (-1==scm_bigcomp(x, y)) ? y : x; return (-1==scm_bigcomp(x, y)) ? y : x;
} }
if SCM_NINUMP(y) { if SCM_NINUMP(y) {
# ifndef RECKLESS # ifndef SCM_RECKLESS
if (!(SCM_NIMP(y) && SCM_BIGP(y))) if (!(SCM_NIMP(y) && SCM_BIGP(y)))
bady: scm_wta(y, (char *)SCM_ARG2, s_min); bady: scm_wta(y, (char *)SCM_ARG2, s_min);
# endif # endif
@ -2502,7 +2502,7 @@ scm_sum(x, y)
{ {
if SCM_UNBNDP(y) { if SCM_UNBNDP(y) {
if SCM_UNBNDP(x) return SCM_INUM0; if SCM_UNBNDP(x) return SCM_INUM0;
#ifndef RECKLESS #ifndef SCM_RECKLESS
if (!(SCM_NUMBERP(x))) if (!(SCM_NUMBERP(x)))
badx: scm_wta(x, (char *)SCM_ARG1, s_sum); badx: scm_wta(x, (char *)SCM_ARG1, s_sum);
#endif #endif
@ -2531,12 +2531,12 @@ scm_sum(x, y)
# ifdef SCM_BIGDIG # ifdef SCM_BIGDIG
SCM_ASRTGO(SCM_NIMP(y), bady); SCM_ASRTGO(SCM_NIMP(y), bady);
if SCM_BIGP(y) {t = x; x = y; y = t; goto bigreal;} if SCM_BIGP(y) {t = x; x = y; y = t; goto bigreal;}
# ifndef RECKLESS # ifndef SCM_RECKLESS
else if (!(SCM_INEXP(y))) else if (!(SCM_INEXP(y)))
bady: scm_wta(y, (char *)SCM_ARG2, s_sum); bady: scm_wta(y, (char *)SCM_ARG2, s_sum);
# endif # endif
# else # else
# ifndef RECKLESS # ifndef SCM_RECKLESS
if (!(SCM_NIMP(y) && SCM_INEXP(y))) if (!(SCM_NIMP(y) && SCM_INEXP(y)))
bady: scm_wta(y, (char *)SCM_ARG2, s_sum); bady: scm_wta(y, (char *)SCM_ARG2, s_sum);
# endif # endif
@ -2577,7 +2577,7 @@ scm_sum(x, y)
return scm_addbig(SCM_BDIGITS(x), SCM_NUMDIGS(x), SCM_BIGSIGN(x), y, 0); return scm_addbig(SCM_BDIGITS(x), SCM_NUMDIGS(x), SCM_BIGSIGN(x), y, 0);
} }
if SCM_NINUMP(y) { if SCM_NINUMP(y) {
# ifndef RECKLESS # ifndef SCM_RECKLESS
if (!(SCM_NIMP(y) && SCM_BIGP(y))) if (!(SCM_NIMP(y) && SCM_BIGP(y)))
bady: scm_wta(y, (char *)SCM_ARG2, s_sum); bady: scm_wta(y, (char *)SCM_ARG2, s_sum);
# endif # endif
@ -2623,7 +2623,7 @@ scm_difference(x, y)
{ {
#ifdef SCM_FLOATS #ifdef SCM_FLOATS
if SCM_NINUMP(x) { if SCM_NINUMP(x) {
# ifndef RECKLESS # ifndef SCM_RECKLESS
if (!(SCM_NIMP(x))) if (!(SCM_NIMP(x)))
badx: scm_wta(x, (char *)SCM_ARG1, s_difference); badx: scm_wta(x, (char *)SCM_ARG1, s_difference);
# endif # endif
@ -2680,12 +2680,12 @@ scm_difference(x, y)
return scm_addbig(zdigs, SCM_DIGSPERLONG, (x < 0) ? 0x0100 : 0, y, 0x0100); return scm_addbig(zdigs, SCM_DIGSPERLONG, (x < 0) ? 0x0100 : 0, y, 0x0100);
# endif # endif
} }
# ifndef RECKLESS # ifndef SCM_RECKLESS
if (!(SCM_INEXP(y))) if (!(SCM_INEXP(y)))
bady: scm_wta(y, (char *)SCM_ARG2, s_difference); bady: scm_wta(y, (char *)SCM_ARG2, s_difference);
# endif # endif
# else # else
# ifndef RECKLESS # ifndef SCM_RECKLESS
if (!(SCM_NIMP(y) && SCM_INEXP(y))) if (!(SCM_NIMP(y) && SCM_INEXP(y)))
bady: scm_wta(y, (char *)SCM_ARG2, s_difference); bady: scm_wta(y, (char *)SCM_ARG2, s_difference);
# endif # endif
@ -2718,7 +2718,7 @@ scm_difference(x, y)
} }
if SCM_UNBNDP(y) {x = -SCM_INUM(x); goto checkx;} if SCM_UNBNDP(y) {x = -SCM_INUM(x); goto checkx;}
if SCM_NINUMP(y) { if SCM_NINUMP(y) {
# ifndef RECKLESS # ifndef SCM_RECKLESS
if (!(SCM_NIMP(y) && SCM_BIGP(y))) if (!(SCM_NIMP(y) && SCM_BIGP(y)))
bady: scm_wta(y, (char *)SCM_ARG2, s_difference); bady: scm_wta(y, (char *)SCM_ARG2, s_difference);
# endif # endif
@ -2766,7 +2766,7 @@ scm_product(x, y)
{ {
if SCM_UNBNDP(y) { if SCM_UNBNDP(y) {
if SCM_UNBNDP(x) return SCM_MAKINUM(1L); if SCM_UNBNDP(x) return SCM_MAKINUM(1L);
#ifndef RECKLESS #ifndef SCM_RECKLESS
if (!(SCM_NUMBERP(x))) if (!(SCM_NUMBERP(x)))
badx: scm_wta(x, (char *)SCM_ARG1, s_product); badx: scm_wta(x, (char *)SCM_ARG1, s_product);
#endif #endif
@ -2795,12 +2795,12 @@ scm_product(x, y)
# ifdef SCM_BIGDIG # ifdef SCM_BIGDIG
SCM_ASRTGO(SCM_NIMP(y), bady); SCM_ASRTGO(SCM_NIMP(y), bady);
if SCM_BIGP(y) {t = x; x = y; y = t; goto bigreal;} if SCM_BIGP(y) {t = x; x = y; y = t; goto bigreal;}
# ifndef RECKLESS # ifndef SCM_RECKLESS
else if (!(SCM_INEXP(y))) else if (!(SCM_INEXP(y)))
bady: scm_wta(y, (char *)SCM_ARG2, s_product); bady: scm_wta(y, (char *)SCM_ARG2, s_product);
# endif # endif
# else # else
# ifndef RECKLESS # ifndef SCM_RECKLESS
if (!(SCM_NIMP(y) && SCM_INEXP(y))) if (!(SCM_NIMP(y) && SCM_INEXP(y)))
bady: scm_wta(y, (char *)SCM_ARG2, s_product); bady: scm_wta(y, (char *)SCM_ARG2, s_product);
# endif # endif
@ -2853,7 +2853,7 @@ scm_product(x, y)
SCM_BIGSIGN(x) ^ SCM_BIGSIGN(y)); SCM_BIGSIGN(x) ^ SCM_BIGSIGN(y));
} }
if SCM_NINUMP(y) { if SCM_NINUMP(y) {
# ifndef RECKLESS # ifndef SCM_RECKLESS
if (!(SCM_NIMP(y) && SCM_BIGP(y))) if (!(SCM_NIMP(y) && SCM_BIGP(y)))
bady: scm_wta(y, (char *)SCM_ARG2, s_product); bady: scm_wta(y, (char *)SCM_ARG2, s_product);
# endif # endif
@ -2942,7 +2942,7 @@ scm_divide(x, y)
#ifdef SCM_FLOATS #ifdef SCM_FLOATS
double d, r, i, a; double d, r, i, a;
if SCM_NINUMP(x) { if SCM_NINUMP(x) {
# ifndef RECKLESS # ifndef SCM_RECKLESS
if (!(SCM_NIMP(x))) if (!(SCM_NIMP(x)))
badx: scm_wta(x, (char *)SCM_ARG1, s_divide); badx: scm_wta(x, (char *)SCM_ARG1, s_divide);
# endif # endif
@ -2960,7 +2960,7 @@ scm_divide(x, y)
SCM z; SCM z;
if SCM_INUMP(y) { if SCM_INUMP(y) {
z = SCM_INUM(y); z = SCM_INUM(y);
#ifndef RECKLESS #ifndef SCM_RECKLESS
if (!z) if (!z)
scm_num_overflow (s_divide); scm_num_overflow (s_divide);
#endif #endif
@ -3021,12 +3021,12 @@ scm_divide(x, y)
# ifdef SCM_BIGDIG # ifdef SCM_BIGDIG
SCM_ASRTGO(SCM_NIMP(y), bady); SCM_ASRTGO(SCM_NIMP(y), bady);
if SCM_BIGP(y) return scm_makdbl(SCM_INUM(x)/scm_big2dbl(y), 0.0); if SCM_BIGP(y) return scm_makdbl(SCM_INUM(x)/scm_big2dbl(y), 0.0);
# ifndef RECKLESS # ifndef SCM_RECKLESS
if (!(SCM_INEXP(y))) if (!(SCM_INEXP(y)))
bady: scm_wta(y, (char *)SCM_ARG2, s_divide); bady: scm_wta(y, (char *)SCM_ARG2, s_divide);
# endif # endif
# else # else
# ifndef RECKLESS # ifndef SCM_RECKLESS
if (!(SCM_NIMP(y) && SCM_INEXP(y))) if (!(SCM_NIMP(y) && SCM_INEXP(y)))
bady: scm_wta(y, (char *)SCM_ARG2, s_divide); bady: scm_wta(y, (char *)SCM_ARG2, s_divide);
# endif # endif
@ -3077,7 +3077,7 @@ scm_divide(x, y)
goto ov; goto ov;
} }
if SCM_NINUMP(y) { if SCM_NINUMP(y) {
# ifndef RECKLESS # ifndef SCM_RECKLESS
if (!(SCM_NIMP(y) && SCM_BIGP(y))) if (!(SCM_NIMP(y) && SCM_BIGP(y)))
bady: scm_wta(y, (char *)SCM_ARG2, s_divide); bady: scm_wta(y, (char *)SCM_ARG2, s_divide);
# endif # endif
@ -3218,7 +3218,7 @@ scm_two_doubles(z1, z2, sstring, xy)
SCM_ASRTGO(SCM_NIMP(z1), badz1); SCM_ASRTGO(SCM_NIMP(z1), badz1);
if SCM_BIGP(z1) xy->x = scm_big2dbl(z1); if SCM_BIGP(z1) xy->x = scm_big2dbl(z1);
else { else {
# ifndef RECKLESS # ifndef SCM_RECKLESS
if (!(SCM_REALP(z1))) if (!(SCM_REALP(z1)))
badz1: scm_wta(z1, (char *)SCM_ARG1, sstring); badz1: scm_wta(z1, (char *)SCM_ARG1, sstring);
# endif # endif
@ -3234,7 +3234,7 @@ scm_two_doubles(z1, z2, sstring, xy)
SCM_ASRTGO(SCM_NIMP(z2), badz2); SCM_ASRTGO(SCM_NIMP(z2), badz2);
if SCM_BIGP(z2) xy->y = scm_big2dbl(z2); if SCM_BIGP(z2) xy->y = scm_big2dbl(z2);
else { else {
# ifndef RECKLESS # ifndef SCM_RECKLESS
if (!(SCM_REALP(z2))) if (!(SCM_REALP(z2)))
badz2: scm_wta(z2, (char *)SCM_ARG2, sstring); badz2: scm_wta(z2, (char *)SCM_ARG2, sstring);
# endif # endif
@ -3316,7 +3316,7 @@ scm_real_part(z)
# ifdef SCM_BIGDIG # ifdef SCM_BIGDIG
SCM_ASRTGO(SCM_NIMP(z), badz); SCM_ASRTGO(SCM_NIMP(z), badz);
if SCM_BIGP(z) return z; if SCM_BIGP(z) return z;
# ifndef RECKLESS # ifndef SCM_RECKLESS
if (!(SCM_INEXP(z))) if (!(SCM_INEXP(z)))
badz: scm_wta(z, (char *)SCM_ARG1, s_real_part); badz: scm_wta(z, (char *)SCM_ARG1, s_real_part);
# endif # endif
@ -3340,7 +3340,7 @@ scm_imag_part(z)
# ifdef SCM_BIGDIG # ifdef SCM_BIGDIG
SCM_ASRTGO(SCM_NIMP(z), badz); SCM_ASRTGO(SCM_NIMP(z), badz);
if SCM_BIGP(z) return SCM_INUM0; if SCM_BIGP(z) return SCM_INUM0;
# ifndef RECKLESS # ifndef SCM_RECKLESS
if (!(SCM_INEXP(z))) if (!(SCM_INEXP(z)))
badz: scm_wta(z, (char *)SCM_ARG1, s_imag_part); badz: scm_wta(z, (char *)SCM_ARG1, s_imag_part);
# endif # endif
@ -3363,7 +3363,7 @@ scm_magnitude(z)
# ifdef SCM_BIGDIG # ifdef SCM_BIGDIG
SCM_ASRTGO(SCM_NIMP(z), badz); SCM_ASRTGO(SCM_NIMP(z), badz);
if SCM_BIGP(z) return scm_abs(z); if SCM_BIGP(z) return scm_abs(z);
# ifndef RECKLESS # ifndef SCM_RECKLESS
if (!(SCM_INEXP(z))) if (!(SCM_INEXP(z)))
badz: scm_wta(z, (char *)SCM_ARG1, s_magnitude); badz: scm_wta(z, (char *)SCM_ARG1, s_magnitude);
# endif # endif
@ -3392,7 +3392,7 @@ scm_angle(z)
# ifdef SCM_BIGDIG # ifdef SCM_BIGDIG
SCM_ASRTGO(SCM_NIMP(z), badz); SCM_ASRTGO(SCM_NIMP(z), badz);
if SCM_BIGP(z) {x = (SCM_TYP16(z)==scm_tc16_bigpos) ? 1.0 : -1.0; goto do_angle;} if SCM_BIGP(z) {x = (SCM_TYP16(z)==scm_tc16_bigpos) ? 1.0 : -1.0; goto do_angle;}
# ifndef RECKLESS # ifndef SCM_RECKLESS
if (!(SCM_INEXP(z))) { if (!(SCM_INEXP(z))) {
badz: scm_wta(z, (char *)SCM_ARG1, s_angle);} badz: scm_wta(z, (char *)SCM_ARG1, s_angle);}
# endif # endif
@ -3420,7 +3420,7 @@ scm_inexact_to_exact(z)
# ifdef SCM_BIGDIG # ifdef SCM_BIGDIG
SCM_ASRTGO(SCM_NIMP(z), badz); SCM_ASRTGO(SCM_NIMP(z), badz);
if SCM_BIGP(z) return z; if SCM_BIGP(z) return z;
# ifndef RECKLESS # ifndef SCM_RECKLESS
if (!(SCM_REALP(z))) if (!(SCM_REALP(z)))
badz: scm_wta(z, (char *)SCM_ARG1, s_inexact_to_exact); badz: scm_wta(z, (char *)SCM_ARG1, s_inexact_to_exact);
# endif # endif
@ -3482,7 +3482,7 @@ scm_dbl2big(d)
u -= c; u -= c;
digits[i] = c; digits[i] = c;
} }
#ifndef RECKLESS #ifndef SCM_RECKLESS
if (u != 0) if (u != 0)
scm_num_overflow ("dbl2big"); scm_num_overflow ("dbl2big");
#endif #endif

View file

@ -188,7 +188,7 @@ scm_options (new_mode, options, n, s)
flags[i] = SCM_CAR (new_mode); flags[i] = SCM_CAR (new_mode);
goto cont; goto cont;
} }
#ifndef RECKLESS #ifndef SCM_RECKLESS
scm_must_free ((char *) flags); scm_must_free ((char *) flags);
scm_wta (SCM_CAR (new_mode), "Unknown mode flag", s); scm_wta (SCM_CAR (new_mode), "Unknown mode flag", s);
#endif #endif