[uim-commit] r2041 - branches/r5rs/uim
kzk at freedesktop.org
kzk at freedesktop.org
Mon Nov 7 00:06:48 PST 2005
Author: kzk
Date: 2005-11-07 00:06:16 -0800 (Mon, 07 Nov 2005)
New Revision: 2041
Modified:
branches/r5rs/uim/uim-util.c
Log:
* uim/uim-util.c
- (string_escape): change to handle '\t' and '\r'
Modified: branches/r5rs/uim/uim-util.c
===================================================================
--- branches/r5rs/uim/uim-util.c 2005-11-07 07:57:37 UTC (rev 2040)
+++ branches/r5rs/uim/uim-util.c 2005-11-07 08:06:16 UTC (rev 2041)
@@ -655,7 +655,8 @@
for (s = c_str; (*s); s++) {
ch = (*s);
switch (ch) {
- case '\"': case '\\': case '\n': case '\r':
+ case '\"': case '\\': case '\n':
+ case '\r': case '\t': case '\f':
len += 2;
break;
@@ -675,6 +676,8 @@
case '\\': ret[i]='\\'; ret[++i]='\\'; break;
case '\n': ret[i]='\\'; ret[++i]='n'; break;
case '\r': ret[i]='\\'; ret[++i]='r'; break;
+ case '\t': ret[i]='\\'; ret[++i]='t'; break;
+ case '\f': ret[i]='\\'; ret[++i]='f'; break;
default:
ret[i] = ch;
More information about the uim-commit
mailing list