[uim-commit] r1919 - branches/r5rs/sigscheme
yamaken at freedesktop.org
yamaken at freedesktop.org
Mon Oct 31 22:51:58 PST 2005
Author: yamaken
Date: 2005-10-31 22:50:56 -0800 (Mon, 31 Oct 2005)
New Revision: 1919
Modified:
branches/r5rs/sigscheme/debug.c
Log:
* sigscheme/debug.c
- (print_port): Add bidirectional port support for SCM_USE_NEWPORT
Modified: branches/r5rs/sigscheme/debug.c
===================================================================
--- branches/r5rs/sigscheme/debug.c 2005-11-01 06:37:32 UTC (rev 1918)
+++ branches/r5rs/sigscheme/debug.c 2005-11-01 06:50:56 UTC (rev 1919)
@@ -473,24 +473,28 @@
/* input or output */
#if SCM_USE_NEWPORT
+ /* print "i", "o" or "io" if bidirectional port */
if (SCM_PORT_FLAG(obj) & SCM_PORTFLAG_INPUT)
+ SCM_PORT_PRINT(port, "i");
+ if (SCM_PORT_FLAG(obj) & SCM_PORTFLAG_OUTPUT)
+ SCM_PORT_PRINT(port, "o");
#else
if (SCM_PORT_PORTDIRECTION(obj) == PORT_INPUT)
-#endif
SCM_PORT_PRINT(port, "i");
else
SCM_PORT_PRINT(port, "o");
+#endif
- SCM_PORT_PRINT(port, "port ");
+ SCM_PORT_PRINT(port, "port");
/* file or string */
#if !SCM_USE_NEWPORT
if (SCM_PORT_PORTTYPE(obj) == PORT_FILE) {
- snprintf(scm_portbuffer, PORTBUFFER_SIZE, "file %s", SCM_PORT_FILENAME(obj));
+ snprintf(scm_portbuffer, PORTBUFFER_SIZE, " file %s", SCM_PORT_FILENAME(obj));
SCM_PORT_PRINT(port, scm_portbuffer);
} else if (SCM_PORT_PORTTYPE(obj) == PORT_STRING) {
- snprintf(scm_portbuffer, PORTBUFFER_SIZE, "string %s", SCM_PORT_STR(obj));
+ snprintf(scm_portbuffer, PORTBUFFER_SIZE, " string %s", SCM_PORT_STR(obj));
SCM_PORT_PRINT(port, scm_portbuffer);
}
#endif /* !SCM_USE_NEWPORT */
More information about the uim-commit
mailing list