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

yamaken at freedesktop.org yamaken at freedesktop.org
Mon Jan 2 21:44:32 PST 2006


Author: yamaken
Date: 2006-01-02 21:44:30 -0800 (Mon, 02 Jan 2006)
New Revision: 2740

Modified:
   branches/r5rs/sigscheme/io.c
   branches/r5rs/sigscheme/operations-srfi6.c
   branches/r5rs/sigscheme/print.c
   branches/r5rs/sigscheme/sigscheme.h
Log:
* sigscheme/sigscheme.h
  - (SCM_ASSERT_LIVE_PORT, SCM_ENSURE_LIVE_PORT): Rename
    SCM_ASSERT_LIVE_PORT to SCM_ENSURE_LIVE_PORT
* sigscheme/io.c
* sigscheme/print.c
* sigscheme/operations-srfi6.c
  - Follow the renaming by following script
    perl -i -pe 's/ASSERT_LIVE_PORT\b/ENSURE_LIVE_PORT/g' sigscheme/*.[ch]


Modified: branches/r5rs/sigscheme/io.c
===================================================================
--- branches/r5rs/sigscheme/io.c	2006-01-03 05:41:08 UTC (rev 2739)
+++ branches/r5rs/sigscheme/io.c	2006-01-03 05:44:30 UTC (rev 2740)
@@ -150,7 +150,7 @@
 {
     int ret;
 
-    SCM_ASSERT_LIVE_PORT(port);
+    SCM_ENSURE_LIVE_PORT(port);
     ret = SCM_CHARPORT_VPRINTF(SCM_PORT_IMPL(port), fmt, args);
 #if SCM_VOLATILE_OUTPUT
     scm_port_flush(port);
@@ -184,56 +184,56 @@
 ScmCharCodec *
 scm_port_codec(ScmObj port)
 {
-    SCM_ASSERT_LIVE_PORT(port);
+    SCM_ENSURE_LIVE_PORT(port);
     return SCM_CHARPORT_CODEC(SCM_PORT_IMPL(port));
 }
 
 char *
 scm_port_inspect(ScmObj port)
 {
-    SCM_ASSERT_LIVE_PORT(port);
+    SCM_ENSURE_LIVE_PORT(port);
     return SCM_CHARPORT_INSPECT(SCM_PORT_IMPL(port));
 }
 
 int
 scm_port_get_char(ScmObj port)
 {
-    SCM_ASSERT_LIVE_PORT(port);
+    SCM_ENSURE_LIVE_PORT(port);
     return SCM_CHARPORT_GET_CHAR(SCM_PORT_IMPL(port));
 }
 
 int
 scm_port_peek_char(ScmObj port)
 {
-    SCM_ASSERT_LIVE_PORT(port);
+    SCM_ENSURE_LIVE_PORT(port);
     return SCM_CHARPORT_PEEK_CHAR(SCM_PORT_IMPL(port));
 }
 
 int
 scm_port_char_readyp(ScmObj port)
 {
-    SCM_ASSERT_LIVE_PORT(port);
+    SCM_ENSURE_LIVE_PORT(port);
     return SCM_CHARPORT_CHAR_READYP(SCM_PORT_IMPL(port));
 }
 
 int
 scm_port_puts(ScmObj port, const char *str)
 {
-    SCM_ASSERT_LIVE_PORT(port);
+    SCM_ENSURE_LIVE_PORT(port);
     return SCM_CHARPORT_PUTS(SCM_PORT_IMPL(port), str);
 }
 
 int
 scm_port_put_char(ScmObj port, int ch)
 {
-    SCM_ASSERT_LIVE_PORT(port);
+    SCM_ENSURE_LIVE_PORT(port);
     return SCM_CHARPORT_PUT_CHAR(SCM_PORT_IMPL(port), ch);
 }
 
 int
 scm_port_flush(ScmObj port)
 {
-    SCM_ASSERT_LIVE_PORT(port);
+    SCM_ENSURE_LIVE_PORT(port);
     return SCM_CHARPORT_FLUSH(SCM_PORT_IMPL(port));
 }
 

Modified: branches/r5rs/sigscheme/operations-srfi6.c
===================================================================
--- branches/r5rs/sigscheme/operations-srfi6.c	2006-01-03 05:41:08 UTC (rev 2739)
+++ branches/r5rs/sigscheme/operations-srfi6.c	2006-01-03 05:44:30 UTC (rev 2740)
@@ -114,7 +114,7 @@
 
     ASSERT_PORTP(port);
 
-    SCM_ASSERT_LIVE_PORT(port);
+    SCM_ENSURE_LIVE_PORT(port);
     cport = SCM_CHARPORT_DYNAMIC_CAST(ScmBaseCharPort, SCM_PORT_IMPL(port));
 
     return MAKE_STRING_COPYING(ScmOutputStrPort_str(cport->bport));

Modified: branches/r5rs/sigscheme/print.c
===================================================================
--- branches/r5rs/sigscheme/print.c	2006-01-03 05:41:08 UTC (rev 2739)
+++ branches/r5rs/sigscheme/print.c	2006-01-03 05:44:30 UTC (rev 2740)
@@ -138,7 +138,7 @@
     DECLARE_INTERNAL_FUNCTION("scm_write_to_port");
 
     ASSERT_PORTP(port);
-    SCM_ASSERT_LIVE_PORT(port);
+    SCM_ENSURE_LIVE_PORT(port);
     if (!(SCM_PORT_FLAG(port) & SCM_PORTFLAG_OUTPUT))
         ERR("output port is required");
 
@@ -155,7 +155,7 @@
     DECLARE_INTERNAL_FUNCTION("scm_display_to_port");
 
     ASSERT_PORTP(port);
-    SCM_ASSERT_LIVE_PORT(port);
+    SCM_ENSURE_LIVE_PORT(port);
     if (!(SCM_PORT_FLAG(port) & SCM_PORTFLAG_OUTPUT))
         ERR("output port is required");
 

Modified: branches/r5rs/sigscheme/sigscheme.h
===================================================================
--- branches/r5rs/sigscheme/sigscheme.h	2006-01-03 05:41:08 UTC (rev 2739)
+++ branches/r5rs/sigscheme/sigscheme.h	2006-01-03 05:44:30 UTC (rev 2740)
@@ -179,8 +179,7 @@
 /* Above five macros must be defined before this inclusion. */
 #include "baseport.h"
 
-/* FIXME: Rename to SCM_ENSURE_LIVE_PORT() */
-#define SCM_ASSERT_LIVE_PORT(port)                                           \
+#define SCM_ENSURE_LIVE_PORT(port)                                           \
     (SCM_PORT_IMPL(port)                                                     \
      || (scm_error_obj("(unknown)", "operated on closed port", port), 1))
 



More information about the uim-commit mailing list