[uim-commit] r2187 - in branches/r5rs: sigscheme uim

yamaken at freedesktop.org yamaken at freedesktop.org
Sun Nov 20 07:19:29 PST 2005


Author: yamaken
Date: 2005-11-20 07:19:25 -0800 (Sun, 20 Nov 2005)
New Revision: 2187

Modified:
   branches/r5rs/sigscheme/TODO
   branches/r5rs/uim/uim-util.c
Log:
* uim/uim-util.c
  - (string_escape): Add handling for '\v'
* sigscheme/TODO
  - Update


Modified: branches/r5rs/sigscheme/TODO
===================================================================
--- branches/r5rs/sigscheme/TODO	2005-11-20 15:10:26 UTC (rev 2186)
+++ branches/r5rs/sigscheme/TODO	2005-11-20 15:19:25 UTC (rev 2187)
@@ -8,11 +8,6 @@
 * Add tests for proper tail recursion with 'apply' and 'guard' to
   test-tail-rec.scm
 
-* 
-  - Provide a string escaping procedure. If a SRFI or another de facto standard
-    API for such purpose is existing, use it
-  - [uim] Implement string-escape as same as trunk
-
 * Add integer->char and char->integer procedures with multibyte support
 
 * Inhibit a mutation on string constants as described in "3.4 Storage model" of

Modified: branches/r5rs/uim/uim-util.c
===================================================================
--- branches/r5rs/uim/uim-util.c	2005-11-20 15:10:26 UTC (rev 2186)
+++ branches/r5rs/uim/uim-util.c	2005-11-20 15:19:25 UTC (rev 2187)
@@ -655,8 +655,13 @@
   for (s = c_str; (*s); s++) {
     ch = (*s);
     switch (ch) {
-    case '\"': case '\\': case '\n':
-    case '\r': case '\t': case '\f':
+    case '\"':
+    case '\\':
+    case '\n':
+    case '\r':
+    case '\t':
+    case '\f':
+    case '\v':
       len += 2;
       break;
 
@@ -678,6 +683,7 @@
     case '\r': ret[i]='\\'; ret[++i]='r';  break;
     case '\t': ret[i]='\\'; ret[++i]='t';  break;
     case '\f': ret[i]='\\'; ret[++i]='f';  break;
+    case '\v': ret[i]='\\'; ret[++i]='v';  break;
 
     default:
       ret[i] = ch;



More information about the uim-commit mailing list