Enlightenment CVS committal

Author  : raster
Project : e17
Module  : libs/edje

Dir     : e17/libs/edje/src/bin


Modified Files:
        edje_cc_parse.c edje_cc_sources.c 


Log Message:


less stack for the parser - scratchbox hates the big stack usage :)

===================================================================
RCS file: /cvs/e/e17/libs/edje/src/bin/edje_cc_parse.c,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -3 -r1.41 -r1.42
--- edje_cc_parse.c     13 Aug 2006 10:37:04 -0000      1.41
+++ edje_cc_parse.c     17 Jun 2007 06:51:42 -0000      1.42
@@ -622,7 +622,7 @@
    char buf[4096];
    char inc[4096];
    static char tmpn[4096];
-   
+
    strcpy(tmpn, "/tmp/edje_cc.edc-tmp-XXXXXX");
    strncpy(inc, file_in, 4000);
    inc[4001] = 0;
===================================================================
RCS file: /cvs/e/e17/libs/edje/src/bin/edje_cc_sources.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -3 -r1.15 -r1.16
--- edje_cc_sources.c   23 May 2006 03:23:31 -0000      1.15
+++ edje_cc_sources.c   17 Jun 2007 06:51:42 -0000      1.16
@@ -56,15 +56,17 @@
    EET_DATA_DESCRIPTOR_ADD_LIST(_font_list_edd, Font_List, "list", list, 
_font_edd);
 }
 
+static void source_fetch_file(const char *fil, const char *filname);
+
 static void
-source_fetch_file(char *fil, char *filname)
+source_fetch_file(const char *fil, const char *filname)
 {
    FILE *f;
-   char buf[256 * 1024], *dir = NULL;
+   char buf[16 * 1024], *dir = NULL;
    long sz;
    ssize_t dir_len = 0;
    SrcFile *sf;
-   
+
    f = fopen(fil, "rb");
    if (!f)
      {
@@ -86,12 +88,13 @@
 
    while (fgets(buf, sizeof(buf), f))
      {
-       char *p = buf, *pp;
+       char *p, *pp;
        int got_hash = 0;
        int forgetit = 0;
        int haveinclude = 0;
        char *file = NULL, *fname = NULL;
        
+       p = buf;
        while ((!forgetit) && (*p))
          {
             if (!got_hash)
@@ -122,7 +125,7 @@
                        * since according to the standard, preprocessor
                        * statements need to be put in column 0.
                        */
-                      else if (!strncmp (p, "#include", 8))
+                      else if (!strncmp(p, "#include", 8))
                         {
                            haveinclude = 1;
                            p += 8;
@@ -137,10 +140,8 @@
                    {
                       char end = '\0';
 
-                      if (*p == '"')
-                           end = '"';
-                      else if (*p == '<')
-                           end = '>';
+                      if (*p == '"') end = '"';
+                      else if (*p == '<') end = '>';
 
                       if (end)
                         {
@@ -155,17 +156,17 @@
                                 /* get the directory of the current file
                                  * if we haven't already done so
                                  */
-                                if (!dir && strrchr(fil, '/'))
+                                if ((!dir) && (strrchr(fil, '/')))
                                   {
                                      dir = mem_strdup(fil);
                                      slash = strrchr(dir, '/');
                                      *slash = '\0';
                                      dir_len = strlen(dir);
                                   }
-
+                                
                                 l = pp - p + dir_len + 1;
                                 file = mem_alloc(l);
-
+                                
                                 if (!dir_len)
                                   snprintf(file, l - 1, "%s", p + 1);
                                 else
@@ -193,7 +194,7 @@
             free(fname);
          }
      }
-   free (dir);
+   free(dir);
    fclose(f);
 }
 



-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to