Enlightenment CVS committal Author : doursse Project : e17 Module : libs/evas
Dir : e17/libs/evas/src/lib/data Modified Files: evas_array.c evas_array_hash.c evas_hash.c evas_list.c evas_mempool.c evas_mempool.h evas_object_list.c evas_stringshare.c Log Message: * copy inlined needed functions in evas_array.c, hence remove dependancy of evas_common.h * use size_t when needed * add vim header =================================================================== RCS file: /cvs/e/e17/libs/evas/src/lib/data/evas_array.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -3 -r1.4 -r1.5 --- evas_array.c 12 Jun 2008 13:22:26 -0000 1.4 +++ evas_array.c 18 Jul 2008 09:38:02 -0000 1.5 @@ -1,11 +1,46 @@ -#include "evas_common.h" -#include "evas_private.h" +/* + * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2 + */ -Evas_Bool +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#include <stdlib.h> + +#include "Evas_Data.h" + + +#ifdef __GNUC__ +# define UNLIKELY(x) __builtin_expect(!!(x), 0) +#else +# define UNLIKELY(x) (x) +#endif + + +static Evas_Bool _evas_array_grow(Evas_Array *array); + +static inline void +_evas_array_append(Evas_Array *array, void *data) +{ + if (UNLIKELY((array->count + array->step) > array->total)) + if (!_evas_array_grow(array)) return ; + + array->data[array->count++] = data; +} + +static inline void* +_evas_array_get(Evas_Array *array, unsigned int index) +{ + return array->data[index]; +} + + +static Evas_Bool _evas_array_grow(Evas_Array *array) { void **tmp; - unsigned int total; + size_t total; total = array->total + array->step; tmp = realloc(array->data, sizeof (void*) * total); =================================================================== RCS file: /cvs/e/e17/libs/evas/src/lib/data/evas_array_hash.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -3 -r1.2 -r1.3 --- evas_array_hash.c 10 Jul 2008 21:14:43 -0000 1.2 +++ evas_array_hash.c 18 Jul 2008 09:38:03 -0000 1.3 @@ -1,4 +1,12 @@ -#include "evas_common.h" +/* + * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2 + */ + +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#include "Evas_Data.h" #define EAH_BUCKETS 256 #define EAH_HASH(key) \ =================================================================== RCS file: /cvs/e/e17/libs/evas/src/lib/data/evas_hash.c,v retrieving revision 1.25 retrieving revision 1.26 diff -u -3 -r1.25 -r1.26 --- evas_hash.c 2 Jul 2008 04:44:38 -0000 1.25 +++ evas_hash.c 18 Jul 2008 09:38:03 -0000 1.26 @@ -1,5 +1,15 @@ -#include "evas_common.h" -#include "evas_private.h" +/* + * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2 + */ + +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#include <stdlib.h> +#include <string.h> + +#include "Evas_Data.h" typedef struct _Evas_Hash_El Evas_Hash_El; =================================================================== RCS file: /cvs/e/e17/libs/evas/src/lib/data/evas_list.c,v retrieving revision 1.32 retrieving revision 1.33 diff -u -3 -r1.32 -r1.33 --- evas_list.c 10 Jul 2008 16:38:54 -0000 1.32 +++ evas_list.c 18 Jul 2008 09:38:03 -0000 1.33 @@ -1,8 +1,15 @@ /* * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2 */ -#include "evas_common.h" -#include "evas_mempool.h" + +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#include <stdlib.h> + +#include "Evas_Data.h" +#include <evas_mempool.h> typedef struct _Evas_List_Accounting Evas_List_Accounting; =================================================================== RCS file: /cvs/e/e17/libs/evas/src/lib/data/evas_mempool.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 --- evas_mempool.c 10 Jul 2008 16:38:54 -0000 1.1 +++ evas_mempool.c 18 Jul 2008 09:38:03 -0000 1.2 @@ -2,9 +2,14 @@ * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2 */ +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + #include <stdlib.h> #include <string.h> +#include "Evas_Data.h" #include "evas_mempool.h" //#define NOPOOL =================================================================== RCS file: /cvs/e/e17/libs/evas/src/lib/data/evas_mempool.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 --- evas_mempool.h 10 Jul 2008 16:38:54 -0000 1.1 +++ evas_mempool.h 18 Jul 2008 09:38:03 -0000 1.2 @@ -1,3 +1,7 @@ +/* + * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2 + */ + #ifndef _EVAS_MEMPOOL_H #define _EVAS_MEMPOOL_H =================================================================== RCS file: /cvs/e/e17/libs/evas/src/lib/data/evas_object_list.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -3 -r1.5 -r1.6 --- evas_object_list.c 22 May 2005 02:49:36 -0000 1.5 +++ evas_object_list.c 18 Jul 2008 09:38:03 -0000 1.6 @@ -1,4 +1,14 @@ -#include "evas_common.h" +/* + * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2 + */ + +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#include <stdlib.h> + +#include "Evas_Data.h" /* list ops */ void * =================================================================== RCS file: /cvs/e/e17/libs/evas/src/lib/data/evas_stringshare.c,v retrieving revision 1.14 retrieving revision 1.15 diff -u -3 -r1.14 -r1.15 --- evas_stringshare.c 8 May 2008 08:34:55 -0000 1.14 +++ evas_stringshare.c 18 Jul 2008 09:38:03 -0000 1.15 @@ -1,5 +1,17 @@ -#include "evas_common.h" -#include "evas_private.h" +/* + * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2 + */ + +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#include <stdlib.h> +#include <stdio.h> +#include <string.h> + + +#include "Evas_Data.h" typedef struct _Evas_Stringshare Evas_Stringshare; typedef struct _Evas_Stringshare_El Evas_Stringshare_El; @@ -16,7 +28,7 @@ int references; }; -static Evas_Stringshare share = +static Evas_Stringshare share = { { NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, ------------------------------------------------------------------------- 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