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

yamaken at freedesktop.org yamaken at freedesktop.org
Wed Jan 4 15:59:56 PST 2006


Author: yamaken
Date: 2006-01-04 15:59:53 -0800 (Wed, 04 Jan 2006)
New Revision: 2790

Modified:
   branches/r5rs/sigscheme/error.c
   branches/r5rs/sigscheme/main.c
   branches/r5rs/sigscheme/read.c
   branches/r5rs/sigscheme/sigscheme.c
   branches/r5rs/sigscheme/sigschemeinternal.h
   branches/r5rs/sigscheme/storage.c
Log:
* sigscheme/sigschemeinternal.h
  - (FALSE, TRUE): Removed
* sigscheme/sigscheme.c
  - (scm_initialized, scm_initialize_internal, scm_finalize): Replace
    boolean types with scm_bool
* sigscheme/storage.c
  - (scm_make_string_internal, scm_make_string_internal,
    scm_make_immutable_string, scm_make_immutable_string_copying,
    scm_make_string, scm_make_string_copying): Ditto
* sigscheme/read.c
  - (read_unicode_sequence): Ditto
* sigscheme/error.c
  - (srfi34_is_provided, fatal_error_looped, scm_init_error,
    scm_p_fatal_error): Ditto
* sigscheme/main.c
  - (show_promptp): Ditto


Modified: branches/r5rs/sigscheme/error.c
===================================================================
--- branches/r5rs/sigscheme/error.c	2006-01-04 23:48:33 UTC (rev 2789)
+++ branches/r5rs/sigscheme/error.c	2006-01-04 23:59:53 UTC (rev 2790)
@@ -58,7 +58,8 @@
 /*=======================================
   Variable Declarations
 =======================================*/
-static int debug_mask, srfi34_is_provided, fatal_error_looped;
+static int debug_mask;
+static scm_bool srfi34_is_provided, fatal_error_looped;
 static void (*cb_fatal_error)(void);
 
 static ScmObj err_obj_tag, str_srfi34;
@@ -82,10 +83,10 @@
 
     scm_gc_protect_with_init(&str_srfi34,
                              MAKE_IMMUTABLE_STRING_COPYING("srfi-34"));
-    srfi34_is_provided = FALSE;
+    srfi34_is_provided = scm_false;
 
     cb_fatal_error = NULL;
-    fatal_error_looped = FALSE;
+    fatal_error_looped = scm_false;
 
     REGISTER_FUNC_TABLE(scm_error_func_info_table);
 }
@@ -232,7 +233,7 @@
         /* to avoid infinite loop by implicit assertion, use no SCM macros */
         msg = "looped fatal error";
     } else {
-        fatal_error_looped = TRUE;
+        fatal_error_looped = scm_true;
         ENSURE_ERROBJ(err_obj);
         scm_p_inspect_error(err_obj);
         msg = NULL;

Modified: branches/r5rs/sigscheme/main.c
===================================================================
--- branches/r5rs/sigscheme/main.c	2006-01-04 23:48:33 UTC (rev 2789)
+++ branches/r5rs/sigscheme/main.c	2006-01-04 23:59:53 UTC (rev 2790)
@@ -67,7 +67,7 @@
 =======================================*/
 static void repl(void);
 static void repl_loop(void);
-static int show_promptp(void);
+static scm_bool show_promptp(void);
 
 /*=======================================
   Function Implementations
@@ -152,14 +152,14 @@
     }
 }
 
-static int
+static scm_bool
 show_promptp(void)
 {
 #if SCM_COMPAT_SIOD
     return (FALSEP(scm_p_providedp(feature_id_siod))
             || scm_get_verbose_level() >= 2);
 #else
-    return TRUE;
+    return scm_true;
 #endif
 }
 

Modified: branches/r5rs/sigscheme/read.c
===================================================================
--- branches/r5rs/sigscheme/read.c	2006-01-04 23:48:33 UTC (rev 2789)
+++ branches/r5rs/sigscheme/read.c	2006-01-04 23:59:53 UTC (rev 2790)
@@ -470,7 +470,7 @@
     case 'u': len = 4; break;
     case 'U': len = 8; break;
     default:
-        SCM_ASSERT(FALSE);
+        SCM_ASSERT(scm_false);
         break;
     }
     seq[0] = prefix;

Modified: branches/r5rs/sigscheme/sigscheme.c
===================================================================
--- branches/r5rs/sigscheme/sigscheme.c	2006-01-04 23:48:33 UTC (rev 2789)
+++ branches/r5rs/sigscheme/sigscheme.c	2006-01-04 23:59:53 UTC (rev 2790)
@@ -68,7 +68,7 @@
 /* canonical internal encoding for identifiers */
 ScmCharCodec *scm_identifier_codec;
 
-static int scm_initialized;
+static scm_bool scm_initialized;
 static ScmObj features;
 
 #if SCM_COMPAT_SIOD
@@ -188,14 +188,14 @@
 #if SCM_COMPAT_SIOD_BUGS
     scm_provide(MAKE_IMMUTABLE_STRING_COPYING("siod-bugs"));
 #endif
-    scm_initialized = TRUE;
+    scm_initialized = scm_true;
 }
 
 void
 scm_finalize()
 {
     scm_finalize_storage();
-    scm_initialized = FALSE;
+    scm_initialized = scm_false;
 }
 
 void

Modified: branches/r5rs/sigscheme/sigschemeinternal.h
===================================================================
--- branches/r5rs/sigscheme/sigschemeinternal.h	2006-01-04 23:48:33 UTC (rev 2789)
+++ branches/r5rs/sigscheme/sigschemeinternal.h	2006-01-04 23:59:53 UTC (rev 2790)
@@ -82,13 +82,6 @@
 /*=======================================
    Macro Declarations
 =======================================*/
-#ifndef FALSE
-#define FALSE 0
-#endif /* FALSE */
-#ifndef TRUE
-#define TRUE  (!FALSE)
-#endif /* TRUE */
-
 /* trace stack for debugging */
 #define MAKE_TRACE_FRAME(obj, env) CONS(obj, env)
 #define TRACE_FRAME_OBJ CAR

Modified: branches/r5rs/sigscheme/storage.c
===================================================================
--- branches/r5rs/sigscheme/storage.c	2006-01-04 23:48:33 UTC (rev 2789)
+++ branches/r5rs/sigscheme/storage.c	2006-01-04 23:59:53 UTC (rev 2790)
@@ -83,7 +83,7 @@
   File Local Function Declarations
 =======================================*/
 static void initialize_special_constants(void);
-static ScmObj scm_make_string_internal(char *str, int is_immutable);
+static ScmObj scm_make_string_internal(char *str, scm_bool is_immutable);
 
 /*=======================================
   Function Implementations
@@ -204,7 +204,7 @@
 }
 
 static ScmObj
-scm_make_string_internal(char *str, int is_immutable)
+scm_make_string_internal(char *str, scm_bool is_immutable)
 {
     ScmObj obj;
 
@@ -226,25 +226,25 @@
 ScmObj
 scm_make_immutable_string(char *str)
 {
-    return scm_make_string_internal(str, TRUE);
+    return scm_make_string_internal(str, scm_true);
 }
 
 ScmObj
 scm_make_immutable_string_copying(const char *str)
 {
-    return scm_make_string_internal(strdup(str), TRUE);
+    return scm_make_string_internal(strdup(str), scm_true);
 }
 
 ScmObj
 scm_make_string(char *str)
 {
-    return scm_make_string_internal(str, FALSE);
+    return scm_make_string_internal(str, scm_false);
 }
 
 ScmObj
 scm_make_string_copying(const char *str)
 {
-    return scm_make_string_internal(strdup(str), FALSE);
+    return scm_make_string_internal(strdup(str), scm_false);
 }
 
 ScmObj



More information about the uim-commit mailing list