[uim-commit] r2038 - trunk/uim
yamaken at freedesktop.org
yamaken at freedesktop.org
Sun Nov 6 23:38:14 PST 2005
Author: yamaken
Date: 2005-11-06 23:38:05 -0800 (Sun, 06 Nov 2005)
New Revision: 2038
Modified:
trunk/uim/slib.c
Log:
* uim/slib.c
- (lreadstring, string_prin1): Support R6RS(SRFI-75) and C89
compliant escape sequences \a, \b, \v, \f
Modified: trunk/uim/slib.c
===================================================================
--- trunk/uim/slib.c 2005-11-07 07:15:41 UTC (rev 2037)
+++ trunk/uim/slib.c 2005-11-07 07:38:05 UTC (rev 2038)
@@ -1045,6 +1045,18 @@
case 'r':
c = '\r';
break;
+ case 'f':
+ c = '\f';
+ break;
+ case 'a':
+ c = '\a';
+ break;
+ case 'b':
+ c = '\b';
+ break;
+ case 'v':
+ c = '\v';
+ break;
case 'd':
c = 0x04;
break;
@@ -2348,7 +2360,7 @@
{
case tc_string:
gput_st (f, "\"");
- if (strcspn (ptr->storage_as.string.data, "\"\\\n\r\t") ==
+ if (strcspn (ptr->storage_as.string.data, "\"\\\n\r\t\f\a\b\v") ==
strlen (ptr->storage_as.string.data))
gput_st (f, ptr->storage_as.string.data);
else
@@ -2375,6 +2387,18 @@
case '\t':
gput_st (f, "\\t");
break;
+ case '\f':
+ gput_st (f, "\\f");
+ break;
+ case '\a':
+ gput_st (f, "\\a");
+ break;
+ case '\b':
+ gput_st (f, "\\b");
+ break;
+ case '\v':
+ gput_st (f, "\\v");
+ break;
default:
cbuff[0] = c;
cbuff[1] = 0;
More information about the uim-commit
mailing list