Enlightenment CVS committal Author : sebastid Project : e17 Module : libs/ecore
Dir : e17/libs/ecore/src/lib/ecore Modified Files: Ecore_Data.h ecore_hash.c ecore_private.h ecore_sheap.c Log Message: Don't export local defines. =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore/Ecore_Data.h,v retrieving revision 1.14 retrieving revision 1.15 diff -u -3 -r1.14 -r1.15 --- Ecore_Data.h 2 Apr 2005 15:59:55 -0000 1.14 +++ Ecore_Data.h 5 Sep 2005 15:01:40 -0000 1.15 @@ -17,10 +17,6 @@ #endif #endif -# define PRIME_TABLE_MAX 21 -# define PRIME_MIN 17 -# define PRIME_MAX 16777213 - extern const unsigned int ecore_prime_table[]; typedef void (*Ecore_For_Each) (void *value, void *user_data); @@ -314,66 +310,8 @@ int ecore_hash_set(Ecore_Hash *hash, void *key, void *value); void *ecore_hash_remove(Ecore_Hash *hash, void *key); void ecore_hash_dump_graph(Ecore_Hash *hash); - - - inline void ecore_print_warning(const char *function, const char *sparam); - - /* Wrappers around free() that helps debug free() bugs such as freeing NULL - * or accessing a pointer that has already been freed */ -# ifndef IF_FREE -# define IF_FREE(ptr) if (ptr) free(ptr); ptr = NULL; -# endif - -# ifndef FREE -# define FREE(ptr) free(ptr); ptr = NULL; -# endif - - /* Debugging printf, basically a wrapper to fprintf that checks the level - * of the message and checks that it is to be printed at the current debugging - * level */ -# ifndef DPRINTF -# ifdef __sgi -# define DPRINTF(debug, format, args) \ - if (debug >= DEBUG_LEVEL) \ - fprintf(stderr, format, args); -# else -# define DPRINTF(debug, format, args...) \ - if (debug >= DEBUG_LEVEL) \ - fprintf(stderr, format, args); -# endif -# endif - - /* convenience macros for checking pointer parameters for non-NULL */ -# ifndef CHECK_PARAM_POINTER_RETURN -# define CHECK_PARAM_POINTER_RETURN(sparam, param, ret) \ - if (!(param)) \ - { \ - ecore_print_warning(__FUNCTION__, sparam); \ - return ret; \ - } -# endif - -# ifndef CHECK_PARAM_POINTER -# define CHECK_PARAM_POINTER(sparam, param) \ - if (!(param)) \ - { \ - ecore_print_warning(__FUNCTION__, sparam); \ - return; \ - } -# endif - - /* Use the larger of a and b */ -# ifndef MAX -# define MAX(a, b) (((a) > (b)) ? (a) : (b)) -# endif - - /* Use the smaller of a and b */ -# ifndef MIN -# define MIN(a, b) (((a) < (b)) ? (a) : (b)) -# endif - - + typedef struct _ecore_path_group Ecore_Path_Group; struct _ecore_path_group { @@ -437,17 +375,11 @@ void *ecore_plugin_call(Ecore_Plugin * plugin, char *symbol_name); Ecore_List *ecore_plugin_get_available(int group_id); - - + + # define ECORE_SHEAP_MIN 0 # define ECORE_SHEAP_MAX 1 - -# define HEAP_INCREMENT 4096 - -# define PARENT(i) (i / 2) -# define LEFT(i) (2 * i) -# define RIGHT(i) (2 * i + 1) - + typedef struct _ecore_heap Ecore_Sheap; # define ECORE_HEAP(heap) ((Ecore_Sheap *)heap) @@ -588,4 +520,3 @@ } #endif #endif /* _ECORE_DATA_H */ - =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore/ecore_hash.c,v retrieving revision 1.13 retrieving revision 1.14 diff -u -3 -r1.13 -r1.14 --- ecore_hash.c 5 Sep 2005 10:17:08 -0000 1.13 +++ ecore_hash.c 5 Sep 2005 15:01:40 -0000 1.14 @@ -1,6 +1,10 @@ #include "ecore_private.h" #include "Ecore_Data.h" +#define PRIME_TABLE_MAX 21 +#define PRIME_MIN 17 +#define PRIME_MAX 1677721 + #define ECORE_HASH_CHAIN_MAX 3 #define ECORE_COMPUTE_HASH(hash, key) hash->hash_func(key) % \ =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore/ecore_private.h,v retrieving revision 1.16 retrieving revision 1.17 diff -u -3 -r1.16 -r1.17 --- ecore_private.h 5 Sep 2005 10:17:08 -0000 1.16 +++ ecore_private.h 5 Sep 2005 15:01:40 -0000 1.17 @@ -73,7 +73,33 @@ #define ECORE_MAGIC_CHECK(d, m) ((d) && ((d)->__magic == (m))) #define ECORE_MAGIC_FAIL(d, m, fn) _ecore_magic_fail((d), (d) ? (d)->__magic : 0, (m), (fn)); -typedef unsigned int Ecore_Magic; +/* undef the following, we want out version */ +#undef FREE +#define FREE(ptr) free(ptr); ptr = NULL; + +#undef IF_FREE +#define IF_FREE(ptr) if (ptr) free(ptr); ptr = NULL; + +inline void ecore_print_warning(const char *function, const char *sparam); + +/* convenience macros for checking pointer parameters for non-NULL */ +#undef CHECK_PARAM_POINTER_RETURN +#define CHECK_PARAM_POINTER_RETURN(sparam, param, ret) \ + if (!(param)) \ + { \ + ecore_print_warning(__FUNCTION__, sparam); \ + return ret; \ + } + +#undef CHECK_PARAM_POINTER +#define CHECK_PARAM_POINTER(sparam, param) \ + if (!(param)) \ + { \ + ecore_print_warning(__FUNCTION__, sparam); \ + return; \ + } + +typedef unsigned int Ecore_Magic; typedef struct _Ecore_List2 Ecore_List2; typedef struct _Ecore_List2_Data Ecore_List2_Data; =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore/ecore_sheap.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -3 -r1.6 -r1.7 --- ecore_sheap.c 5 Sep 2005 10:17:08 -0000 1.6 +++ ecore_sheap.c 5 Sep 2005 15:01:40 -0000 1.7 @@ -1,6 +1,15 @@ #include "ecore_private.h" #include "Ecore_Data.h" +# define ECORE_SHEAP_MIN 0 +# define ECORE_SHEAP_MAX 1 + +# define HEAP_INCREMENT 4096 + +# define PARENT(i) (i / 2) +# define LEFT(i) (2 * i) +# define RIGHT(i) (2 * i + 1) + static void _ecore_sheap_heapify(Ecore_Sheap *heap, int i); static void _ecore_sheap_update_data(Ecore_Sheap *heap); ------------------------------------------------------- SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs