Enlightenment CVS committal

Author  : kwo
Project : e16
Module  : e

Dir     : e16/e/src


Modified Files:
        fonts.c 


Log Message:
Allow spaces in font names.

===================================================================
RCS file: /cvs/e/e16/e/src/fonts.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -3 -r1.6 -r1.7
--- fonts.c     18 Feb 2006 08:30:08 -0000      1.6
+++ fonts.c     11 Oct 2006 16:07:24 -0000      1.7
@@ -22,6 +22,7 @@
  */
 #include "E.h"
 #include "e16-ecore_list.h"
+#include "parse.h"
 
 typedef struct
 {
@@ -92,8 +93,7 @@
    int                 err = 0;
    FontAlias          *fa;
    char                s[FILEPATH_LEN_MAX];
-   char                s1[FILEPATH_LEN_MAX];
-   char                s2[FILEPATH_LEN_MAX];
+   char                s1[128];
    int                 i1, ret;
 
    while (GetLine(s, sizeof(s), fs))
@@ -113,14 +113,15 @@
          }
        else
          {
-            s1[0] = s2[0] = '\0';
-            ret = sscanf(s, "%4000s %4000s", s1, s2);
-            if (ret != 2)
+            s1[0] = '\0';
+            i1 = 0;
+            sscanf(s, "%120s %n", s1, &i1);
+            if (i1 <= 1)
               {
                  Eprintf("Ignoring line: %s\n", s);
-                 break;
+                 continue;
               }
-            fa = FontAliasCreate(s1, s2);
+            fa = FontAliasCreate(s1, s + i1);
          }
      }
 



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to