Enlightenment CVS committal

Author  : raster
Project : e17
Module  : libs/eet

Dir     : e17/libs/eet/src/lib


Modified Files:
        eet_data.c eet_lib.c 


Log Message:


and now we have a small tool that can extract, import, list, decode, encode
etc. data from eet files. just run eet for usage.

===================================================================
RCS file: /cvs/e/e17/libs/eet/src/lib/eet_data.c,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -3 -r1.47 -r1.48
--- eet_data.c  8 Sep 2007 07:44:03 -0000       1.47
+++ eet_data.c  8 Sep 2007 09:35:40 -0000       1.48
@@ -212,6 +212,7 @@
    if (((char *)src + sizeof(char)) > (char *)src_end) return -1;
    s = (char *)src;
    d = (char *)dst;
+   if (*s == 0) return NULL;
    *d = *s;
    CONV8(*d);
    return sizeof(char);
@@ -225,6 +226,7 @@
    d = (char *)malloc(sizeof(char));
    if (!d) return NULL;
    s = (char *)src;
+   if (*s == 0) return NULL;
    *d = *s;
    CONV8(*d);
    *size_ret = sizeof(char);
@@ -252,6 +254,7 @@
    d = (short *)malloc(sizeof(short));
    if (!d) return NULL;
    s = (short *)src;
+   if (*s == 0) return NULL;
    *d = *s;
    CONV16(*d);
    *size_ret = sizeof(short);
@@ -279,6 +282,7 @@
    d = (int *)malloc(sizeof(int));
    if (!d) return NULL;
    s = (int *)src;
+   if (*s == 0) return NULL;
    *d = *s;
    CONV32(*d);
    *size_ret = sizeof(int);
@@ -306,6 +310,7 @@
    d = (unsigned long long *)malloc(sizeof(unsigned long long));
    if (!d) return NULL;
    s = (unsigned long long *)src;
+   if (*s == 0) return NULL;
    *d = *s;
    CONV64(*d);
    *size_ret = sizeof(unsigned long long);
@@ -390,6 +395,7 @@
    int len;
 
    s = (float *)src;
+   if (*s == 0.0) return NULL;
    prev_locale = setlocale(LC_NUMERIC, "C");
    snprintf(buf, sizeof(buf), "%a", (double)(*s));
    if (prev_locale) setlocale(LC_NUMERIC, prev_locale);
@@ -437,6 +443,7 @@
    int len;
 
    s = (double *)src;
+   if (*s == 0.0) return NULL;
    prev_locale = setlocale(LC_NUMERIC, "C");
    snprintf(buf, sizeof(buf), "%a", (double)(*s));
    if (prev_locale) setlocale(LC_NUMERIC, prev_locale);
===================================================================
RCS file: /cvs/e/e17/libs/eet/src/lib/eet_lib.c,v
retrieving revision 1.77
retrieving revision 1.78
diff -u -3 -r1.77 -r1.78
--- eet_lib.c   28 Jun 2007 23:22:20 -0000      1.77
+++ eet_lib.c   8 Sep 2007 09:35:41 -0000       1.78
@@ -629,8 +629,8 @@
        EXTRACT_INT(byte_entries, ef->data, index);
 
        /* we cant have <= 0 values here - invalid */
-       if (eet_test_close((num_entries <= 0) || (byte_entries <= 0), ef))
-         return NULL;
+//     if (eet_test_close((num_entries <= 0) || (byte_entries <= 0), ef))
+//       return NULL;
 
        /* we can't have more entires than minimum bytes for those! invalid! */
        if (eet_test_close((num_entries * 20) > byte_entries, ef))



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to