[uim-commit] r1353 - in branches/r5rs: scm sigscheme
yamaken at freedesktop.org
yamaken at freedesktop.org
Mon Aug 29 03:37:59 PDT 2005
Author: yamaken
Date: 2005-08-29 03:37:57 -0700 (Mon, 29 Aug 2005)
New Revision: 1353
Modified:
branches/r5rs/scm/uim-sh.scm
branches/r5rs/sigscheme/error.c
branches/r5rs/sigscheme/io.c
Log:
* This commit marks SIOD-imcompatible behaviors to be modified to run
the GaUnit-based unit test for uim. Kazuki, please do it. The 12,000
lines of tests will ensure basic quality of SigScheme as base-layer
of uim
* scm/uim-sh.scm
* sigscheme/error.c
- Add TODOs as comment. They are needed to run GaUnit-based unit
test for uim
* sigscheme/io.c
- Ditto
- Add some security-related TODOs as comment
- (ScmOp_load): Return SCM_UNDEF when SCM_STRICT_R5RS is true
Modified: branches/r5rs/scm/uim-sh.scm
===================================================================
--- branches/r5rs/scm/uim-sh.scm 2005-08-29 10:04:36 UTC (rev 1352)
+++ branches/r5rs/scm/uim-sh.scm 2005-08-29 10:37:57 UTC (rev 1353)
@@ -78,6 +78,8 @@
(display " -r [module] Load and import module.\n"))
(display " -h show this help\n")))
+;; TODO: Loop when error has occur. This is required to run GaUnit-based unit
+;; test for uim
(define uim-sh
(lambda (args)
(uim-sh-parse-args args)
Modified: branches/r5rs/sigscheme/error.c
===================================================================
--- branches/r5rs/sigscheme/error.c 2005-08-29 10:04:36 UTC (rev 1352)
+++ branches/r5rs/sigscheme/error.c 2005-08-29 10:37:57 UTC (rev 1353)
@@ -31,6 +31,18 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
===========================================================================*/
+
+/*
+ * TODO:
+ * - support SIOD compatible verbose level sensitive behavior. For example,
+ * verbose level 1 must not print backtrace
+ * - provide SRFI-23 "Error reporting mechanism" compatible 'error' procedure
+ * - prepend SIOD compatible "ERROR: " header for each messages when
+ * SCM_COMPAT_SIOD is true. But even if SCM_COMPAT_SIOD is false, some error
+ * indicator header such as "Error: " should be prepended. This is required
+ * to run GaUnit-based unit test for uim
+ */
+
/*=======================================
System Include
=======================================*/
Modified: branches/r5rs/sigscheme/io.c
===================================================================
--- branches/r5rs/sigscheme/io.c 2005-08-29 10:04:36 UTC (rev 1352)
+++ branches/r5rs/sigscheme/io.c 2005-08-29 10:37:57 UTC (rev 1353)
@@ -454,6 +454,7 @@
return SCM_TRUE;
}
+/* TODO: reject relative paths to ensure security */
static char* create_valid_path(const char *filename)
{
char *c_filename = strdup(filename);
@@ -498,11 +499,21 @@
char *c_filename = SCM_STRING_STR(filename);
SigScm_load(c_filename);
- /* TODO : investigate */
+#if SCM_STRICT_R5RS
+ return SCM_UNDEF;
+#else
+ /* TODO: reflect succeeded or not */
return SCM_TRUE;
+#endif
}
#if SCM_USE_NONSTD_FEATURES
+/*
+ * 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 stack_start;
@@ -544,6 +555,10 @@
return Scm_NewString(loaded_str);
}
+/*
+ * TODO: replace original specification with a SRFI standard or other de facto
+ * standard
+ */
ScmObj ScmOp_provide(ScmObj feature)
{
if (!STRINGP(feature))
@@ -555,6 +570,10 @@
return SCM_TRUE;
}
+/*
+ * TODO: replace original specification with a SRFI standard or other de facto
+ * standard
+ */
ScmObj ScmOp_providedp(ScmObj feature)
{
if (!STRINGP(feature))
@@ -563,6 +582,10 @@
return (FALSEP(ScmOp_member(feature, SigScm_features))) ? SCM_FALSE : SCM_TRUE;
}
+/*
+ * TODO: describe compatibility with de facto standard of other Scheme
+ * implementations
+ */
ScmObj ScmOp_file_existsp(ScmObj filepath)
{
if (!STRINGP(filepath))
@@ -571,6 +594,7 @@
return (file_existsp(SCM_STRING_STR(filepath))) ? SCM_TRUE : SCM_FALSE;
}
+/* TODO: remove to ensure security */
ScmObj ScmOp_delete_file(ScmObj filepath)
{
if (!STRINGP(filepath))
More information about the uim-commit
mailing list