Enlightenment CVS committal

Author  : onefang
Project : e17
Module  : apps/e_utils

Dir     : e17/apps/e_utils/src/bin/e17genmenu


Modified Files:
        parse.c 


Log Message:
Patch for saner parsing of debian menu files by Matt Wallace.

Thank you Matt.

===================================================================
RCS file: /cvs/e/e17/apps/e_utils/src/bin/e17genmenu/parse.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -3 -r1.16 -r1.17
--- parse.c     21 Aug 2006 04:47:56 -0000      1.16
+++ parse.c     22 Aug 2006 23:48:19 -0000      1.17
@@ -272,32 +272,32 @@
         length = strlen(buffer);
         if (buffer[length - 1] == '\n')
            buffer[length - 1] = '\0';
-        if (strstr(buffer, "title"))
+        if (strstr(buffer, "title="))
           {
              name = _parse_buffer(buffer, "title=");
-             eap->name = strdup(name);
+             eap->name = (name == NULL ? NULL : strdup(name));
           }
-        if (strstr(buffer, "longtitle"))
+        if (strstr(buffer, "longtitle="))
           {
              generic = _parse_buffer(buffer, "longtitle=");
-             eap->generic = strdup(generic);
+             eap->generic = (generic == NULL ? NULL : strdup(generic));
           }
-        if (strstr(buffer, "description"))
+        if (strstr(buffer, "description="))
           {
              comment = _parse_buffer(buffer, "description=");
-             eap->comment = strdup(comment);
+             eap->comment = (comment == NULL ? NULL : strdup(comment));
           }
-        if (strstr(buffer, "section"))
+        if (strstr(buffer, "section="))
           {
              category = _parse_buffer(buffer, "section=");
-             eap->categories = strdup(category);
+             eap->categories = (category == NULL ? NULL : strdup(category));
           }
-        if (strstr(buffer, "command"))
+        if (strstr(buffer, "command="))
           {
              exec = _parse_buffer(buffer, "command=");
-             eap->exec = strdup(exec);
+             eap->exec = (exec == NULL ? NULL : strdup(exec));
           }
-        if (strstr(buffer, "icon"))
+        if (strstr(buffer, "icon="))
           {
              icon = _parse_buffer(buffer, "icon128x128");
              if (!icon) icon = _parse_buffer(buffer, "icon96x96");



-------------------------------------------------------------------------
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