Enlightenment CVS committal

Author  : raster
Project : e17
Module  : libs/eet

Dir     : e17/libs/eet/src/lib


Modified Files:
        eet_lib.c 


Log Message:


oops - broke writing. flush bad. fixed.

===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/eet/src/lib/eet_lib.c,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -3 -r1.33 -r1.34
--- eet_lib.c   26 May 2005 03:57:57 -0000      1.33
+++ eet_lib.c   26 May 2005 06:15:48 -0000      1.34
@@ -239,7 +239,7 @@
    /* calculate total size in bytes of directory block */
    size = 0;
    count = 0;
-   num = (1 << (ef->header->directory->size - 1));
+   num = (1 << ef->header->directory->size);
    for (i = 0; i < num; i++)
      {
        for (efn = ef->header->directory->nodes[i]; efn; efn = efn->next)
@@ -281,12 +281,12 @@
      {
        for (efn = ef->header->directory->nodes[i]; efn; efn = efn->next)
          {
-            unsigned char *buf;
-            int buf_size;
-            int name_size;
-
             if (efn->compression >= 0)
               {
+                 unsigned char *buf;
+                 int buf_size;
+                 int name_size;
+
                  name_size = strlen(efn->name);
                  buf_size = 20 + name_size;
                  buf = malloc(buf_size);
@@ -715,7 +715,6 @@
    if (!ef->header->directory) return NULL;
    /* get hash bucket this should be in */
    hash = eet_hash_gen(name, ef->header->directory->size);
-//   printf("read %s\n", name);
    /* hunt hash bucket */
    for (efn = ef->header->directory->nodes[hash]; efn; efn = efn->next)
      {
@@ -856,8 +855,7 @@
    /* dup data */
    data_size = size;
    /* have bigger buffer for compress */
-   if (compress == 1)
-     data_size = 12 + ((size * 101) / 100);
+   if (compress == 1) data_size = 12 + ((size * 101) / 100);
    data2 = malloc(data_size);
    if (!data2)
      {
@@ -925,10 +923,8 @@
             free(data2);
             return 0;
          }
-       /* resized node list set up */
        efn->next = ef->header->directory->nodes[hash];
        ef->header->directory->nodes[hash] = efn;
-       /* new node at end */
        efn->name = name2;
        efn->offset = 0;
        efn->compression = compress;
@@ -939,7 +935,6 @@
 
    /* flags that writes are pending */
    ef->writes_pending = 1;
-   /* update access time */
    return data_size;
 }
 




-------------------------------------------------------
SF.Net email is sponsored by: GoToMeeting - the easiest way to collaborate
online with coworkers and clients while avoiding the high cost of travel and
communications. There is no equipment to buy and you can meet as often as
you want. Try it free.http://ads.osdn.com/?ad_id=7402&alloc_id=16135&op=click
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to