[uim-commit] r1621 - branches/r5rs/sigscheme
yamaken at freedesktop.org
yamaken at freedesktop.org
Tue Sep 27 13:48:42 PDT 2005
Author: yamaken
Date: 2005-09-27 13:48:39 -0700 (Tue, 27 Sep 2005)
New Revision: 1621
Modified:
branches/r5rs/sigscheme/debug.c
branches/r5rs/sigscheme/main.c
Log:
* sigscheme/debug.c
- (SigScm_WriteToPort, SigScm_DisplayToPort): Support
SIDO-compatible verbose control
* sigscheme/main.c
- (repl): Ditto
Modified: branches/r5rs/sigscheme/debug.c
===================================================================
--- branches/r5rs/sigscheme/debug.c 2005-09-27 20:44:28 UTC (rev 1620)
+++ branches/r5rs/sigscheme/debug.c 2005-09-27 20:48:39 UTC (rev 1621)
@@ -160,6 +160,11 @@
{
FILE *f = NULL;
+#if SCM_COMPAT_SIOD
+ if (SigScm_GetVerboseLevel() == 0)
+ return;
+#endif
+
if (SCM_PORTINFO_PORTTYPE(port) == PORT_FILE) {
f = SCM_PORTINFO_FILE(port);
print_ScmObj_internal(f, obj, AS_WRITE);
@@ -176,6 +181,11 @@
{
FILE *f = NULL;
+#if SCM_COMPAT_SIOD
+ if (SigScm_GetVerboseLevel() == 0)
+ return;
+#endif
+
if (SCM_PORTINFO_PORTTYPE(port) == PORT_FILE) {
f = SCM_PORTINFO_FILE(port);
print_ScmObj_internal(f, obj, AS_DISPLAY);
Modified: branches/r5rs/sigscheme/main.c
===================================================================
--- branches/r5rs/sigscheme/main.c 2005-09-27 20:44:28 UTC (rev 1620)
+++ branches/r5rs/sigscheme/main.c 2005-09-27 20:48:39 UTC (rev 1621)
@@ -82,19 +82,32 @@
stdin_port = Scm_NewFilePort(stdin, "stdin", PORT_INPUT);
stdout_port = Scm_NewFilePort(stdout, "stdout", PORT_OUTPUT);
- printf("sscm> ");
+#if SCM_COMPAT_SIOD
+ if (SigScm_GetVerboseLevel() >= 2)
+#endif
+ printf("sscm> ");
for (s_exp = SigScm_Read(stdin_port);
!EOFP(s_exp);
s_exp = SigScm_Read(stdin_port))
{
result = EVAL(s_exp, SCM_NULL);
+#if SCM_COMPAT_SIOD
+ if (SigScm_GetVerboseLevel() >= 1)
+#endif
+ {
#if SCM_USE_SRFI38
- SigScm_WriteToPortWithSharedStructure(stdout_port, result);
+ SigScm_WriteToPortWithSharedStructure(stdout_port, result);
#else
- SigScm_WriteToPort(stdout_port, result);
+ SigScm_WriteToPort(stdout_port, result);
#endif
- printf("\nsscm> ");
+ printf("\n");
+ }
+
+#if SCM_COMPAT_SIOD
+ if (SigScm_GetVerboseLevel() >= 2)
+#endif
+ printf("sscm> ");
}
ScmOp_close_input_port(stdin_port);
More information about the uim-commit
mailing list