[uim-commit] r1550 - branches/r5rs/sigscheme
yamaken at freedesktop.org
yamaken at freedesktop.org
Fri Sep 23 05:11:56 PDT 2005
Author: yamaken
Date: 2005-09-23 05:11:53 -0700 (Fri, 23 Sep 2005)
New Revision: 1550
Modified:
branches/r5rs/sigscheme/TODO
branches/r5rs/sigscheme/io.c
Log:
* sigscheme/io.c
- (SigScm_load_internal):
* Generate an error when the file is not found
* Fix a memory leak when the file open is failed
- (ScmOp_require): Remove a TODO comment
* sigscheme/TODO
- Update
Modified: branches/r5rs/sigscheme/TODO
===================================================================
--- branches/r5rs/sigscheme/TODO 2005-09-23 11:29:35 UTC (rev 1549)
+++ branches/r5rs/sigscheme/TODO 2005-09-23 12:11:53 UTC (rev 1550)
@@ -11,8 +11,6 @@
- Implement assert-error in unittest.scm
- [uim] Make uim-sh loop workable even if error occurred
-* Fix error handling of SigScm_load_internal()
-
* Support SIOD-compatible verbose message control (suppressing backtrace, GC
stat, error, etc based on verbose-level)
- [uim] Make the GaUnit-based testing framework workable
Modified: branches/r5rs/sigscheme/io.c
===================================================================
--- branches/r5rs/sigscheme/io.c 2005-09-23 11:29:35 UTC (rev 1549)
+++ branches/r5rs/sigscheme/io.c 2005-09-23 12:11:53 UTC (rev 1550)
@@ -445,17 +445,13 @@
char *filepath = create_valid_path(c_filename);
/* sanity check */
- /*
- TODO : FIXME! Kazuki Ohta <mover at hct.zaq.ne.jp>
- This should be an error, but we don't have enough error handling
- feature.
- */
if (!filepath)
- return SCM_FALSE;
+ SigScm_Error("SigScm_load_internal : file \"%s\" not found\n",
+ c_filename);
- /* FIXME: generate an error when file open has been failed */
/* open port */
port = ScmOp_open_input_file(Scm_NewStringCopying(filepath));
+ free(filepath);
s_expression = SCM_NULL;
/* read & eval cycle */
@@ -469,9 +465,6 @@
/* close port */
ScmOp_close_input_port(port);
- /* free str */
- free(filepath);
-
return SCM_TRUE;
}
@@ -531,10 +524,6 @@
#if SCM_USE_NONSTD_FEATURES
/* FIXME: add ScmObj SigScm_require(const char *c_filename) */
-/*
- * TODO:
- * - generate an error when the file open has been failed (via ScmOp_load())
- */
ScmObj ScmOp_require(ScmObj filename)
{
ScmObj loaded_str = SCM_FALSE;
More information about the uim-commit
mailing list