Enlightenment CVS committal

Author  : raster
Project : e17
Module  : libs/evas

Dir     : e17/libs/evas/src/lib/canvas


Modified Files:
        evas_object_textblock.c 


Log Message:


more escape handling

===================================================================
RCS file: 
/cvsroot/enlightenment/e17/libs/evas/src/lib/canvas/evas_object_textblock.c,v
retrieving revision 1.101
retrieving revision 1.102
diff -u -3 -r1.101 -r1.102
--- evas_object_textblock.c     14 Sep 2005 13:13:55 -0000      1.101
+++ evas_object_textblock.c     14 Sep 2005 13:45:12 -0000      1.102
@@ -1061,6 +1061,22 @@
    return 0;
 }
 
+static char *
+_str_deescape(char *str)
+{
+   char *s2, *s, *d;
+   
+   s2 = malloc(strlen(str) + 1);
+   if (!s2) return NULL;
+   for (s = str, d = s2; *s != 0; s++, d++)
+     {
+       if ((*s == '\\') && (s[1] != 0)) s++;
+       *d = *s;
+     }
+   *d = 0;
+   return s2;
+}
+
 static void
 _format_param_parse(char *item, char **key, char **val)
 {
@@ -1074,22 +1090,7 @@
    k[p - item] = 0;
    *key = k;
    p++;
-   v = strdup(p);
-   pv = v;
-   for (;;)
-     {
-       if (*p == 0)
-         {
-            *pv = 0;
-            break;
-         }
-       else if (*p != '"')
-         {
-            *pv = *p;
-         }
-       pv++;
-       p++;
-     }
+   v = _str_deescape(p);
    *val = v;
 }
 




-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to