[uim-commit] r1553 - branches/r5rs/sigscheme
yamaken at freedesktop.org
yamaken at freedesktop.org
Fri Sep 23 05:37:57 PDT 2005
Author: yamaken
Date: 2005-09-23 05:37:52 -0700 (Fri, 23 Sep 2005)
New Revision: 1553
Modified:
branches/r5rs/sigscheme/io.c
Log:
* sigscheme/io.c
- (SigScm_load_internal): Simplify
Modified: branches/r5rs/sigscheme/io.c
===================================================================
--- branches/r5rs/sigscheme/io.c 2005-09-23 12:26:15 UTC (rev 1552)
+++ branches/r5rs/sigscheme/io.c 2005-09-23 12:37:52 UTC (rev 1553)
@@ -440,8 +440,8 @@
static ScmObj SigScm_load_internal(const char *c_filename)
{
- ScmObj port = SCM_NULL;
- ScmObj s_expression = SCM_NULL;
+ ScmObj port = SCM_FALSE;
+ ScmObj s_expression = SCM_FALSE;
ScmObj filepath = SCM_FALSE;
char *c_filepath = create_valid_path(c_filename);
@@ -450,20 +450,14 @@
SigScm_Error("SigScm_load_internal : file \"%s\" not found\n",
c_filename);
- /* open port */
- filepath = Scm_NewStringCopying(c_filepath);
- free(c_filepath);
+ filepath = Scm_NewString(c_filepath);
port = ScmOp_open_input_file(filepath);
/* read & eval cycle */
- for (s_expression = SigScm_Read(port);
- !EOFP(s_expression);
- s_expression = SigScm_Read(port))
- {
+ while (s_expression = SigScm_Read(port), !EOFP(s_expression)) {
EVAL(s_expression, SCM_NULL);
}
- /* close port */
ScmOp_close_input_port(port);
return SCM_TRUE;
More information about the uim-commit
mailing list