[uim-commit] r312 - trunk/uim

yamaken@freedesktop.org yamaken@freedesktop.org
Mon Jan 17 04:58:10 PST 2005


Author: yamaken
Date: 2005-01-17 04:58:07 -0800 (Mon, 17 Jan 2005)
New Revision: 312

Modified:
   trunk/uim/uim-custom.c
Log:
* uim/uim-custom.c
  - (extract_key_literal): Revert the C reimplementation of string
    quotation in r311 to Scheme (the bugfix is applied. thanks). We
    should done most job by Scheme, at least in uim-custom.c to keep
    easy rewritability since various part of uim-custom
    implementations may be altered


Modified: trunk/uim/uim-custom.c
===================================================================
--- trunk/uim/uim-custom.c	2005-01-17 10:23:04 UTC (rev 311)
+++ trunk/uim/uim-custom.c	2005-01-17 12:58:07 UTC (rev 312)
@@ -439,16 +439,9 @@
 
   switch (custom_key->type) {
   case UCustomKey_Regular:
-  {
-    int len = strlen(custom_key->literal);
-
-    literal = malloc(len + 2 + 1);
-    literal[0] = '"';
-    strcpy(literal + 1, custom_key->literal);
-    literal[len + 1] = '"';
-    literal[len + 2] = '\0';
+    UIM_EVAL_FSTRING1(NULL, "\"\\\"%s\\\"\"", custom_key->literal);
+    literal = uim_scm_c_str(uim_scm_return_value());
     break;
-  }
   case UCustomKey_Reference:
     literal = strdup(custom_key->literal);
     break;



More information about the Uim-commit mailing list