[uim-commit] r1822 - in branches/r5rs: sigscheme uim
ekato at freedesktop.org
ekato at freedesktop.org
Thu Oct 6 04:26:29 PDT 2005
Author: ekato
Date: 2005-10-06 04:26:25 -0700 (Thu, 06 Oct 2005)
New Revision: 1822
Modified:
branches/r5rs/sigscheme/debug.c
branches/r5rs/sigscheme/error.c
branches/r5rs/sigscheme/operations-siod.c
branches/r5rs/uim/uim-scm.c
Log:
* uim/uim-scm.c (uim_scm_init) : Set verbose level after
initialization of sigscheme.
* sigscheme/debug.c (SigScm_WriteToPort) : Check existence of the
port with FALSEP.
(SigScm_DisplayToPort) : Ditto.
* sigscheme/error.c : (SigScm_VErrorPrintf) : Ditto.
(SigScm_ErrorNewline) : Ditto.
* sigscheme/operations-siod.c (SigScm_Initialize_SIOD) :
Initialize saved port with SCM_FALSE and protect from GC again.
(SigScm_SetVerboseLevel) : If verbose level == 0, set port with
SCM_FALSE.
Modified: branches/r5rs/sigscheme/debug.c
===================================================================
--- branches/r5rs/sigscheme/debug.c 2005-10-06 08:35:03 UTC (rev 1821)
+++ branches/r5rs/sigscheme/debug.c 2005-10-06 11:26:25 UTC (rev 1822)
@@ -178,7 +178,7 @@
{
FILE *f = NULL;
- if (!port)
+ if (FALSEP(port))
return;
if (SCM_PORTINFO_PORTTYPE(port) == PORT_FILE) {
@@ -197,7 +197,7 @@
{
FILE *f = NULL;
- if (!port)
+ if (FALSEP(port))
return;
if (SCM_PORTINFO_PORTTYPE(port) == PORT_FILE) {
Modified: branches/r5rs/sigscheme/error.c
===================================================================
--- branches/r5rs/sigscheme/error.c 2005-10-06 08:35:03 UTC (rev 1821)
+++ branches/r5rs/sigscheme/error.c 2005-10-06 11:26:25 UTC (rev 1822)
@@ -233,7 +233,7 @@
{
FILE *err;
- if (scm_current_error_port) {
+ if (!FALSEP(scm_current_error_port)) {
err = SCM_PORTINFO_FILE(scm_current_error_port);
vfprintf(err, fmt, args);
#if SCM_VOLATILE_OUTPUT
@@ -246,7 +246,7 @@
{
FILE *err;
- if (scm_current_error_port) {
+ if (!FALSEP(scm_current_error_port)) {
err = SCM_PORTINFO_FILE(scm_current_error_port);
fputc('\n', err);
#if SCM_VOLATILE_OUTPUT
Modified: branches/r5rs/sigscheme/operations-siod.c
===================================================================
--- branches/r5rs/sigscheme/operations-siod.c 2005-10-06 08:35:03 UTC (rev 1821)
+++ branches/r5rs/sigscheme/operations-siod.c 2005-10-06 11:26:25 UTC (rev 1822)
@@ -109,8 +109,10 @@
Scm_RegisterProcedureFixed1("%%closure-code" , ScmOp_closure_code);
Scm_RegisterProcedureVariadic0("verbose" , ScmOp_verbose);
- saved_output_port = NULL;
- saved_error_port = NULL;
+ saved_output_port = SCM_FALSE;
+ saved_error_port = SCM_FALSE;
+ SigScm_GC_Protect(&saved_output_port);
+ SigScm_GC_Protect(&saved_error_port);
SigScm_SetVerboseLevel(2);
}
@@ -222,8 +224,8 @@
saved_error_port = scm_current_error_port;
saved_output_port = scm_current_output_port;
- scm_current_error_port = NULL;
- scm_current_output_port = NULL;
+ scm_current_error_port = SCM_FALSE;
+ scm_current_output_port = SCM_FALSE;
} else {
if (!scm_current_error_port)
scm_current_error_port = saved_error_port;
Modified: branches/r5rs/uim/uim-scm.c
===================================================================
--- branches/r5rs/uim/uim-scm.c 2005-10-06 08:35:03 UTC (rev 1821)
+++ branches/r5rs/uim/uim-scm.c 2005-10-06 11:26:25 UTC (rev 1822)
@@ -636,14 +636,14 @@
if (verbose_level && isdigit(verbose_level[0])) {
vlevel = atoi(verbose_level) % 10;
}
- uim_scm_set_verbose_level(vlevel);
-
SigScm_Initialize();
ScmExp_use(Scm_Intern("siod"), SCM_INTERACTION_ENV);
true_sym = (uim_lisp)SCM_TRUE;
false_sym = (uim_lisp)SCM_FALSE;
protected_arg0 = uim_scm_f();
+
+ uim_scm_set_verbose_level(vlevel);
}
void
More information about the uim-commit
mailing list