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

yamaken at freedesktop.org yamaken at freedesktop.org
Mon Oct 31 03:51:12 PST 2005


Author: yamaken
Date: 2005-10-31 03:51:08 -0800 (Mon, 31 Oct 2005)
New Revision: 1905

Modified:
   branches/r5rs/sigscheme/baseport.h
   branches/r5rs/sigscheme/sbcport.c
Log:
* sigscheme/baseport.h
  - (SCM_CHARPORT_PUTS): New macro
  - (ScmCharPortMethod_puts): New type
  - (struct ScmCharPortVTbl_): Add new member puts
* sigscheme/sbcport.c
  - (basecport_puts): New static function
  - (ScmBaseCharPort_vtbl): Add new member puts


Modified: branches/r5rs/sigscheme/baseport.h
===================================================================
--- branches/r5rs/sigscheme/baseport.h	2005-10-31 11:44:39 UTC (rev 1904)
+++ branches/r5rs/sigscheme/baseport.h	2005-10-31 11:51:08 UTC (rev 1905)
@@ -86,6 +86,7 @@
 #define SCM_CHARPORT_CHAR_READYP(cport)  ((*cport->vptr->char_readyp)(cport))
 #define SCM_CHARPORT_VPRINTF(cport, str, args)                               \
     ((*cport->vptr->vprintf)(cport, str, args))
+#define SCM_CHARPORT_PUTS(cport, str)    ((*cport->vptr->puts)(cport, str))
 #define SCM_CHARPORT_PUT_CHAR(cport, ch) ((*cport->vptr->put_char)(cport, ch))
 #define SCM_CHARPORT_FLUSH(cport)        ((*cport->vptr->flush)(cport))
 
@@ -124,6 +125,7 @@
 /* output */
 typedef int (*ScmCharPortMethod_vprintf)(ScmCharPort *cport,
                                          const char *str, va_list args);
+typedef int (*ScmCharPortMethod_puts)(ScmCharPort *cport, const char *str);
 typedef int (*ScmCharPortMethod_put_char)(ScmCharPort *cport, int ch);
 typedef int (*ScmCharPortMethod_flush)(ScmCharPort *cport);
 
@@ -135,6 +137,7 @@
     ScmCharPortMethod_peek_char   peek_char;
     ScmCharPortMethod_char_readyp char_readyp;
     ScmCharPortMethod_vprintf     vprintf;  /* tmp */
+    ScmCharPortMethod_puts        puts;
     ScmCharPortMethod_put_char    put_char;
     ScmCharPortMethod_flush       flush;
 };

Modified: branches/r5rs/sigscheme/sbcport.c
===================================================================
--- branches/r5rs/sigscheme/sbcport.c	2005-10-31 11:44:39 UTC (rev 1904)
+++ branches/r5rs/sigscheme/sbcport.c	2005-10-31 11:51:08 UTC (rev 1905)
@@ -77,6 +77,7 @@
 static int basecport_char_readyp(ScmBaseCharPort *port);
 static int basecport_vprintf(ScmBaseCharPort *port, const char *str,
                              va_list args);
+static int basecport_puts(ScmBaseCharPort *port, const char *str);
 static int basecport_put_char(ScmBaseCharPort *port, int ch);
 static int basecport_flush(ScmBaseCharPort *port);
 
@@ -96,6 +97,7 @@
     (ScmCharPortMethod_peek_char)  &basecport_peek_char,
     (ScmCharPortMethod_char_readyp)&basecport_char_readyp,
     (ScmCharPortMethod_vprintf)    &basecport_vprintf,
+    (ScmCharPortMethod_puts)       &basecport_puts,
     (ScmCharPortMethod_put_char)   &basecport_put_char,
     (ScmCharPortMethod_flush)      &basecport_flush
 };
@@ -154,6 +156,12 @@
 }
 
 static int
+basecport_puts(ScmBaseCharPort *port, const char *str)
+{
+    return SCM_BYTEPORT_PUTS(port->bport, str);
+}
+
+static int
 basecport_put_char(ScmBaseCharPort *port, int ch)
 {
     SCM_PORT_ERROR_INVALID_OPERATION(CHAR, port, ScmBaseCharPort);



More information about the uim-commit mailing list