Enlightenment CVS committal

Author  : cedric
Project : e17
Module  : proto/eina

Dir     : e17/proto/eina/src/lib


Modified Files:
        eina_error.c eina_file.c eina_hash.c eina_inlist.c 
        eina_lalloc.c eina_list.c eina_mempool.c eina_module.c 


Log Message:
Use only the needed headers per file and remove some warning.


===================================================================
RCS file: /cvs/e/e17/proto/eina/src/lib/eina_error.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- eina_error.c        30 Jul 2008 12:46:54 -0000      1.1
+++ eina_error.c        30 Jul 2008 13:35:49 -0000      1.2
@@ -1,4 +1,5 @@
-#include "Eina.h"
+#include "eina_error.h"
+#include "eina_list.h"
 #include "eina_private.h"
 /* TODO
  * + printing errors to stdout or stderr can be implemented
@@ -24,9 +25,9 @@
 
 
 #ifdef DEBUG
-static _error_level = EINA_ERROR_LEVEL_DBG;
+static Eina_Error_Level _error_level = EINA_ERROR_LEVEL_DBG;
 #else
-static _error_level = EINA_ERROR_LEVEL_ERR;
+static Eina_Error_Level _error_level = EINA_ERROR_LEVEL_ERR;
 #endif
 
 static char *_colors[EINA_ERROR_LEVELS] = {
@@ -67,7 +68,7 @@
                char *level;
                /* TODO register the eina's basic errors */
                /* TODO load the environment variable for getting the log level 
*/
-               if (level = getenv("EINA_ERROR_LEVEL"))
+               if ((level = getenv("EINA_ERROR_LEVEL")))
                {
                        _error_level = atoi(level);
                }
@@ -119,7 +120,7 @@
 /**
  *  
  */
-EAPI int eina_error_set(int err)
+EAPI void eina_error_set(int err)
 {
        _err = err;
 }
===================================================================
RCS file: /cvs/e/e17/proto/eina/src/lib/eina_file.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- eina_file.c 30 Jul 2008 12:46:54 -0000      1.1
+++ eina_file.c 30 Jul 2008 13:35:49 -0000      1.2
@@ -1,4 +1,7 @@
-#include "Eina.h"
+#define _GNU_SOURCE
+#include <string.h>
+
+#include "eina_file.h"
 #include "eina_private.h"
 /*============================================================================*
  *                                   API                                      
* 
@@ -18,10 +21,8 @@
        if (!d)
                return;
 
-       while (de = readdir(d))
+       while ((de = readdir(d)))
        {
-               int length;
-
                if (!strcmp(de->d_name, ".") || !strcmp(de->d_name, ".."))
                        continue;
                
@@ -64,7 +65,7 @@
                inc = -1;
                end = (char *)path;
        }
-       for (tmp = p; tmp != end, num != n; tmp += inc)
+       for (tmp = p, delim = p; tmp != end && num != n; tmp += inc)
        {
                if (*tmp == '/')
                {
===================================================================
RCS file: /cvs/e/e17/proto/eina/src/lib/eina_hash.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- eina_hash.c 30 Jul 2008 12:46:54 -0000      1.1
+++ eina_hash.c 30 Jul 2008 13:35:49 -0000      1.2
@@ -1,4 +1,6 @@
-#include "Eina.h"
+#include "eina_hash.h"
+#include "eina_inlist.h"
+#include "eina_error.h"
 #include "eina_private.h"
 /*============================================================================*
  *                                  Local                                     
* 
@@ -94,12 +96,6 @@
        el->data = (void *)data;
        hash_num = _eina_hash_gen(key);
        hash->buckets[hash_num] = eina_inlist_prepend(hash->buckets[hash_num], 
el);
-       if (eina_list_alloc_error())
-       {
-               _eina_hash_alloc_error = 1;
-               free(el);
-               return hash;
-       }
        hash->population++;
        return hash;
 }
@@ -157,12 +153,6 @@
        el->data = (void *)data;
        hash_num = _eina_hash_gen(key);
        hash->buckets[hash_num] = eina_inlist_prepend(hash->buckets[hash_num], 
el);
-       if (eina_list_alloc_error())
-       {
-               _eina_hash_alloc_error = 1;
-               free(el);
-               return hash;
-       }
        hash->population++;
        return hash;
 }
===================================================================
RCS file: /cvs/e/e17/proto/eina/src/lib/eina_inlist.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- eina_inlist.c       30 Jul 2008 12:46:54 -0000      1.1
+++ eina_inlist.c       30 Jul 2008 13:35:49 -0000      1.2
@@ -1,4 +1,4 @@
-#include "Eina.h"
+#include "eina_inlist.h"
 #include "eina_private.h"
 
 /* TODO please, refactor this :) */
===================================================================
RCS file: /cvs/e/e17/proto/eina/src/lib/eina_lalloc.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- eina_lalloc.c       30 Jul 2008 12:46:54 -0000      1.1
+++ eina_lalloc.c       30 Jul 2008 13:35:49 -0000      1.2
@@ -1,4 +1,4 @@
-#include "Eina.h"
+#include "eina_lalloc.h"
 #include "eina_private.h"
 
 struct _Eina_Array
===================================================================
RCS file: /cvs/e/e17/proto/eina/src/lib/eina_list.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- eina_list.c 30 Jul 2008 12:46:54 -0000      1.1
+++ eina_list.c 30 Jul 2008 13:35:49 -0000      1.2
@@ -1,4 +1,4 @@
-#include "Eina.h"
+#include "eina_list.h"
 #include "eina_private.h"
 
 struct _Eina_List /** A linked list node */
===================================================================
RCS file: /cvs/e/e17/proto/eina/src/lib/eina_mempool.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- eina_mempool.c      30 Jul 2008 12:46:54 -0000      1.1
+++ eina_mempool.c      30 Jul 2008 13:35:49 -0000      1.2
@@ -1,4 +1,6 @@
-#include "Eina.h"
+#include "eina_mempool.h"
+#include "eina_list.h"
+#include "eina_module.h"
 #include "eina_private.h"
 /*============================================================================*
  *                                  Local                                     
* 
===================================================================
RCS file: /cvs/e/e17/proto/eina/src/lib/eina_module.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- eina_module.c       30 Jul 2008 12:46:54 -0000      1.1
+++ eina_module.c       30 Jul 2008 13:35:49 -0000      1.2
@@ -1,4 +1,5 @@
-#include "Eina.h"
+#include "eina_module.h"
+#include "eina_file.h"
 #include "eina_private.h"
 
 #include <dirent.h>



-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to