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

yamaken at freedesktop.org yamaken at freedesktop.org
Fri Dec 9 19:02:55 PST 2005


Author: yamaken
Date: 2005-12-09 19:02:51 -0800 (Fri, 09 Dec 2005)
New Revision: 2507

Modified:
   branches/r5rs/sigscheme/debug.c
   branches/r5rs/sigscheme/error.c
   branches/r5rs/sigscheme/sigscheme.h
Log:
* sigscheme/sigscheme.h
  - (SCM_PORT_GETC, SCM_PORT_UNGETC, SCM_PORT_PRINT): Removed
* sigscheme/error.c
  - (ScmOp_inspect_error): Replace SCM_PORT_PRINT() with SCM_PORT_PUTS()
* sigscheme/debug.c
  - (print_ScmObj_internal, print_string, print_list, print_vector,
    print_port, print_errobj): Ditto


Modified: branches/r5rs/sigscheme/debug.c
===================================================================
--- branches/r5rs/sigscheme/debug.c	2005-12-10 02:57:59 UTC (rev 2506)
+++ branches/r5rs/sigscheme/debug.c	2005-12-10 03:02:51 UTC (rev 2507)
@@ -247,7 +247,7 @@
             print_list(port, obj, otype);
         break;
     case ScmSymbol:
-        SCM_PORT_PRINT(port, SCM_SYMBOL_NAME(obj));
+        SCM_PORT_PUTS(port, SCM_SYMBOL_NAME(obj));
         break;
     case ScmChar:
         print_char(port, obj, otype);
@@ -256,7 +256,7 @@
         print_string(port, obj, otype);
         break;
     case ScmFunc:
-        SCM_PORT_PRINT(port, (SCM_SYNTAXP(obj)) ? "#<syntax " : "#<subr ");
+        SCM_PORT_PUTS(port, (SCM_SYNTAXP(obj)) ? "#<syntax " : "#<subr ");
         sym = Scm_SymbolBoundTo(obj);
         if (NFALSEP(sym))
             SigScm_DisplayToPort(port, sym);
@@ -265,7 +265,7 @@
         SCM_PORT_PUT_CHAR(port, '>');
         break;
     case ScmClosure:
-        SCM_PORT_PRINT(port, "#<closure ");
+        SCM_PORT_PUTS(port, "#<closure ");
         print_ScmObj_internal(port, SCM_CLOSURE_EXP(obj), otype);
         SCM_PORT_PUT_CHAR(port, '>');
         break;
@@ -276,12 +276,12 @@
         print_port(port, obj, otype);
         break;
     case ScmContinuation:
-        SCM_PORT_PRINT(port, "#<subr continuation>");
+        SCM_PORT_PUTS(port, "#<subr continuation>");
         break;
     case ScmValuePacket:
-        SCM_PORT_PRINT(port, "#<values ");
+        SCM_PORT_PUTS(port, "#<values ");
         if (NULLP(SCM_VALUEPACKET_VALUES(obj)))
-            SCM_PORT_PRINT(port, "()");
+            SCM_PORT_PUTS(port, "()");
         else
             print_list(port, SCM_VALUEPACKET_VALUES(obj), otype);
 #if SCM_USE_VALUECONS
@@ -367,7 +367,7 @@
         break;
 
     case AS_DISPLAY:
-        SCM_PORT_PRINT(port, str);
+        SCM_PORT_PUTS(port, str);
         break;
 
     default:
@@ -387,7 +387,7 @@
 #endif
 
     if (NULLP(lst)) {
-        SCM_PORT_PRINT(port, "()");
+        SCM_PORT_PUTS(port, "()");
         return;
     }
 
@@ -422,7 +422,7 @@
 
     /* last item */
     if (!NULLP(lst)) {
-        SCM_PORT_PRINT(port, " . ");
+        SCM_PORT_PUTS(port, " . ");
         /* Callee takes care of shared data. */
         print_ScmObj_internal(port, lst, otype);
     }
@@ -439,7 +439,7 @@
     ScmObj *v;
     int len, i;
 
-    SCM_PORT_PRINT(port, "#(");
+    SCM_PORT_PUTS(port, "#(");
 
     v = SCM_VECTOR_VEC(vec);
     len = SCM_VECTOR_LEN(vec);
@@ -456,7 +456,7 @@
 {
     char *info;
 
-    SCM_PORT_PRINT(port, "#<");
+    SCM_PORT_PUTS(port, "#<");
 
     /* input or output */
     /* print "i", "o" or "io" if bidirectional port */
@@ -465,13 +465,13 @@
     if (SCM_PORT_FLAG(obj) & SCM_PORTFLAG_OUTPUT)
         SCM_PORT_PUT_CHAR(port, 'o');
 
-    SCM_PORT_PRINT(port, "port");
+    SCM_PORT_PUTS(port, "port");
 
     /* file or string */
     info = SCM_PORT_INSPECT(obj);
     if (*info) {
         SCM_PORT_PUT_CHAR(port, ' ');
-        SCM_PORT_PRINT(port, info);
+        SCM_PORT_PUTS(port, info);
     }
     free(info);
 
@@ -515,7 +515,7 @@
 
     switch (otype) {
     case AS_WRITE:
-        SCM_PORT_PRINT(port, "#<error ");
+        SCM_PORT_PUTS(port, "#<error ");
         SigScm_WriteToPort(port, reason);
         break;
 

Modified: branches/r5rs/sigscheme/error.c
===================================================================
--- branches/r5rs/sigscheme/error.c	2005-12-10 02:57:59 UTC (rev 2506)
+++ branches/r5rs/sigscheme/error.c	2005-12-10 03:02:51 UTC (rev 2507)
@@ -172,8 +172,8 @@
         if (ERROBJP(err_obj)) {
             SigScm_DisplayToPort(scm_current_error_port, err_obj);
         } else {
-            SCM_PORT_PRINT(scm_current_error_port, ERRMSG_UNHANDLED_EXCEPTION);
-            SCM_PORT_PRINT(scm_current_error_port, ": ");
+            SCM_PORT_PUTS(scm_current_error_port, ERRMSG_UNHANDLED_EXCEPTION);
+            SCM_PORT_PUTS(scm_current_error_port, ": ");
             SigScm_WriteToPort(scm_current_error_port, err_obj);
         }
         SigScm_ErrorNewline();

Modified: branches/r5rs/sigscheme/sigscheme.h
===================================================================
--- branches/r5rs/sigscheme/sigscheme.h	2005-12-10 02:57:59 UTC (rev 2506)
+++ branches/r5rs/sigscheme/sigscheme.h	2005-12-10 03:02:51 UTC (rev 2507)
@@ -175,11 +175,6 @@
 #define SCM_PORT_FLUSH(port)                                                 \
     (SCM_ASSERT_LIVE_PORT(port), SCM_CHARPORT_FLUSH(SCM_PORT_IMPL(port)))
 
-/* backward compatibility */
-#define SCM_PORT_GETC(port, c) ((c) = SCM_PORT_GET_CHAR(port))
-#define SCM_PORT_UNGETC(port, c)
-#define SCM_PORT_PRINT SCM_PORT_PUTS
-
 /*
  * SCM_CHARPORT_ERROR and SCM_BYTEPORT_ERROR must be defined before this
  * inclusion



More information about the uim-commit mailing list