[uim-commit] r1943 - branches/r5rs/sigscheme
yamaken at freedesktop.org
yamaken at freedesktop.org
Tue Nov 1 16:40:18 PST 2005
Author: yamaken
Date: 2005-11-01 16:40:06 -0800 (Tue, 01 Nov 2005)
New Revision: 1943
Modified:
branches/r5rs/sigscheme/datas.c
branches/r5rs/sigscheme/debug.c
branches/r5rs/sigscheme/operations-siod.c
branches/r5rs/sigscheme/sigscheme.h
Log:
* sigscheme/sigscheme.h
- (ScmOp_eof_val, ScmOp_undefine): New function decl
* sigscheme/operations-siod.c
- (ScmOp_eof_val, ScmOp_undefine): New function
- (SigScm_Initialize_SIOD): Add initialization for eof-val and
undefine
* sigscheme/debug.c
- (print_constant): Support SIOD-compatible '(eof)' for eof object
* sigscheme/datas.c
- (SigScm_InitStorage): Support SIOD-compatible '1' for #t
Modified: branches/r5rs/sigscheme/datas.c
===================================================================
--- branches/r5rs/sigscheme/datas.c 2005-11-01 21:27:38 UTC (rev 1942)
+++ branches/r5rs/sigscheme/datas.c 2005-11-02 00:40:06 UTC (rev 1943)
@@ -283,6 +283,10 @@
initialize_special_constants();
allocate_heap(&scm_heaps, scm_heap_num, SCM_HEAP_SIZE, &scm_freelist);
scm_portbuffer = (char*)malloc(sizeof(char) * PORTBUFFER_SIZE + 1);
+#if 0 && SCM_COMPAT_SIOD_BUGS
+ SigScm_GC_Protect(&SigScm_true);
+ SigScm_true = Scm_NewInt(1);
+#endif
#if SCM_USE_VALUECONS
/*
Modified: branches/r5rs/sigscheme/debug.c
===================================================================
--- branches/r5rs/sigscheme/debug.c 2005-11-01 21:27:38 UTC (rev 1942)
+++ branches/r5rs/sigscheme/debug.c 2005-11-02 00:40:06 UTC (rev 1943)
@@ -522,7 +522,11 @@
else if (EQ(obj, SCM_FALSE))
SCM_PORT_PRINT(port, "#f");
else if (EQ(obj, SCM_EOF))
+#if SCM_COMPAT_SIOD_BUGS
+ SCM_PORT_PRINT(port, "(eof)");
+#else
SCM_PORT_PRINT(port, "#<eof>");
+#endif
else if (EQ(obj, SCM_UNBOUND))
SCM_PORT_PRINT(port, "#<unbound>");
else if (EQ(obj, SCM_UNDEF))
Modified: branches/r5rs/sigscheme/operations-siod.c
===================================================================
--- branches/r5rs/sigscheme/operations-siod.c 2005-11-01 21:27:38 UTC (rev 1942)
+++ branches/r5rs/sigscheme/operations-siod.c 2005-11-02 00:40:06 UTC (rev 1943)
@@ -108,6 +108,8 @@
Scm_RegisterProcedureFixedTailRec0("the-environment" , ScmOp_the_environment);
Scm_RegisterProcedureFixed1("%%closure-code" , ScmOp_closure_code);
Scm_RegisterProcedureVariadic0("verbose" , ScmOp_verbose);
+ Scm_RegisterProcedureFixed0("eof-val" , ScmOp_eof_val);
+ Scm_RegisterSyntaxFixed1("undefine" , ScmOp_undefine);
saved_output_port = SCM_FALSE;
saved_error_port = SCM_FALSE;
@@ -200,6 +202,28 @@
return Scm_NewInt(sscm_verbose_level);
}
+ScmObj ScmOp_eof_val(void)
+{
+ DECLARE_FUNCTION("eof-val", ProcedureFixed0);
+ return SCM_EOF;
+}
+
+ScmObj ScmOp_undefine(ScmObj var, ScmObj env)
+{
+ ScmObj val = SCM_FALSE;
+ DECLARE_FUNCTION("undefine", SyntaxFixed1);
+
+ ASSERT_SYMBOLP(var);
+
+ val = Scm_LookupEnvironment(var, env);
+ if (!NULLP(val))
+ return SET_CAR(val, SCM_UNBOUND);
+
+ SCM_SYMBOL_SET_VCELL(var, SCM_UNBOUND);
+
+ return SCM_FALSE;
+}
+
long SigScm_GetVerboseLevel(void)
{
return sscm_verbose_level;
Modified: branches/r5rs/sigscheme/sigscheme.h
===================================================================
--- branches/r5rs/sigscheme/sigscheme.h 2005-11-01 21:27:38 UTC (rev 1942)
+++ branches/r5rs/sigscheme/sigscheme.h 2005-11-02 00:40:06 UTC (rev 1943)
@@ -743,6 +743,8 @@
ScmObj ScmOp_the_environment(ScmEvalState *eval_state);
ScmObj ScmOp_closure_code(ScmObj closure);
ScmObj ScmOp_verbose(ScmObj args);
+ScmObj ScmOp_eof_val(void);
+ScmObj ScmOp_undefine(ScmObj var, ScmObj env);
long SigScm_GetVerboseLevel(void);
void SigScm_SetVerboseLevel(long level);
#endif
More information about the uim-commit
mailing list