[uim-commit] r2627 - branches/r5rs/sigscheme

yamaken at freedesktop.org yamaken at freedesktop.org
Fri Dec 16 17:38:37 PST 2005


Author: yamaken
Date: 2005-12-16 17:38:33 -0800 (Fri, 16 Dec 2005)
New Revision: 2627

Modified:
   branches/r5rs/sigscheme/io.c
   branches/r5rs/sigscheme/sigscheme.h
Log:
* sigscheme/sigscheme.h
  - (scm_port_printf, scm_port_vprintf, scm_port_newline): Change
    return type
* sigscheme/io.c
  - (scm_port_printf, scm_port_vprintf, scm_port_newline): Change
    return type


Modified: branches/r5rs/sigscheme/io.c
===================================================================
--- branches/r5rs/sigscheme/io.c	2005-12-17 01:32:46 UTC (rev 2626)
+++ branches/r5rs/sigscheme/io.c	2005-12-17 01:38:33 UTC (rev 2627)
@@ -132,31 +132,42 @@
     return scm_make_port(scm_make_char_port(bport), flag);
 }
 
-void
+int
 scm_port_printf(ScmObj port, const char *fmt, ...)
 {
+    int ret;
     va_list args;
 
     va_start(args, fmt);
-    scm_port_vprintf(port, fmt, args);
+    ret = scm_port_vprintf(port, fmt, args);
     va_end(args);
+
+    return ret;
 }
 
-void
+int
 scm_port_vprintf(ScmObj port, const char *fmt, va_list args)
 {
+    int ret;
+
     SCM_ASSERT_LIVE_PORT(port);
-    SCM_CHARPORT_VPRINTF(SCM_PORT_IMPL(port), fmt, args);
+    ret = SCM_CHARPORT_VPRINTF(SCM_PORT_IMPL(port), fmt, args);
 #if SCM_VOLATILE_OUTPUT
     scm_port_flush(port);
 #endif
+
+    return ret;
 }
 
-void
+int
 scm_port_newline(ScmObj port)
 {
-    scm_port_puts(port, SCM_NEWLINE_STR);
+    int err;
+
+    err = scm_port_puts(port, SCM_NEWLINE_STR);
     scm_port_flush(port);  /* required */
+
+    return err;
 }
 
 void

Modified: branches/r5rs/sigscheme/sigscheme.h
===================================================================
--- branches/r5rs/sigscheme/sigscheme.h	2005-12-17 01:32:46 UTC (rev 2626)
+++ branches/r5rs/sigscheme/sigscheme.h	2005-12-17 01:38:33 UTC (rev 2627)
@@ -903,10 +903,11 @@
 int scm_port_char_readyp(ScmObj port);
 int scm_port_puts(ScmObj port, const char *str);
 int scm_port_put_char(ScmObj port, int ch);
-void scm_port_printf(ScmObj port, const char *fmt, ...);
-void scm_port_vprintf(ScmObj port, const char *fmt, va_list args);
-void scm_port_newline(ScmObj port);
+int scm_port_printf(ScmObj port, const char *fmt, ...);
+int scm_port_vprintf(ScmObj port, const char *fmt, va_list args);
+int scm_port_newline(ScmObj port);
 int scm_port_flush(ScmObj port);
+/* FIXME: obsolete these functions */
 void scm_error_printf(const char *fmt, ...);
 void scm_error_vprintf(const char *fmt, va_list args);
 void scm_error_newline(void);



More information about the uim-commit mailing list