Enlightenment CVS committal

Author  : tsauerbeck
Project : e17
Module  : libs/edje

Dir     : e17/libs/edje/src/bin


Modified Files:
        edje_cc_sources.c 


Log Message:
fixed an endless loop caused by unexpected preprocessor commands. tweaked the code a 
bit so its more readable, hopefully.
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/edje/src/bin/edje_cc_sources.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -3 -r1.4 -r1.5
--- edje_cc_sources.c   31 Aug 2004 04:00:14 -0000      1.4
+++ edje_cc_sources.c   8 Oct 2004 17:03:04 -0000       1.5
@@ -1,3 +1,7 @@
+/*
+ * vim:ts=8:sw=3:sts=3:noexpandtab
+ */
+
 #include "edje_cc.h"
 
 static Eet_Data_Descriptor *_srcfile_edd = NULL;
@@ -79,26 +83,20 @@
    
    while (fgets(buf, sizeof(buf), f))
      {
-       char *p, *pp;
-       int notyet;
-       int forgetit;
-       int haveinclude;
-       int havefile;
-       char *file;
+       char *p = buf, *pp;
+       int got_hash = 0;
+       int forgetit = 0;
+       int haveinclude = 0;
+       char *file = NULL;
        
-       p = buf;
-       notyet = 1;
-       forgetit = 0;
-       haveinclude = 0;
-       file = NULL;
        while ((!forgetit) && (*p))
          {
-            if (notyet)
+            if (!got_hash)
               {
                  if (!isspace(*p))
                    {
                       if (*p == '#')
-                        notyet = 0;
+                        got_hash = 1;
                       else
                         forgetit = 1;
                    }
@@ -155,6 +153,8 @@
                       else
                         p++;
                    }
+
+                 got_hash = 0;
               }
          }
        if (file)




-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to