[uim-commit] r1494 - branches/r5rs/sigscheme
kzk at freedesktop.org
kzk at freedesktop.org
Tue Sep 13 09:50:35 PDT 2005
Author: kzk
Date: 2005-09-13 09:50:33 -0700 (Tue, 13 Sep 2005)
New Revision: 1494
Modified:
branches/r5rs/sigscheme/TODO
branches/r5rs/sigscheme/io.c
Log:
* sigscheme/io.c
- (ScmOp_require): support SIOD compatible return value
* sigscheme/TODO
- update
Modified: branches/r5rs/sigscheme/TODO
===================================================================
--- branches/r5rs/sigscheme/TODO 2005-09-13 12:15:38 UTC (rev 1493)
+++ branches/r5rs/sigscheme/TODO 2005-09-13 16:50:33 UTC (rev 1494)
@@ -7,8 +7,6 @@
- Implement assert-error in unittest.scm
- [uim] Make uim-sh loop workable even if error occurred
-* Add SIOD compatibility about return value to ScmOp_require()
-
* 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-13 12:15:38 UTC (rev 1493)
+++ branches/r5rs/sigscheme/io.c 2005-09-13 16:50:33 UTC (rev 1494)
@@ -533,12 +533,14 @@
/*
* TODO:
* - return the status which indicates succeeded or not
- * - provide SIOD compatible behavior about return value when SCM_COMPAT_SIOD
- * is true
*/
ScmObj ScmOp_require(ScmObj filename)
{
ScmObj loaded_str = SCM_NULL;
+#if SCM_COMPAT_SIOD
+ ScmObj retsym = SCM_NULL;
+ char *retsym_name = NULL;
+#endif
if (!STRINGP(filename))
SigScm_ErrorObj("require : string required but got ", filename);
@@ -554,7 +556,16 @@
SCM_SYMBOL_VCELL(SigScm_features) = CONS(loaded_str, SCM_SYMBOL_VCELL(SigScm_features));
}
+#if SCM_COMPAT_SIOD
+ retsym_name = (char*)malloc(sizeof(char) * (strlen(SCM_STRING_STR(filename)) + strlen("*-loaded*") + 1));
+ sprintf(retsym_name, "*%s-loaded*", SCM_STRING_STR(filename));
+ printf("retsym_name = %s\n", retsym_name);
+ retsym = Scm_Intern(retsym_name);
+ free(retsym_name);
+ return retsym;
+#else
return SCM_TRUE;
+#endif
}
static ScmObj create_loaded_str(ScmObj filename)
More information about the uim-commit
mailing list