[uim-commit] r2665 - branches/r5rs/sigscheme

yamaken at freedesktop.org yamaken at freedesktop.org
Tue Dec 20 05:38:39 PST 2005


Author: yamaken
Date: 2005-12-20 05:38:35 -0800 (Tue, 20 Dec 2005)
New Revision: 2665

Modified:
   branches/r5rs/sigscheme/error.c
   branches/r5rs/sigscheme/io.c
   branches/r5rs/sigscheme/operations-nonstd.c
   branches/r5rs/sigscheme/operations-srfi1.c
   branches/r5rs/sigscheme/operations-srfi60.c
   branches/r5rs/sigscheme/operations.c
Log:
* sigscheme/operations.c
  - (scm_p_eqp, scm_p_numberp, scm_p_zerop, scm_p_positivep,
    scm_p_negativep, scm_p_oddp, scm_p_evenp, scm_p_not,
    scm_p_booleanp, scm_p_pairp, scm_p_nullp, scm_p_listp,
    scm_p_symbolp, scm_p_charp, scm_p_charequalp,
    scm_p_char_alphabeticp, scm_p_char_numericp,
    scm_p_char_whitespacep, scm_p_char_upper_casep,
    scm_p_char_lower_casep, scm_p_stringp, scm_p_vectorp,
    scm_p_procedurep): Simplify with MAKE_BOOL()
* sigscheme/error.c
  - (scm_p_error_objectp): Ditto
* sigscheme/io.c
  - (scm_p_input_portp, scm_p_output_portp, scm_p_eof_objectp,
    scm_p_char_readyp): Ditto
* sigscheme/operations-nonstd.c
  - (scm_p_symbol_boundp, scm_p_providedp): Ditto
* sigscheme/operations-srfi1.c
  - (scm_p_srfi1_null_listp): Ditto
* sigscheme/operations-srfi60.c
  - (scm_p_srfi60_logtest): Ditto


Modified: branches/r5rs/sigscheme/error.c
===================================================================
--- branches/r5rs/sigscheme/error.c	2005-12-20 12:37:44 UTC (rev 2664)
+++ branches/r5rs/sigscheme/error.c	2005-12-20 13:38:35 UTC (rev 2665)
@@ -168,7 +168,7 @@
 {
     DECLARE_FUNCTION("%%error-object?", procedure_fixed_1);
 
-    return (CONSP(obj) && EQ(CAR(obj), err_obj_tag)) ? SCM_TRUE : SCM_FALSE;
+    return MAKE_BOOL(CONSP(obj) && EQ(CAR(obj), err_obj_tag));
 }
 
 /* FIXME: make (pair? err-obj) #f */

Modified: branches/r5rs/sigscheme/io.c
===================================================================
--- branches/r5rs/sigscheme/io.c	2005-12-20 12:37:44 UTC (rev 2664)
+++ branches/r5rs/sigscheme/io.c	2005-12-20 13:38:35 UTC (rev 2665)
@@ -283,7 +283,7 @@
 
     ASSERT_PORTP(port);
 
-    return (SCM_PORT_FLAG(port) & SCM_PORTFLAG_INPUT) ? SCM_TRUE : SCM_FALSE;
+    return MAKE_BOOL(SCM_PORT_FLAG(port) & SCM_PORTFLAG_INPUT);
 }
 
 ScmObj
@@ -293,7 +293,7 @@
 
     ASSERT_PORTP(port);
 
-    return (SCM_PORT_FLAG(port) & SCM_PORTFLAG_OUTPUT) ? SCM_TRUE : SCM_FALSE;
+    return MAKE_BOOL(SCM_PORT_FLAG(port) & SCM_PORTFLAG_OUTPUT);
 }
 
 ScmObj
@@ -474,7 +474,7 @@
 {
     DECLARE_FUNCTION("eof-object?", procedure_fixed_1);
 
-    return (EOFP(obj)) ? SCM_TRUE : SCM_FALSE;
+    return MAKE_BOOL(EOFP(obj));
 }
 
 ScmObj
@@ -485,7 +485,7 @@
 
     PREPARE_PORT(port, args, scm_in);
 
-    return (scm_port_char_readyp(port))? SCM_TRUE : SCM_FALSE;
+    return MAKE_BOOL(scm_port_char_readyp(port));
 }
 
 /*===========================================================================

Modified: branches/r5rs/sigscheme/operations-nonstd.c
===================================================================
--- branches/r5rs/sigscheme/operations-nonstd.c	2005-12-20 12:37:44 UTC (rev 2664)
+++ branches/r5rs/sigscheme/operations-nonstd.c	2005-12-20 13:38:35 UTC (rev 2665)
@@ -92,8 +92,8 @@
     else
         env = SCM_INTERACTION_ENV;
 
-    return (scm_lookup_environment(sym, env) != SCM_INVALID_REF
-            || SCM_SYMBOL_BOUNDP(sym)) ? SCM_TRUE : SCM_FALSE;
+    return MAKE_BOOL(scm_lookup_environment(sym, env) != SCM_INVALID_REF
+                     || SCM_SYMBOL_BOUNDP(sym));
 }
 
 /* SIOD compatible */
@@ -173,7 +173,7 @@
 
     ASSERT_STRINGP(feature);
 
-    return (scm_providedp(feature)) ? SCM_TRUE : SCM_FALSE;
+    return MAKE_BOOL(scm_providedp(feature));
 }
 
 /*

Modified: branches/r5rs/sigscheme/operations-srfi1.c
===================================================================
--- branches/r5rs/sigscheme/operations-srfi1.c	2005-12-20 12:37:44 UTC (rev 2664)
+++ branches/r5rs/sigscheme/operations-srfi1.c	2005-12-20 13:38:35 UTC (rev 2665)
@@ -315,7 +315,7 @@
 {
     DECLARE_FUNCTION("null-list?", procedure_fixed_1);
     /* TODO : check circular list */
-    return NULLP(lst) ? SCM_TRUE : SCM_FALSE;
+    return MAKE_BOOL(NULLP(lst));
 }
 
 ScmObj

Modified: branches/r5rs/sigscheme/operations-srfi60.c
===================================================================
--- branches/r5rs/sigscheme/operations-srfi60.c	2005-12-20 12:37:44 UTC (rev 2664)
+++ branches/r5rs/sigscheme/operations-srfi60.c	2005-12-20 13:38:35 UTC (rev 2665)
@@ -149,5 +149,5 @@
     ASSERT_INTP(j);
     ASSERT_INTP(k);
 
-    return (SCM_INT_VALUE(j) & SCM_INT_VALUE(k)) ? SCM_TRUE : SCM_FALSE;
+    return MAKE_BOOL(SCM_INT_VALUE(j) & SCM_INT_VALUE(k));
 }

Modified: branches/r5rs/sigscheme/operations.c
===================================================================
--- branches/r5rs/sigscheme/operations.c	2005-12-20 12:37:44 UTC (rev 2664)
+++ branches/r5rs/sigscheme/operations.c	2005-12-20 13:38:35 UTC (rev 2665)
@@ -113,7 +113,7 @@
 scm_p_eqp(ScmObj obj1, ScmObj obj2)
 {
     DECLARE_FUNCTION("eq?", procedure_fixed_2);
-    return (EQ(obj1, obj2)) ? SCM_TRUE : SCM_FALSE;
+    return MAKE_BOOL(EQ(obj1, obj2));
 }
 
 ScmObj
@@ -310,7 +310,7 @@
 scm_p_numberp(ScmObj obj)
 {
     DECLARE_FUNCTION("number?", procedure_fixed_1);
-    return (INTP(obj)) ? SCM_TRUE : SCM_FALSE;
+    return MAKE_BOOL(INTP(obj));
 }
 
 ScmObj
@@ -372,7 +372,7 @@
 {
     DECLARE_FUNCTION("zero?", procedure_fixed_1);
     ASSERT_INTP(scm_num);
-    return (SCM_INT_VALUE(scm_num) == 0) ? SCM_TRUE : SCM_FALSE;
+    return MAKE_BOOL(SCM_INT_VALUE(scm_num) == 0);
 }
 
 ScmObj
@@ -380,7 +380,7 @@
 {
     DECLARE_FUNCTION("positive?", procedure_fixed_1);
     ASSERT_INTP(scm_num);
-    return (SCM_INT_VALUE(scm_num) > 0) ? SCM_TRUE : SCM_FALSE;
+    return MAKE_BOOL(SCM_INT_VALUE(scm_num) > 0);
 }
 
 ScmObj
@@ -388,7 +388,7 @@
 {
     DECLARE_FUNCTION("negative?", procedure_fixed_1);
     ASSERT_INTP(scm_num);
-    return (SCM_INT_VALUE(scm_num) < 0) ? SCM_TRUE : SCM_FALSE;
+    return MAKE_BOOL(SCM_INT_VALUE(scm_num) < 0);
 }
 
 ScmObj
@@ -396,7 +396,7 @@
 {
     DECLARE_FUNCTION("odd?", procedure_fixed_1);
     ASSERT_INTP(scm_num);
-    return (SCM_INT_VALUE(scm_num) & 0x1) ? SCM_TRUE : SCM_FALSE;
+    return MAKE_BOOL(SCM_INT_VALUE(scm_num) & 0x1);
 }
 
 ScmObj
@@ -404,7 +404,7 @@
 {
     DECLARE_FUNCTION("even?", procedure_fixed_1);
     ASSERT_INTP(scm_num);
-    return (SCM_INT_VALUE(scm_num) & 0x1) ? SCM_FALSE : SCM_TRUE;
+    return MAKE_BOOL(!(SCM_INT_VALUE(scm_num) & 0x1));
 }
 
 ScmObj
@@ -605,14 +605,14 @@
 scm_p_not(ScmObj obj)
 {
     DECLARE_FUNCTION("not", procedure_fixed_1);
-    return (FALSEP(obj)) ? SCM_TRUE : SCM_FALSE;
+    return MAKE_BOOL(FALSEP(obj));
 }
 
 ScmObj
 scm_p_booleanp(ScmObj obj)
 {
     DECLARE_FUNCTION("boolean?", procedure_fixed_1);
-    return (EQ(obj, SCM_FALSE) || EQ(obj, SCM_TRUE)) ? SCM_TRUE : SCM_FALSE;
+    return MAKE_BOOL(EQ(obj, SCM_FALSE) || EQ(obj, SCM_TRUE));
 }
 
 /*==============================================================================
@@ -650,7 +650,7 @@
 scm_p_pairp(ScmObj obj)
 {
     DECLARE_FUNCTION("pair?", procedure_fixed_1);
-    return (CONSP(obj)) ? SCM_TRUE : SCM_FALSE;
+    return MAKE_BOOL(CONSP(obj));
 }
 
 ScmObj
@@ -739,7 +739,7 @@
 scm_p_nullp(ScmObj obj)
 {
     DECLARE_FUNCTION("null?", procedure_fixed_1);
-    return (NULLP(obj)) ? SCM_TRUE : SCM_FALSE;
+    return MAKE_BOOL(NULLP(obj));
 }
 
 ScmObj
@@ -755,7 +755,7 @@
 
     len = scm_p_c_length(obj);
 
-    return (len != -1) ? SCM_TRUE : SCM_FALSE;
+    return MAKE_BOOL(len != -1);
 }
 
 /*
@@ -1025,7 +1025,7 @@
 scm_p_symbolp(ScmObj obj)
 {
     DECLARE_FUNCTION("symbol?", procedure_fixed_1);
-    return (SYMBOLP(obj)) ? SCM_TRUE : SCM_FALSE;
+    return MAKE_BOOL(SYMBOLP(obj));
 }
 
 ScmObj
@@ -1051,7 +1051,7 @@
 scm_p_charp(ScmObj obj)
 {
     DECLARE_FUNCTION("char?", procedure_fixed_1);
-    return (CHARP(obj)) ? SCM_TRUE : SCM_FALSE;
+    return MAKE_BOOL(CHARP(obj));
 }
 
 ScmObj
@@ -1062,7 +1062,7 @@
     ASSERT_CHARP(ch1);
     ASSERT_CHARP(ch2);
 
-    return (SCM_CHAR_VALUE(ch1) == SCM_CHAR_VALUE(ch2)) ? SCM_TRUE : SCM_FALSE;
+    return MAKE_BOOL(SCM_CHAR_VALUE(ch1) == SCM_CHAR_VALUE(ch2));
 }
 
 ScmObj
@@ -1075,7 +1075,7 @@
 
     ch = SCM_CHAR_VALUE(obj);
 
-    return (isascii(ch) && isalpha(ch)) ? SCM_TRUE : SCM_FALSE;
+    return MAKE_BOOL(isascii(ch) && isalpha(ch));
 }
 
 ScmObj
@@ -1088,7 +1088,7 @@
 
     ch = SCM_CHAR_VALUE(obj);
 
-    return (isascii(ch) && isdigit(ch)) ? SCM_TRUE : SCM_FALSE;
+    return MAKE_BOOL(isascii(ch) && isdigit(ch));
 }
 
 ScmObj
@@ -1101,7 +1101,7 @@
 
     ch = SCM_CHAR_VALUE(obj);
 
-    return (isascii(ch) && isspace(ch)) ? SCM_TRUE : SCM_FALSE;
+    return MAKE_BOOL(isascii(ch) && isspace(ch));
 }
 
 ScmObj
@@ -1114,7 +1114,7 @@
 
     ch = SCM_CHAR_VALUE(obj);
 
-    return (isascii(ch) && isupper(ch)) ? SCM_TRUE : SCM_FALSE;
+    return MAKE_BOOL(isascii(ch) && isupper(ch));
 }
 
 ScmObj
@@ -1127,7 +1127,7 @@
 
     ch = SCM_CHAR_VALUE(obj);
 
-    return (isascii(ch) && islower(ch)) ? SCM_TRUE : SCM_FALSE;
+    return MAKE_BOOL(isascii(ch) && islower(ch));
 }
 
 ScmObj
@@ -1192,7 +1192,7 @@
 scm_p_stringp(ScmObj obj)
 {
     DECLARE_FUNCTION("string?", procedure_fixed_1);
-    return (STRINGP(obj)) ? SCM_TRUE : SCM_FALSE;
+    return MAKE_BOOL(STRINGP(obj));
 }
 
 ScmObj
@@ -1541,7 +1541,7 @@
 scm_p_vectorp(ScmObj obj)
 {
     DECLARE_FUNCTION("vector?", procedure_fixed_1);
-    return (VECTORP(obj)) ? SCM_TRUE : SCM_FALSE;
+    return MAKE_BOOL(VECTORP(obj));
 }
 
 ScmObj
@@ -1705,7 +1705,7 @@
 scm_p_procedurep(ScmObj obj)
 {
     DECLARE_FUNCTION("procedure?", procedure_fixed_1);
-    return (PROCEDUREP(obj)) ? SCM_TRUE : SCM_FALSE;
+    return MAKE_BOOL(PROCEDUREP(obj));
 }
 
 ScmObj



More information about the uim-commit mailing list