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

kzk at freedesktop.org kzk at freedesktop.org
Thu Jul 28 15:19:08 EST 2005


Author: kzk
Date: 2005-07-27 22:19:05 -0700 (Wed, 27 Jul 2005)
New Revision: 1051

Modified:
   branches/r5rs/sigscheme/read.c
Log:
* sigscheme/read.c
  - (read_char_sequence): handle space (#\ ) correctly.


Modified: branches/r5rs/sigscheme/read.c
===================================================================
--- branches/r5rs/sigscheme/read.c	2005-07-27 20:19:06 UTC (rev 1050)
+++ branches/r5rs/sigscheme/read.c	2005-07-28 05:19:05 UTC (rev 1051)
@@ -460,7 +460,14 @@
                 SigScm_Error("EOF in the char sequence.\n");
                 break;
 
-            case '(':  case ')':  case ' ':  case ';':
+	    case ' ':
+		/* pass through the first ' ' for handling space (#\ ) */
+		if (stringlen == 0) {
+		    stringbuf[stringlen] = (char)c;
+		    stringlen++;
+		    break;
+		}
+            case '(':  case ')':  case ';':
             case '\n': case '\t': case '\"': case '\'':
                 SCM_PORT_UNGETC(port, c);
                 stringbuf[stringlen] = '\0';



More information about the uim-commit mailing list