[uim-commit] r2746 - in branches/r5rs: sigscheme uim

yamaken at freedesktop.org yamaken at freedesktop.org
Mon Jan 2 23:58:46 PST 2006


Author: yamaken
Date: 2006-01-02 23:58:26 -0800 (Mon, 02 Jan 2006)
New Revision: 2746

Modified:
   branches/r5rs/sigscheme/io.c
   branches/r5rs/sigscheme/sigscheme.h
   branches/r5rs/uim/uim-scm.c
Log:
* sigscheme/sigscheme.h
  - (scm_load): Change return type to void
* sigscheme/io.c
  - (scm_load): Change return type to void
  - (scm_load_internal): Change return type to void
* uim/uim-scm.c
  - (uim_scm_load_file): Remove FIXME comment


Modified: branches/r5rs/sigscheme/io.c
===================================================================
--- branches/r5rs/sigscheme/io.c	2006-01-03 07:02:05 UTC (rev 2745)
+++ branches/r5rs/sigscheme/io.c	2006-01-03 07:58:26 UTC (rev 2746)
@@ -74,7 +74,7 @@
 /*=======================================
   File Local Function Declarations
 =======================================*/
-static ScmObj scm_load_internal(const char *c_filename);
+static void scm_load_internal(const char *filename);
 static char *find_path(const char *c_filename);
 static int    file_existsp(const char *filepath);
 #if SCM_USE_SRFI22
@@ -543,41 +543,36 @@
 /*===========================================================================
   R5RS : 6.6 Input and Output : 6.6.4 System Interface
 ===========================================================================*/
-ScmObj
-scm_load(const char *c_filename)
+void
+scm_load(const char *filename)
 {
 #if !SCM_GCC4_READY_GC
     ScmObj stack_start;
 #endif
-    ScmObj succeeded;
 
 #if SCM_GCC4_READY_GC
-    SCM_GC_PROTECTED_CALL(succeeded, ScmObj, scm_load_internal, (c_filename));
+    SCM_GC_PROTECTED_CALL_VOID(scm_load_internal, (filename));
 #else
-    /* start protecting stack */
     scm_gc_protect_stack(&stack_start);
 
-    succeeded = scm_load_internal(c_filename);
+    scm_load_internal(filename);
 
-    /* now no need to protect stack */
     scm_gc_unprotect_stack(&stack_start);
 #endif
-
-    return succeeded;
 }
 
-static ScmObj
-scm_load_internal(const char *c_filename)
+static void
+scm_load_internal(const char *filename)
 {
     ScmObj path, port, sexp;
     char *c_path;
     ScmCharCodec *saved_codec;
 
-    CDBG((SCM_DBG_FILE, "loading %s", c_filename));
+    CDBG((SCM_DBG_FILE, "loading %s", filename));
 
-    c_path = find_path(c_filename);
+    c_path = find_path(filename);
     if (!c_path)
-        ERR("scm_load_internal: file \"%s\" not found", c_filename);
+        ERR("scm_load_internal: file \"%s\" not found", filename);
 
     path = MAKE_IMMUTABLE_STRING(c_path);
     port = scm_p_open_input_file(path);
@@ -596,8 +591,6 @@
     scm_current_char_codec = saved_codec;
 
     CDBG((SCM_DBG_FILE, "done."));
-
-    return SCM_TRUE;
 }
 
 /* FIXME: reject relative paths to ensure security */

Modified: branches/r5rs/sigscheme/sigscheme.h
===================================================================
--- branches/r5rs/sigscheme/sigscheme.h	2006-01-03 07:02:05 UTC (rev 2745)
+++ branches/r5rs/sigscheme/sigscheme.h	2006-01-03 07:58:26 UTC (rev 2746)
@@ -921,7 +921,7 @@
 ScmObj scm_p_newline(ScmObj args);
 ScmObj scm_p_write_char(ScmObj obj, ScmObj args);
 
-ScmObj scm_load(const char *c_filename);
+void scm_load(const char *filename);
 ScmObj scm_p_load(ScmObj filename);
 
 /* read.c */

Modified: branches/r5rs/uim/uim-scm.c
===================================================================
--- branches/r5rs/uim/uim-scm.c	2006-01-03 07:02:05 UTC (rev 2745)
+++ branches/r5rs/uim/uim-scm.c	2006-01-03 07:58:26 UTC (rev 2746)
@@ -335,7 +335,6 @@
   if (!fn)
     return UIM_FALSE;
 
-  /* FIXME! */
   scm_load(fn);
 
   return UIM_TRUE;



More information about the uim-commit mailing list