[uim-commit] r1933 - in branches/r5rs: test uim
yamaken at freedesktop.org
yamaken at freedesktop.org
Tue Nov 1 05:14:35 PST 2005
Author: yamaken
Date: 2005-11-01 05:14:31 -0800 (Tue, 01 Nov 2005)
New Revision: 1933
Modified:
branches/r5rs/test/uim-test-utils.scm
branches/r5rs/uim/uim-scm.c
Log:
* uim/uim-scm.c
- (scm_current_output_port, scm_current_error_port): New extern
variable decl
- (uim_scm_init): Support output replacement as trunk does
* test/uim-test-utils.scm
- (uim-sh-read): Replace 'ERROR: with 'Error: to adapt to Sigscheme
Modified: branches/r5rs/test/uim-test-utils.scm
===================================================================
--- branches/r5rs/test/uim-test-utils.scm 2005-11-01 12:31:24 UTC (rev 1932)
+++ branches/r5rs/test/uim-test-utils.scm 2005-11-01 13:14:31 UTC (rev 1933)
@@ -39,7 +39,7 @@
#f)
(lambda ()
(read in)))))
- (if (and (eq? 'ERROR: uim-sh-output)
+ (if (and (eq? 'Error: uim-sh-output)
(uim-sh-select in 3))
(error (string-trim-both (read-block 10000 in)))
uim-sh-output)))
Modified: branches/r5rs/uim/uim-scm.c
===================================================================
--- branches/r5rs/uim/uim-scm.c 2005-11-01 12:31:24 UTC (rev 1932)
+++ branches/r5rs/uim/uim-scm.c 2005-11-01 13:14:31 UTC (rev 1933)
@@ -47,6 +47,10 @@
#include "uim-compat-scm.c"
#endif
+/* FIXME: violent internal access */
+extern ScmObj scm_current_output_port;
+extern ScmObj scm_current_error_port;
+
static void uim_scm_error(const char *msg, uim_lisp errobj);
#if UIM_SCM_GCC4_READY_GC
@@ -597,6 +601,9 @@
uim_scm_init(const char *verbose_level)
{
long vlevel = 4;
+#if SCM_USE_NEWPORT
+ ScmObj output_port;
+#endif
if (!uim_output)
uim_output = stderr;
@@ -606,6 +613,13 @@
}
SigScm_Initialize();
+
+#if SCM_USE_NEWPORT
+ /* GC safe */
+ output_port = Scm_MakeSharedFilePort(uim_output, "uim", SCM_PORTFLAG_OUTPUT);
+ scm_current_output_port = scm_current_error_port = output_port;
+#endif /* SCM_USE_NEWPORT */
+
ScmExp_use(Scm_Intern("siod"), SCM_INTERACTION_ENV);
true_sym = (uim_lisp)SCM_TRUE;
false_sym = (uim_lisp)SCM_FALSE;
More information about the uim-commit
mailing list