[uim-commit] r1277 - branches/r5rs/sigscheme
kzk at freedesktop.org
kzk at freedesktop.org
Mon Aug 22 02:00:16 PDT 2005
Author: kzk
Date: 2005-08-22 02:00:08 -0700 (Mon, 22 Aug 2005)
New Revision: 1277
Modified:
branches/r5rs/sigscheme/datas.c
branches/r5rs/sigscheme/eval.c
branches/r5rs/sigscheme/io.c
branches/r5rs/sigscheme/operations-srfi1.c
branches/r5rs/sigscheme/operations.c
branches/r5rs/sigscheme/sigschemetype.h
Log:
* introduce SCM_NFALSEP
* change EQ(obj, SCM_FALSE) to SCM_FALSEP(obj)
* change !EQ(obj, SCM_FALSE) to SCM_NFALSEP(obj)
* sigscheme/operations-srfi1.c
* sigscheme/io.c
* sigscheme/sigschemetype.h
* sigscheme/operations.c
* sigscheme/eval.c
* sigscheme/datas.c
- change EQ(obj, SCM_FALSE) to SCM_FALSEP(obj)
- change !EQ(obj, SCM_FALSE) to SCM_NFALSEP(obj)
Modified: branches/r5rs/sigscheme/datas.c
===================================================================
--- branches/r5rs/sigscheme/datas.c 2005-08-22 08:35:10 UTC (rev 1276)
+++ branches/r5rs/sigscheme/datas.c 2005-08-22 09:00:08 UTC (rev 1277)
@@ -862,7 +862,7 @@
int Scm_GetInt(ScmObj num)
{
- if (EQ(ScmOp_numberp(num), SCM_FALSE))
+ if (SCM_FALSEP(ScmOp_numberp(num)))
SigScm_ErrorObj("Scm_GetInt : number required but got ", num);
return SCM_INT_VALUE(num);
Modified: branches/r5rs/sigscheme/eval.c
===================================================================
--- branches/r5rs/sigscheme/eval.c 2005-08-22 08:35:10 UTC (rev 1276)
+++ branches/r5rs/sigscheme/eval.c 2005-08-22 09:00:08 UTC (rev 1277)
@@ -998,8 +998,8 @@
/* eval predicates */
pred = ScmOp_eval(SCM_CAR(exp), env);
- /* if pred is SCM_TRUE */
- if (!EQ(pred, SCM_FALSE)) {
+ /* if pred is true value */
+ if (SCM_NFALSEP(pred)) {
/* doesn't evaluate now for tail-recursion. */
return SCM_CAR(SCM_CDR(exp));
}
@@ -1034,7 +1034,7 @@
* not found in the environment
* if symbol is not bounded, error occurs
*/
- if (EQ(ScmOp_symbol_boundp(sym), SCM_FALSE))
+ if (SCM_FALSEP(ScmOp_symbol_boundp(sym)))
SigScm_ErrorObj("set! : unbound variable ", sym);
SCM_SETSYMBOL_VCELL(sym, ret);
@@ -1089,7 +1089,7 @@
test = ScmOp_eval(test, env);
/* check the result */
- if (!SCM_EQ(test, SCM_FALSE)) {
+ if (SCM_NFALSEP(test)) {
/*
* if the selected <clause> contains only the <test> and no <expression>s,
* then the value of the <test> is returned as the result.
@@ -1105,7 +1105,7 @@
*/
if (SCM_EQ(Scm_Intern("=>"), SCM_CAR(exps))) {
proc = ScmOp_eval(SCM_CAR(SCM_CDR(exps)), env);
- if (EQ(ScmOp_procedurep(proc), SCM_FALSE))
+ if (SCM_FALSEP(ScmOp_procedurep(proc)))
SigScm_ErrorObj("cond : the value of exp after => must be the procedure but got ", proc);
return ScmOp_apply(Scm_NewCons(proc,
@@ -1138,12 +1138,12 @@
SigScm_Error("case : syntax error\n");
/* check "else" symbol */
- if (SCM_NULLP(SCM_CDR(arg)) && !SCM_CONSP(datums) && EQ(SCM_SYMBOL_VCELL(datums), SCM_TRUE))
+ if (SCM_NULLP(SCM_CDR(arg)) && !SCM_CONSP(datums) && SCM_NFALSEP(SCM_SYMBOL_VCELL(datums)))
return ScmExp_begin(exps, &env, tail_flag);
/* evaluate datums and compare to key by eqv? */
for (; !SCM_NULLP(datums); datums = SCM_CDR(datums)) {
- if (EQ(ScmOp_eqvp(SCM_CAR(datums), key), SCM_TRUE)) {
+ if (SCM_NFALSEP(ScmOp_eqvp(SCM_CAR(datums), key))) {
return ScmExp_begin(exps, &env, tail_flag);
}
}
@@ -1160,7 +1160,7 @@
/* sanity check */
if (SCM_NULLP(arg))
return SCM_TRUE;
- if (EQ(ScmOp_listp(arg), SCM_FALSE))
+ if (SCM_FALSEP(ScmOp_listp(arg)))
SigScm_ErrorObj("and : list required but got ", arg);
/* check recursively */
@@ -1177,7 +1177,7 @@
/* evaluate obj */
obj = ScmOp_eval(obj, env);
- if (EQ(obj, SCM_FALSE)) {
+ if (SCM_FALSEP(obj)) {
/* set tail_flag */
(*tail_flag) = 0;
@@ -1196,7 +1196,7 @@
/* sanity check */
if (SCM_NULLP(arg))
return SCM_FALSE;
- if (EQ(ScmOp_listp(arg), SCM_FALSE))
+ if (SCM_FALSEP(ScmOp_listp(arg)))
SigScm_ErrorObj("or : list required but got ", arg);
/* check recursively */
@@ -1212,7 +1212,7 @@
}
obj = ScmOp_eval(obj, env);
- if (!EQ(obj, SCM_FALSE)) {
+ if (SCM_NFALSEP(obj)) {
/* set tail_flag */
(*tail_flag) = 0;
@@ -1445,7 +1445,7 @@
/* sanity check */
if (SCM_NULLP(arg))
return SCM_UNDEF;
- if (EQ(ScmOp_listp(arg), SCM_FALSE))
+ if (SCM_FALSEP(ScmOp_listp(arg)))
SigScm_ErrorObj("begin : list required but got ", arg);
/* eval recursively */
@@ -1528,7 +1528,7 @@
commands = SCM_CDR(SCM_CDR(arg));
/* now excution phase! */
- while (SCM_EQ(ScmOp_eval(test, env), SCM_FALSE)) {
+ while (SCM_FALSEP(ScmOp_eval(test, env))) {
/* execute commands */
ScmOp_eval(ScmExp_begin(commands, &env, tail_flag), env);
Modified: branches/r5rs/sigscheme/io.c
===================================================================
--- branches/r5rs/sigscheme/io.c 2005-08-22 08:35:10 UTC (rev 1276)
+++ branches/r5rs/sigscheme/io.c 2005-08-22 09:00:08 UTC (rev 1277)
@@ -550,7 +550,7 @@
/* construct loaded_str */
loaded_str = create_loaded_str(filename);
- if (EQ(ScmOp_member(loaded_str, SCM_SYMBOL_VCELL(SigScm_features)), SCM_FALSE)) {
+ if (SCM_FALSEP(ScmOp_member(loaded_str, SCM_SYMBOL_VCELL(SigScm_features)))) {
/* not provided, so load it! */
ScmOp_load(filename);
@@ -593,10 +593,7 @@
if (!SCM_STRINGP(feature))
SigScm_ErrorObj("provide : string required but got ", feature);
- if (EQ(ScmOp_member(feature, SigScm_features), SCM_TRUE))
- return SCM_TRUE;
-
- return SCM_FALSE;
+ return (SCM_FALSEP(ScmOp_member(feature, SigScm_features))) ? SCM_FALSE : SCM_TRUE;
}
ScmObj ScmOp_file_existsp(ScmObj filepath)
@@ -604,10 +601,7 @@
if (!SCM_STRINGP(filepath))
SigScm_ErrorObj("file-exists? : string requred but got ", filepath);
- if (file_existsp(SCM_STRING_STR(filepath)))
- return SCM_TRUE;
-
- return SCM_FALSE;
+ return (file_existsp(SCM_STRING_STR(filepath))) ? SCM_TRUE : SCM_FALSE;
}
ScmObj ScmOp_delete_file(ScmObj filepath)
Modified: branches/r5rs/sigscheme/operations-srfi1.c
===================================================================
--- branches/r5rs/sigscheme/operations-srfi1.c 2005-08-22 08:35:10 UTC (rev 1276)
+++ branches/r5rs/sigscheme/operations-srfi1.c 2005-08-22 09:00:08 UTC (rev 1277)
@@ -112,7 +112,7 @@
/* sanity check */
if CHECK_1_ARG(args)
SigScm_Error("make-llist : require at least 1 arg\n");
- if (EQ(ScmOp_numberp(SCM_CAR(args)), SCM_FALSE))
+ if (SCM_FALSEP(ScmOp_numberp(SCM_CAR(args))))
SigScm_ErrorObj("make-list : number required but got ", SCM_CAR(args));
/* get n */
@@ -143,7 +143,7 @@
int i = 0;
/* sanity check */
- if (EQ(ScmOp_numberp(scm_n), SCM_FALSE))
+ if (SCM_FALSEP(ScmOp_numberp(scm_n)))
SigScm_ErrorObj("list-tabulate : number required but got ", scm_n);
/* get n */
@@ -176,7 +176,7 @@
ScmObj tail = SCM_NIL;
ScmObj obj = SCM_NIL;
- if (EQ(ScmOp_listp(list), SCM_FALSE))
+ if (SCM_FALSEP(ScmOp_listp(list)))
SigScm_ErrorObj("list-copy : list required but got ", list);
for (; !SCM_NULLP(list); list = SCM_CDR(list)) {
@@ -204,7 +204,7 @@
{
ScmObj tailcons = SCM_NIL;
- if (EQ(ScmOp_listp(list), SCM_FALSE))
+ if (SCM_FALSEP(ScmOp_listp(list)))
SigScm_ErrorObj("circular-list : list required but got ", list);
tailcons = list_gettailcons(list);
@@ -238,13 +238,13 @@
scm_step = SCM_CAR(SCM_CDR(SCM_CDR(args)));
/* param type check */
- if (EQ(ScmOp_numberp(scm_count), SCM_FALSE))
+ if (SCM_FALSEP(ScmOp_numberp(scm_count)))
SigScm_ErrorObj("iota : number required but got ", scm_count);
- if (!SCM_NULLP(scm_start) && EQ(ScmOp_numberp(scm_start), SCM_FALSE))
+ if (!SCM_NULLP(scm_start) && SCM_FALSEP(ScmOp_numberp(scm_start)))
SigScm_ErrorObj("iota : number required but got ", scm_start);
- if (!SCM_NULLP(scm_step) && EQ(ScmOp_numberp(scm_step), SCM_FALSE))
+ if (!SCM_NULLP(scm_step) && SCM_FALSEP(ScmOp_numberp(scm_step)))
SigScm_ErrorObj("iota : number required but got ", scm_step);
/* now create list */
Modified: branches/r5rs/sigscheme/operations.c
===================================================================
--- branches/r5rs/sigscheme/operations.c 2005-08-22 08:35:10 UTC (rev 1276)
+++ branches/r5rs/sigscheme/operations.c 2005-08-22 09:00:08 UTC (rev 1277)
@@ -91,7 +91,7 @@
case ScmChar:
/* chars and are the same character according to the char=? */
- if (EQ(ScmOp_char_equal(obj1, obj2), SCM_TRUE)) return SCM_TRUE;
+ if (SCM_NFALSEP(ScmOp_char_equal(obj1, obj2))) return SCM_TRUE;
break;
case ScmSymbol: /* equivalent symbols must already be true on eq? */
@@ -146,13 +146,13 @@
case ScmChar:
/* chars and are the same character according to the char=? */
- if (EQ(ScmOp_char_equal(obj1, obj2), SCM_TRUE)) return SCM_TRUE;
+ if (SCM_NFALSEP(ScmOp_char_equal(obj1, obj2))) return SCM_TRUE;
break;
case ScmCons:
for (; !SCM_NULLP(obj1); obj1 = SCM_CDR(obj1), obj2 = SCM_CDR(obj2)) {
/* check contents */
- if (EQ(ScmOp_equalp(SCM_CAR(obj1), SCM_CAR(obj2)), SCM_FALSE))
+ if (SCM_FALSEP(ScmOp_equalp(SCM_CAR(obj1), SCM_CAR(obj2))))
return SCM_FALSE;
/* check next cdr's type */
@@ -161,7 +161,7 @@
/* check dot pair */
if (!SCM_CONSP(SCM_CDR(obj1))) {
- if(EQ(ScmOp_equalp(SCM_CDR(obj1), SCM_CDR(obj2)), SCM_FALSE))
+ if (SCM_FALSEP(ScmOp_equalp(SCM_CDR(obj1), SCM_CDR(obj2))))
return SCM_FALSE;
else
return SCM_TRUE;
@@ -176,7 +176,7 @@
/* check contents */
for (i = 0; i < SCM_VECTOR_LEN(obj1); i++) {
- if (EQ(ScmOp_equalp(SCM_VECTOR_CREF(obj1, i), SCM_VECTOR_CREF(obj2, i)), SCM_FALSE))
+ if (SCM_FALSEP(ScmOp_equalp(SCM_VECTOR_CREF(obj1, i), SCM_VECTOR_CREF(obj2, i))))
return SCM_FALSE;
}
return SCM_TRUE;
@@ -344,7 +344,7 @@
SigScm_Error("= : Wrong number of arguments\n");
/* type check */
- if (EQ(ScmOp_numberp(SCM_CAR(args)), SCM_FALSE))
+ if (SCM_FALSEP(ScmOp_numberp(SCM_CAR(args))))
SigScm_ErrorObj("= : number required but got ", SCM_CAR(args));
/* Get first value */
@@ -353,7 +353,7 @@
/* compare following value */
for (args = SCM_CDR(args); !SCM_NULLP(args); args = SCM_CDR(args)) {
obj = SCM_CAR(args);
- if (EQ(ScmOp_numberp(obj), SCM_FALSE))
+ if (SCM_FALSEP(ScmOp_numberp(obj)))
SigScm_ErrorObj("= : number required but got ", obj);
if (SCM_INT_VALUE(obj) != val)
@@ -375,7 +375,7 @@
SigScm_Error("< : Wrong number of arguments\n");
/* type check */
- if (EQ(ScmOp_numberp(SCM_CAR(args)), SCM_FALSE))
+ if (SCM_FALSEP(ScmOp_numberp(SCM_CAR(args))))
SigScm_ErrorObj("< : number required but got ", SCM_CAR(args));
/* Get first value */
@@ -384,7 +384,7 @@
/* compare following value */
for (args = SCM_CDR(args); !SCM_NULLP(args); args = SCM_CDR(args)) {
obj = SCM_CAR(args);
- if (EQ(ScmOp_numberp(obj), SCM_FALSE))
+ if (SCM_FALSEP(ScmOp_numberp(obj)))
SigScm_ErrorObj("< : number required but got ", obj);
car_val = SCM_INT_VALUE(obj);
@@ -404,7 +404,7 @@
ScmObj obj = SCM_NIL;
/* type check */
- if (EQ(ScmOp_numberp(SCM_CAR(args)), SCM_FALSE))
+ if (SCM_FALSEP(ScmOp_numberp(SCM_CAR(args))))
SigScm_ErrorObj("> : number required but got ", SCM_CAR(args));
/* arglen check */
@@ -417,7 +417,7 @@
/* compare following value */
for (args = SCM_CDR(args); !SCM_NULLP(args); args = SCM_CDR(args)) {
obj = SCM_CAR(args);
- if (EQ(ScmOp_numberp(obj), SCM_FALSE))
+ if (SCM_FALSEP(ScmOp_numberp(obj)))
SigScm_ErrorObj("> : number required but got ", obj);
car_val = SCM_INT_VALUE(obj);
@@ -437,7 +437,7 @@
ScmObj obj = SCM_NIL;
/* type check */
- if (EQ(ScmOp_numberp(SCM_CAR(args)), SCM_FALSE))
+ if (SCM_FALSEP(ScmOp_numberp(SCM_CAR(args))))
SigScm_ErrorObj("<= : number required but got ", SCM_CAR(args));
/* arglen check */
@@ -451,7 +451,7 @@
obj = SCM_NIL;
for (args = SCM_CDR(args); !SCM_NULLP(args); args = SCM_CDR(args)) {
obj = SCM_CAR(args);
- if (EQ(ScmOp_numberp(obj), SCM_FALSE))
+ if (SCM_FALSEP(ScmOp_numberp(obj)))
SigScm_ErrorObj("<= : number required but got ", obj);
car_val = SCM_INT_VALUE(obj);
@@ -471,7 +471,7 @@
ScmObj obj = SCM_NIL;
/* type check */
- if (EQ(ScmOp_numberp(SCM_CAR(args)), SCM_FALSE))
+ if (SCM_FALSEP(ScmOp_numberp(SCM_CAR(args))))
SigScm_ErrorObj(">= : number required but got ", SCM_CAR(args));
/* arglen check */
@@ -485,7 +485,7 @@
obj = SCM_NIL;
for (args = SCM_CDR(args); !SCM_NULLP(args); args = SCM_CDR(args)) {
obj = SCM_CAR(args);
- if (EQ(ScmOp_numberp(obj), SCM_FALSE))
+ if (SCM_FALSEP(ScmOp_numberp(obj)))
SigScm_ErrorObj(">= : number required but got ", obj);
car_val = SCM_INT_VALUE(obj);
@@ -500,7 +500,7 @@
ScmObj ScmOp_zerop(ScmObj scm_num)
{
- if (EQ(ScmOp_numberp(scm_num), SCM_FALSE))
+ if (SCM_FALSEP(ScmOp_numberp(scm_num)))
SigScm_ErrorObj("zero? : number required but got ", scm_num);
return (SCM_INT_VALUE(scm_num) == 0) ? SCM_TRUE : SCM_FALSE;
@@ -508,7 +508,7 @@
ScmObj ScmOp_positivep(ScmObj scm_num)
{
- if (EQ(ScmOp_numberp(scm_num), SCM_FALSE))
+ if (SCM_FALSEP(ScmOp_numberp(scm_num)))
SigScm_ErrorObj("positive? : number required but got", scm_num);
return (SCM_INT_VALUE(scm_num) > 0) ? SCM_TRUE : SCM_FALSE;
@@ -516,7 +516,7 @@
ScmObj ScmOp_negativep(ScmObj scm_num)
{
- if (EQ(ScmOp_numberp(scm_num), SCM_FALSE))
+ if (SCM_FALSEP(ScmOp_numberp(scm_num)))
SigScm_ErrorObj("negative? : number required but got ", scm_num);
return (SCM_INT_VALUE(scm_num) < 0) ? SCM_TRUE : SCM_FALSE;
@@ -550,7 +550,7 @@
for (; !SCM_NULLP(args); args = SCM_CDR(args)) {
car = SCM_CAR(args);
- if (EQ(ScmOp_numberp(car), SCM_FALSE))
+ if (SCM_FALSEP(ScmOp_numberp(car)))
SigScm_ErrorObj("max : number required but got ", car);
car_val = SCM_INT_VALUE(car);
@@ -575,7 +575,7 @@
for (; !SCM_NULLP(args); args = SCM_CDR(args)) {
car = SCM_CAR(args);
- if (EQ(ScmOp_numberp(car), SCM_FALSE))
+ if (SCM_FALSEP(ScmOp_numberp(car)))
SigScm_ErrorObj("min : number required but got ", car);
car_val = SCM_INT_VALUE(car);
@@ -593,7 +593,7 @@
{
int num = 0;
- if (EQ(ScmOp_numberp(scm_num), SCM_FALSE))
+ if (SCM_FALSEP(ScmOp_numberp(scm_num)))
SigScm_ErrorObj("abs : number required but got ", scm_num);
num = SCM_INT_VALUE(scm_num);
@@ -606,11 +606,11 @@
int n1 = 0;
int n2 = 0;
- if (EQ(ScmOp_numberp(scm_n1), SCM_FALSE))
+ if (SCM_FALSEP(ScmOp_numberp(scm_n1)))
SigScm_ErrorObj("quotient : number required but got ", scm_n1);
- if (EQ(ScmOp_numberp(scm_n2), SCM_FALSE))
+ if (SCM_FALSEP(ScmOp_numberp(scm_n2)))
SigScm_ErrorObj("quotient : number required but got ", scm_n2);
- if (EQ(ScmOp_zerop(scm_n2), SCM_TRUE))
+ if (SCM_NFALSEP(ScmOp_zerop(scm_n2)))
SigScm_Error("quotient : divide by zero\n");
n1 = SCM_INT_VALUE(scm_n1);
@@ -625,11 +625,11 @@
int n2 = 0;
int rem = 0;
- if (EQ(ScmOp_numberp(scm_n1), SCM_FALSE))
+ if (SCM_FALSEP(ScmOp_numberp(scm_n1)))
SigScm_ErrorObj("modulo : number required but got ", scm_n1);
- if (EQ(ScmOp_numberp(scm_n2), SCM_FALSE))
+ if (SCM_FALSEP(ScmOp_numberp(scm_n2)))
SigScm_ErrorObj("modulo : number required but got ", scm_n2);
- if (EQ(ScmOp_zerop(scm_n2), SCM_TRUE))
+ if (SCM_NFALSEP(ScmOp_zerop(scm_n2)))
SigScm_Error("modulo : divide by zero\n");
n1 = SCM_INT_VALUE(scm_n1);
@@ -650,11 +650,11 @@
int n1 = 0;
int n2 = 0;
- if (EQ(ScmOp_numberp(scm_n1), SCM_FALSE))
+ if (SCM_FALSEP(ScmOp_numberp(scm_n1)))
SigScm_ErrorObj("remainder : number required but got ", scm_n1);
- if (EQ(ScmOp_numberp(scm_n2), SCM_FALSE))
+ if (SCM_FALSEP(ScmOp_numberp(scm_n2)))
SigScm_ErrorObj("remainder : number required but got ", scm_n2);
- if (EQ(ScmOp_zerop(scm_n2), SCM_TRUE))
+ if (SCM_NFALSEP(ScmOp_zerop(scm_n2)))
SigScm_Error("remainder : divide by zero\n");
n1 = SCM_INT_VALUE(scm_n1);
@@ -750,7 +750,7 @@
==============================================================================*/
ScmObj ScmOp_not(ScmObj obj)
{
- return (EQ(obj, SCM_FALSE)) ? SCM_TRUE : SCM_FALSE;
+ return (SCM_FALSEP(obj)) ? SCM_TRUE : SCM_FALSE;
}
ScmObj ScmOp_booleanp(ScmObj obj)
@@ -1063,7 +1063,7 @@
{
ScmObj ret;
- if (EQ(ScmOp_numberp(scm_k), SCM_FALSE))
+ if (SCM_FALSEP(ScmOp_numberp(scm_k)))
SigScm_ErrorObj("list-tail: number required but got ", scm_k);
ret = ScmOp_listtail_internal(list, SCM_INT_VALUE(scm_k));
@@ -1078,7 +1078,7 @@
{
ScmObj list_tail = SCM_NIL;
- if (EQ(ScmOp_numberp(scm_k), SCM_FALSE))
+ if (SCM_FALSEP(ScmOp_numberp(scm_k)))
SigScm_ErrorObj("list-ref : int required but got ", scm_k);
list_tail = ScmOp_listtail_internal(list, SCM_INT_VALUE(scm_k));
@@ -1107,7 +1107,7 @@
ScmObj tmpobj = SCM_NIL;
for (tmplist = list; SCM_CONSP(tmplist); tmplist = SCM_CDR(tmplist)) {
tmpobj = SCM_CAR(tmplist);
- if (EQ(ScmOp_eqvp(obj, tmpobj), SCM_TRUE)) {
+ if (SCM_NFALSEP(ScmOp_eqvp(obj, tmpobj))) {
return tmplist;
}
}
@@ -1121,7 +1121,7 @@
ScmObj tmpobj = SCM_NIL;
for (tmplist = list; SCM_CONSP(tmplist); tmplist = SCM_CDR(tmplist)) {
tmpobj = SCM_CAR(tmplist);
- if (EQ(ScmOp_equalp(obj, tmpobj), SCM_TRUE)) {
+ if (SCM_NFALSEP(ScmOp_equalp(obj, tmpobj))) {
return tmplist;
}
}
@@ -1164,10 +1164,10 @@
#if SCM_STRICT_R5RS
if (!SCM_CONSP(tmpobj))
SigScm_ErrorObj("assv: invalid alist: ", alist);
- if (EQ(ScmOp_eqvp(car, obj), SCM_TRUE))
+ if (SCM_NFALSEP(ScmOp_eqvp(car, obj)))
return tmpobj;
#else
- if (SCM_CONSP(tmpobj) && EQ(ScmOp_eqvp(car, obj), SCM_TRUE))
+ if (SCM_CONSP(tmpobj) && SCM_NFALSEP(ScmOp_eqvp(car, obj)))
return tmpobj;
#endif
}
@@ -1187,10 +1187,10 @@
#if SCM_STRICT_R5RS
if (!SCM_CONSP(tmpobj))
SigScm_ErrorObj("assoc: invalid alist: ", alist);
- if (EQ(ScmOp_equalp(car, obj), SCM_TRUE))
+ if (SCM_NFALSEP(ScmOp_equalp(car, obj)))
return tmpobj;
#else
- if (SCM_CONSP(tmpobj) && EQ(ScmOp_equalp(car, obj), SCM_TRUE))
+ if (SCM_CONSP(tmpobj) && SCM_NFALSEP(ScmOp_equalp(car, obj)))
return tmpobj;
#endif
}
@@ -1622,7 +1622,7 @@
char *new_str = NULL;
char *p = NULL;
- if (EQ(ScmOp_listp(list), SCM_FALSE))
+ if (SCM_FALSEP(ScmOp_listp(list)))
SigScm_ErrorObj("list->string : list required but got ", list);
if (SCM_NULLP(list))
@@ -1810,7 +1810,7 @@
int i = 0;
/* TOOD : canbe optimized. scanning list many times */
- if (EQ(ScmOp_listp(list), SCM_FALSE))
+ if (SCM_FALSEP(ScmOp_listp(list)))
SigScm_ErrorObj("list->vector : list required but got ", list);
scm_len = ScmOp_length(list);
Modified: branches/r5rs/sigscheme/sigschemetype.h
===================================================================
--- branches/r5rs/sigscheme/sigschemetype.h 2005-08-22 08:35:10 UTC (rev 1276)
+++ branches/r5rs/sigscheme/sigschemetype.h 2005-08-22 09:00:08 UTC (rev 1277)
@@ -393,6 +393,7 @@
#define SCM_NEQ(a, b) (NEQ((a), (b)))
#define SCM_NULLP(a) (EQ((a), SCM_NIL))
#define SCM_FALSEP(a) (EQ((a), SCM_FALSE))
+#define SCM_NFALSEP(a) (!EQ((a), SCM_FALSE))
#define SCM_EOFP(a) (EQ((a), SCM_EOF))
#endif /* __SIGSCMTYPE_H */
More information about the uim-commit
mailing list