diff options
Diffstat (limited to 'tests/suite/ecore/src/include')
38 files changed, 1305 insertions, 923 deletions
diff --git a/tests/suite/ecore/src/include/Eina.h b/tests/suite/ecore/src/include/Eina.h index eb0263f6c2..a7bda06aa8 100644 --- a/tests/suite/ecore/src/include/Eina.h +++ b/tests/suite/ecore/src/include/Eina.h @@ -114,7 +114,7 @@ #include <dirent.h> #ifdef _WIN32 -# include <Evil.h> +#include <Evil.h> #endif #ifdef __cplusplus @@ -161,5 +161,4 @@ extern "C" { #ifdef __cplusplus } #endif - -#endif /* EINA_H */ +#endif /* EINA_H */ diff --git a/tests/suite/ecore/src/include/eina_accessor.h b/tests/suite/ecore/src/include/eina_accessor.h index 4d2f92e0a1..f3f29a4849 100644 --- a/tests/suite/ecore/src/include/eina_accessor.h +++ b/tests/suite/ecore/src/include/eina_accessor.h @@ -42,46 +42,49 @@ */ typedef struct _Eina_Accessor Eina_Accessor; -typedef Eina_Bool (*Eina_Accessor_Get_At_Callback)(Eina_Accessor *it, - unsigned int index, - void **data); -typedef void *(*Eina_Accessor_Get_Container_Callback)(Eina_Accessor *it); -typedef void (*Eina_Accessor_Free_Callback)(Eina_Accessor *it); -typedef Eina_Bool (*Eina_Accessor_Lock_Callback)(Eina_Accessor *it); - -struct _Eina_Accessor -{ +typedef Eina_Bool(*Eina_Accessor_Get_At_Callback) (Eina_Accessor * it, + unsigned int index, + void **data); +typedef void *(*Eina_Accessor_Get_Container_Callback) (Eina_Accessor * it); +typedef void (*Eina_Accessor_Free_Callback) (Eina_Accessor * it); +typedef Eina_Bool(*Eina_Accessor_Lock_Callback) (Eina_Accessor * it); + +struct _Eina_Accessor { #define EINA_ACCESSOR_VERSION 1 - int version; + int version; - Eina_Accessor_Get_At_Callback get_at EINA_ARG_NONNULL(1, 3) EINA_WARN_UNUSED_RESULT; - Eina_Accessor_Get_Container_Callback get_container EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT; - Eina_Accessor_Free_Callback free EINA_ARG_NONNULL(1); + Eina_Accessor_Get_At_Callback get_at EINA_ARG_NONNULL(1, + 3) + EINA_WARN_UNUSED_RESULT; + Eina_Accessor_Get_Container_Callback get_container + EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT; + Eina_Accessor_Free_Callback free EINA_ARG_NONNULL(1); - Eina_Accessor_Lock_Callback lock EINA_WARN_UNUSED_RESULT; - Eina_Accessor_Lock_Callback unlock EINA_WARN_UNUSED_RESULT; + Eina_Accessor_Lock_Callback lock EINA_WARN_UNUSED_RESULT; + Eina_Accessor_Lock_Callback unlock EINA_WARN_UNUSED_RESULT; #define EINA_MAGIC_ACCESSOR 0x98761232 - EINA_MAGIC -}; + EINA_MAGIC}; #define FUNC_ACCESSOR_GET_AT(Function) ((Eina_Accessor_Get_At_Callback)Function) #define FUNC_ACCESSOR_GET_CONTAINER(Function) ((Eina_Accessor_Get_Container_Callback)Function) #define FUNC_ACCESSOR_FREE(Function) ((Eina_Accessor_Free_Callback)Function) #define FUNC_ACCESSOR_LOCK(Function) ((Eina_Accessor_Lock_Callback)Function) -EAPI void eina_accessor_free(Eina_Accessor *accessor) EINA_ARG_NONNULL(1); -EAPI Eina_Bool eina_accessor_data_get(Eina_Accessor *accessor, - unsigned int position, - void **data) EINA_ARG_NONNULL(1); -EAPI void * eina_accessor_container_get(Eina_Accessor *accessor) EINA_ARG_NONNULL(1) EINA_PURE; -EAPI void eina_accessor_over(Eina_Accessor *accessor, - Eina_Each_Cb cb, - unsigned int start, - unsigned int end, - const void *fdata) EINA_ARG_NONNULL(1, 2); -EAPI Eina_Bool eina_accessor_lock(Eina_Accessor *accessor) EINA_ARG_NONNULL(1); -EAPI Eina_Bool eina_accessor_unlock(Eina_Accessor *accessor) EINA_ARG_NONNULL(1); +EAPI void eina_accessor_free(Eina_Accessor * accessor) EINA_ARG_NONNULL(1); +EAPI Eina_Bool eina_accessor_data_get(Eina_Accessor * accessor, + unsigned int position, + void **data) EINA_ARG_NONNULL(1); +EAPI void *eina_accessor_container_get(Eina_Accessor * + accessor) EINA_ARG_NONNULL(1) + EINA_PURE; +EAPI void eina_accessor_over(Eina_Accessor * accessor, Eina_Each_Cb cb, + unsigned int start, unsigned int end, + const void *fdata) EINA_ARG_NONNULL(1, 2); +EAPI Eina_Bool eina_accessor_lock(Eina_Accessor * + accessor) EINA_ARG_NONNULL(1); +EAPI Eina_Bool eina_accessor_unlock(Eina_Accessor * + accessor) EINA_ARG_NONNULL(1); /** * @def EINA_ACCESSOR_FOREACH diff --git a/tests/suite/ecore/src/include/eina_array.h b/tests/suite/ecore/src/include/eina_array.h index cb0d12a1a8..fa647dcef3 100644 --- a/tests/suite/ecore/src/include/eina_array.h +++ b/tests/suite/ecore/src/include/eina_array.h @@ -63,42 +63,52 @@ typedef void **Eina_Array_Iterator; * @struct _Eina_Array * Type for an array of data. */ -struct _Eina_Array -{ +struct _Eina_Array { #define EINA_ARRAY_VERSION 1 - int version; /**< Should match EINA_ARRAY_VERSION used when compiled your apps, provided for ABI compatibility */ - - void **data; /**< Pointer to a vector of pointer to payload */ - unsigned int total; /**< Total number of slots in the vector */ - unsigned int count; /**< Number of active slots in the vector */ - unsigned int step; /**< How much must we grow the vector when it is full */ - EINA_MAGIC -}; - -EAPI Eina_Array * eina_array_new(unsigned int step) EINA_WARN_UNUSED_RESULT EINA_MALLOC EINA_WARN_UNUSED_RESULT; -EAPI void eina_array_free(Eina_Array *array) EINA_ARG_NONNULL(1); -EAPI void eina_array_step_set(Eina_Array *array, - unsigned int sizeof_eina_array, - unsigned int step) EINA_ARG_NONNULL(1); -EAPI void eina_array_clean(Eina_Array *array) EINA_ARG_NONNULL(1); -EAPI void eina_array_flush(Eina_Array *array) EINA_ARG_NONNULL(1); -EAPI Eina_Bool eina_array_remove(Eina_Array *array, - Eina_Bool(*keep)(void *data, void *gdata), - void *gdata) EINA_ARG_NONNULL(1, 2); -static inline Eina_Bool eina_array_push(Eina_Array *array, - const void *data) EINA_ARG_NONNULL(1, 2); -static inline void * eina_array_pop(Eina_Array *array) EINA_ARG_NONNULL(1); -static inline void * eina_array_data_get(const Eina_Array *array, - unsigned int idx) EINA_ARG_NONNULL(1); -static inline void eina_array_data_set(const Eina_Array *array, - unsigned int idx, - const void *data) EINA_ARG_NONNULL(1, 3); -static inline unsigned int eina_array_count_get(const Eina_Array *array) EINA_ARG_NONNULL(1); -EAPI Eina_Iterator * eina_array_iterator_new(const Eina_Array *array) EINA_MALLOC EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT; -EAPI Eina_Accessor * eina_array_accessor_new(const Eina_Array *array) EINA_MALLOC EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT; -static inline Eina_Bool eina_array_foreach(Eina_Array *array, - Eina_Each_Cb cb, - void *data); + int version; + /**< Should match EINA_ARRAY_VERSION used when compiled your apps, provided for ABI compatibility */ + + void **data; + /**< Pointer to a vector of pointer to payload */ + unsigned int total; + /**< Total number of slots in the vector */ + unsigned int count; + /**< Number of active slots in the vector */ + unsigned int step; + /**< How much must we grow the vector when it is full */ + EINA_MAGIC}; + +EAPI Eina_Array *eina_array_new(unsigned int step) +EINA_WARN_UNUSED_RESULT EINA_MALLOC EINA_WARN_UNUSED_RESULT; +EAPI void eina_array_free(Eina_Array * array) EINA_ARG_NONNULL(1); +EAPI void eina_array_step_set(Eina_Array * array, + unsigned int sizeof_eina_array, + unsigned int step) EINA_ARG_NONNULL(1); +EAPI void eina_array_clean(Eina_Array * array) EINA_ARG_NONNULL(1); +EAPI void eina_array_flush(Eina_Array * array) EINA_ARG_NONNULL(1); +EAPI Eina_Bool eina_array_remove(Eina_Array * array, + Eina_Bool(*keep) (void *data, + void *gdata), + void *gdata) EINA_ARG_NONNULL(1, 2); +static inline Eina_Bool eina_array_push(Eina_Array * array, + const void *data) +EINA_ARG_NONNULL(1, 2); +static inline void *eina_array_pop(Eina_Array * array) EINA_ARG_NONNULL(1); +static inline void *eina_array_data_get(const Eina_Array * array, + unsigned int idx) +EINA_ARG_NONNULL(1); +static inline void eina_array_data_set(const Eina_Array * array, + unsigned int idx, + const void *data) +EINA_ARG_NONNULL(1, 3); +static inline unsigned int eina_array_count_get(const Eina_Array * + array) EINA_ARG_NONNULL(1); +EAPI Eina_Iterator *eina_array_iterator_new(const Eina_Array * array) +EINA_MALLOC EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT; +EAPI Eina_Accessor *eina_array_accessor_new(const Eina_Array * array) +EINA_MALLOC EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT; +static inline Eina_Bool eina_array_foreach(Eina_Array * array, + Eina_Each_Cb cb, void *data); /** * @def EINA_ARRAY_ITER_NEXT * @brief Macro to iterate over an array easily. diff --git a/tests/suite/ecore/src/include/eina_benchmark.h b/tests/suite/ecore/src/include/eina_benchmark.h index e0faa722df..2fd7b8cf50 100644 --- a/tests/suite/ecore/src/include/eina_benchmark.h +++ b/tests/suite/ecore/src/include/eina_benchmark.h @@ -43,7 +43,7 @@ typedef struct _Eina_Benchmark Eina_Benchmark; * @typedef Eina_Benchmark_Specimens * Type for a test function to be called when running a benchmark. */ -typedef void (*Eina_Benchmark_Specimens)(int request); +typedef void (*Eina_Benchmark_Specimens) (int request); /** * @def EINA_BENCHMARK @@ -55,16 +55,14 @@ typedef void (*Eina_Benchmark_Specimens)(int request); */ #define EINA_BENCHMARK(function) ((Eina_Benchmark_Specimens)function) -EAPI Eina_Benchmark * eina_benchmark_new(const char *name, - const char *run); -EAPI void eina_benchmark_free(Eina_Benchmark *bench); -EAPI Eina_Bool eina_benchmark_register(Eina_Benchmark *bench, - const char *name, - Eina_Benchmark_Specimens bench_cb, - int count_start, - int count_end, - int count_set); -EAPI Eina_Array * eina_benchmark_run(Eina_Benchmark *bench); +EAPI Eina_Benchmark *eina_benchmark_new(const char *name, const char *run); +EAPI void eina_benchmark_free(Eina_Benchmark * bench); +EAPI Eina_Bool eina_benchmark_register(Eina_Benchmark * bench, + const char *name, + Eina_Benchmark_Specimens bench_cb, + int count_start, + int count_end, int count_set); +EAPI Eina_Array *eina_benchmark_run(Eina_Benchmark * bench); /** * @} @@ -74,4 +72,4 @@ EAPI Eina_Array * eina_benchmark_run(Eina_Benchmark *bench); * @} */ -#endif /* EINA_BENCHMARK_H_ */ +#endif /* EINA_BENCHMARK_H_ */ diff --git a/tests/suite/ecore/src/include/eina_binshare.h b/tests/suite/ecore/src/include/eina_binshare.h index e785ed0137..471665ad30 100644 --- a/tests/suite/ecore/src/include/eina_binshare.h +++ b/tests/suite/ecore/src/include/eina_binshare.h @@ -65,14 +65,15 @@ * @{ */ -EAPI Eina_Bool eina_binshare_init(void); -EAPI Eina_Bool eina_binshare_shutdown(void); -EAPI const void * eina_binshare_add_length(const void *obj, - unsigned int olen) EINA_PURE EINA_WARN_UNUSED_RESULT; -EAPI const void * eina_binshare_ref(const void *obj); -EAPI void eina_binshare_del(const void *obj); -EAPI int eina_binshare_length(const void *obj) EINA_WARN_UNUSED_RESULT; -EAPI void eina_binshare_dump(void); +EAPI Eina_Bool eina_binshare_init(void); +EAPI Eina_Bool eina_binshare_shutdown(void); +EAPI const void *eina_binshare_add_length(const void *obj, + unsigned int olen) +EINA_PURE EINA_WARN_UNUSED_RESULT; +EAPI const void *eina_binshare_ref(const void *obj); +EAPI void eina_binshare_del(const void *obj); +EAPI int eina_binshare_length(const void *obj) EINA_WARN_UNUSED_RESULT; +EAPI void eina_binshare_dump(void); /** * @brief Retrieve an instance of a blob for use in a program. @@ -102,4 +103,4 @@ EAPI void eina_binshare_dump(void); * @} */ -#endif /* EINA_STRINGSHARE_H_ */ +#endif /* EINA_STRINGSHARE_H_ */ diff --git a/tests/suite/ecore/src/include/eina_config.h b/tests/suite/ecore/src/include/eina_config.h index f89327d6a6..14ba859a29 100644 --- a/tests/suite/ecore/src/include/eina_config.h +++ b/tests/suite/ecore/src/include/eina_config.h @@ -20,33 +20,33 @@ #define EINA_CONFIG_H_ #ifdef EINA_MAGIC_DEBUG -# undef EINA_MAGIC_DEBUG +#undef EINA_MAGIC_DEBUG #endif #define EINA_MAGIC_DEBUG #ifdef EINA_DEFAULT_MEMPOOL -# undef EINA_DEFAULT_MEMPOOL +#undef EINA_DEFAULT_MEMPOOL #endif #ifdef EINA_SAFETY_CHECKS -# undef EINA_SAFETY_CHECKS +#undef EINA_SAFETY_CHECKS #endif #define EINA_SAFETY_CHECKS #ifdef EINA_HAVE_INTTYPES_H -# undef EINA_HAVE_INTTYPES_H +#undef EINA_HAVE_INTTYPES_H #endif #define EINA_HAVE_INTTYPES_H #ifdef EINA_HAVE_STDINT_H -# undef EINA_HAVE_STDINT_H +#undef EINA_HAVE_STDINT_H #endif #define EINA_HAVE_STDINT_H #ifdef EINA_SIZEOF_WCHAR_T -# undef EINA_SIZEOF_WCHAR_T +#undef EINA_SIZEOF_WCHAR_T #endif #define EINA_SIZEOF_WCHAR_T 4 -#endif /* EINA_CONFIG_H_ */ +#endif /* EINA_CONFIG_H_ */ diff --git a/tests/suite/ecore/src/include/eina_convert.h b/tests/suite/ecore/src/include/eina_convert.h index 8cd64334f5..e4a56d6d00 100644 --- a/tests/suite/ecore/src/include/eina_convert.h +++ b/tests/suite/ecore/src/include/eina_convert.h @@ -54,20 +54,19 @@ EAPI extern Eina_Error EINA_ERROR_CONVERT_0X_NOT_FOUND; */ EAPI extern Eina_Error EINA_ERROR_CONVERT_OUTRUN_STRING_LENGTH; -EAPI int eina_convert_itoa(int n, char *s) EINA_ARG_NONNULL(2); -EAPI int eina_convert_xtoa(unsigned int n, char *s) EINA_ARG_NONNULL(2); +EAPI int eina_convert_itoa(int n, char *s) EINA_ARG_NONNULL(2); +EAPI int eina_convert_xtoa(unsigned int n, char *s) EINA_ARG_NONNULL(2); -EAPI int eina_convert_dtoa(double d, char *des) EINA_ARG_NONNULL(2); +EAPI int eina_convert_dtoa(double d, char *des) EINA_ARG_NONNULL(2); EAPI Eina_Bool eina_convert_atod(const char *src, - int length, - long long *m, - long *e) EINA_ARG_NONNULL(1,3,4); + int length, + long long *m, + long *e) EINA_ARG_NONNULL(1, 3, 4); -EAPI int eina_convert_fptoa(Eina_F32p32 fp, - char *des) EINA_ARG_NONNULL(2); +EAPI int eina_convert_fptoa(Eina_F32p32 fp, char *des) EINA_ARG_NONNULL(2); EAPI Eina_Bool eina_convert_atofp(const char *src, - int length, - Eina_F32p32 *fp) EINA_ARG_NONNULL(1,3); + int length, + Eina_F32p32 * fp) EINA_ARG_NONNULL(1, 3); /** * @} @@ -77,4 +76,4 @@ EAPI Eina_Bool eina_convert_atofp(const char *src, * @} */ -#endif /* EINA_CONVERT_H_ */ +#endif /* EINA_CONVERT_H_ */ diff --git a/tests/suite/ecore/src/include/eina_counter.h b/tests/suite/ecore/src/include/eina_counter.h index fc7b23f533..443586a7bb 100644 --- a/tests/suite/ecore/src/include/eina_counter.h +++ b/tests/suite/ecore/src/include/eina_counter.h @@ -39,12 +39,13 @@ */ typedef struct _Eina_Counter Eina_Counter; -EAPI Eina_Counter * eina_counter_new(const char *name) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); -EAPI void eina_counter_free(Eina_Counter *counter) EINA_ARG_NONNULL(1); -EAPI void eina_counter_start(Eina_Counter *counter) EINA_ARG_NONNULL(1); -EAPI void eina_counter_stop(Eina_Counter *counter, - int specimen) EINA_ARG_NONNULL(1); -EAPI char * eina_counter_dump(Eina_Counter *counter) EINA_ARG_NONNULL(1); +EAPI Eina_Counter *eina_counter_new(const char *name) +EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); +EAPI void eina_counter_free(Eina_Counter * counter) EINA_ARG_NONNULL(1); +EAPI void eina_counter_start(Eina_Counter * counter) EINA_ARG_NONNULL(1); +EAPI void eina_counter_stop(Eina_Counter * counter, + int specimen) EINA_ARG_NONNULL(1); +EAPI char *eina_counter_dump(Eina_Counter * counter) EINA_ARG_NONNULL(1); /** * @} @@ -54,4 +55,4 @@ EAPI char * eina_counter_dump(Eina_Counter *counter) EINA_ARG_NONNULL(1) * @} */ -#endif /* EINA_COUNTER_H_ */ +#endif /* EINA_COUNTER_H_ */ diff --git a/tests/suite/ecore/src/include/eina_cpu.h b/tests/suite/ecore/src/include/eina_cpu.h index ac32e1db9b..3fb293af66 100644 --- a/tests/suite/ecore/src/include/eina_cpu.h +++ b/tests/suite/ecore/src/include/eina_cpu.h @@ -21,19 +21,18 @@ #include "eina_types.h" -typedef enum _Eina_Cpu_Features -{ - EINA_CPU_MMX = 0x00000001, - EINA_CPU_SSE = 0x00000002, - EINA_CPU_SSE2 = 0x00000004, - EINA_CPU_SSE3 = 0x00000008, - /* TODO 3DNow! */ - EINA_CPU_ALTIVEC = 0x00000010, - EINA_CPU_VIS = 0x00000020, - EINA_CPU_NEON = 0x00000040, +typedef enum _Eina_Cpu_Features { + EINA_CPU_MMX = 0x00000001, + EINA_CPU_SSE = 0x00000002, + EINA_CPU_SSE2 = 0x00000004, + EINA_CPU_SSE3 = 0x00000008, + /* TODO 3DNow! */ + EINA_CPU_ALTIVEC = 0x00000010, + EINA_CPU_VIS = 0x00000020, + EINA_CPU_NEON = 0x00000040, } Eina_Cpu_Features; EAPI Eina_Cpu_Features eina_cpu_features_get(void); -EAPI int eina_cpu_count(void); +EAPI int eina_cpu_count(void); -#endif /* EINA_CPU_H_ */ +#endif /* EINA_CPU_H_ */ diff --git a/tests/suite/ecore/src/include/eina_error.h b/tests/suite/ecore/src/include/eina_error.h index 8c74b66f0f..f654c4b1ea 100644 --- a/tests/suite/ecore/src/include/eina_error.h +++ b/tests/suite/ecore/src/include/eina_error.h @@ -47,13 +47,15 @@ typedef int Eina_Error; */ EAPI extern Eina_Error EINA_ERROR_OUT_OF_MEMORY; -EAPI Eina_Error eina_error_msg_register(const char *msg) EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT; -EAPI Eina_Error eina_error_msg_static_register(const char *msg) EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT; -EAPI Eina_Bool eina_error_msg_modify(Eina_Error error, - const char *msg) EINA_ARG_NONNULL(2); -EAPI Eina_Error eina_error_get(void); -EAPI void eina_error_set(Eina_Error err); -EAPI const char * eina_error_msg_get(Eina_Error error) EINA_PURE; +EAPI Eina_Error eina_error_msg_register(const char *msg) +EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT; +EAPI Eina_Error eina_error_msg_static_register(const char *msg) +EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT; +EAPI Eina_Bool eina_error_msg_modify(Eina_Error error, + const char *msg) EINA_ARG_NONNULL(2); +EAPI Eina_Error eina_error_get(void); +EAPI void eina_error_set(Eina_Error err); +EAPI const char *eina_error_msg_get(Eina_Error error) EINA_PURE; /** * @} @@ -63,4 +65,4 @@ EAPI const char * eina_error_msg_get(Eina_Error error) EINA_PURE; * @} */ -#endif /* EINA_ERROR_H_ */ +#endif /* EINA_ERROR_H_ */ diff --git a/tests/suite/ecore/src/include/eina_file.h b/tests/suite/ecore/src/include/eina_file.h index 4c3740ffa0..40fb4c4adf 100644 --- a/tests/suite/ecore/src/include/eina_file.h +++ b/tests/suite/ecore/src/include/eina_file.h @@ -48,19 +48,24 @@ typedef struct _Eina_File_Direct_Info Eina_File_Direct_Info; * Type for a callback to be called when iterating over the files of a * directory. */ -typedef void (*Eina_File_Dir_List_Cb)(const char *name, const char *path, void *data); +typedef void (*Eina_File_Dir_List_Cb) (const char *name, const char *path, + void *data); /** * @struct _Eina_File_Direct_Info * A structure to store informations of a path. */ -struct _Eina_File_Direct_Info -{ - size_t path_length; /**< size of the whole path */ - size_t name_length; /**< size of the filename/basename component */ - size_t name_start; /**< where the filename/basename component starts */ - char path[PATH_MAX]; /**< the path */ - const struct dirent *dirent; /**< the dirent structure of the path */ +struct _Eina_File_Direct_Info { + size_t path_length; + /**< size of the whole path */ + size_t name_length; + /**< size of the filename/basename component */ + size_t name_start; + /**< where the filename/basename component starts */ + char path[PATH_MAX]; + /**< the path */ + const struct dirent *dirent; + /**< the dirent structure of the path */ }; /** @@ -73,13 +78,16 @@ struct _Eina_File_Direct_Info */ #define EINA_FILE_DIR_LIST_CB(function) ((Eina_File_Dir_List_Cb)function) -EAPI Eina_Bool eina_file_dir_list(const char *dir, - Eina_Bool recursive, - Eina_File_Dir_List_Cb cb, - void *data) EINA_ARG_NONNULL(1, 3); -EAPI Eina_Array * eina_file_split(char *path) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC; -EAPI Eina_Iterator * eina_file_ls(const char *dir) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC; -EAPI Eina_Iterator * eina_file_direct_ls(const char *dir) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC; +EAPI Eina_Bool eina_file_dir_list(const char *dir, + Eina_Bool recursive, + Eina_File_Dir_List_Cb cb, + void *data) EINA_ARG_NONNULL(1, 3); +EAPI Eina_Array *eina_file_split(char *path) +EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC; +EAPI Eina_Iterator *eina_file_ls(const char *dir) +EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC; +EAPI Eina_Iterator *eina_file_direct_ls(const char *dir) +EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC; /** * @} @@ -89,4 +97,4 @@ EAPI Eina_Iterator * eina_file_direct_ls(const char *dir) EINA_WARN_UNUSED_RESUL * @} */ -#endif /* EINA_FILE_H_ */ +#endif /* EINA_FILE_H_ */ diff --git a/tests/suite/ecore/src/include/eina_fp.h b/tests/suite/ecore/src/include/eina_fp.h index 47dbaa486d..5aba5ef96f 100644 --- a/tests/suite/ecore/src/include/eina_fp.h +++ b/tests/suite/ecore/src/include/eina_fp.h @@ -18,7 +18,7 @@ */ #ifndef EINA_FP_H_ -# define EINA_FP_H_ +#define EINA_FP_H_ #include "eina_types.h" @@ -27,7 +27,7 @@ typedef unsigned __int64 uint64_t; typedef signed __int64 int64_t; typedef signed int int32_t; #else -# include <stdint.h> +#include <stdint.h> #endif #define EINA_F32P32_PI 0x00000003243f6a89 @@ -36,72 +36,57 @@ typedef int64_t Eina_F32p32; typedef int32_t Eina_F16p16; typedef int32_t Eina_F8p24; -static inline Eina_F32p32 eina_f32p32_int_from(int32_t v); -static inline int32_t eina_f32p32_int_to(Eina_F32p32 v); -static inline Eina_F32p32 eina_f32p32_double_from(double v); -static inline double eina_f32p32_double_to(Eina_F32p32 v); - -static inline Eina_F32p32 eina_f32p32_add(Eina_F32p32 a, - Eina_F32p32 b); -static inline Eina_F32p32 eina_f32p32_sub(Eina_F32p32 a, - Eina_F32p32 b); -static inline Eina_F32p32 eina_f32p32_mul(Eina_F32p32 a, - Eina_F32p32 b); -static inline Eina_F32p32 eina_f32p32_scale(Eina_F32p32 a, - int b); -static inline Eina_F32p32 eina_f32p32_div(Eina_F32p32 a, - Eina_F32p32 b); -static inline Eina_F32p32 eina_f32p32_sqrt(Eina_F32p32 a); +static inline Eina_F32p32 eina_f32p32_int_from(int32_t v); +static inline int32_t eina_f32p32_int_to(Eina_F32p32 v); +static inline Eina_F32p32 eina_f32p32_double_from(double v); +static inline double eina_f32p32_double_to(Eina_F32p32 v); + +static inline Eina_F32p32 eina_f32p32_add(Eina_F32p32 a, Eina_F32p32 b); +static inline Eina_F32p32 eina_f32p32_sub(Eina_F32p32 a, Eina_F32p32 b); +static inline Eina_F32p32 eina_f32p32_mul(Eina_F32p32 a, Eina_F32p32 b); +static inline Eina_F32p32 eina_f32p32_scale(Eina_F32p32 a, int b); +static inline Eina_F32p32 eina_f32p32_div(Eina_F32p32 a, Eina_F32p32 b); +static inline Eina_F32p32 eina_f32p32_sqrt(Eina_F32p32 a); static inline unsigned int eina_f32p32_fracc_get(Eina_F32p32 v); // dont use llabs - issues if not on 64bit #define eina_fp32p32_llabs(a) ((a < 0) ? -(a) : (a)) -EAPI Eina_F32p32 eina_f32p32_cos(Eina_F32p32 a); -EAPI Eina_F32p32 eina_f32p32_sin(Eina_F32p32 a); - -static inline Eina_F16p16 eina_f16p16_int_from(int32_t v); -static inline int32_t eina_f16p16_int_to(Eina_F16p16 v); -static inline Eina_F16p16 eina_f16p16_float_from(float v); -static inline float eina_f16p16_float_to(Eina_F16p16 v); - -static inline Eina_F16p16 eina_f16p16_add(Eina_F16p16 a, - Eina_F16p16 b); -static inline Eina_F16p16 eina_f16p16_sub(Eina_F16p16 a, - Eina_F16p16 b); -static inline Eina_F16p16 eina_f16p16_mul(Eina_F16p16 a, - Eina_F16p16 b); -static inline Eina_F16p16 eina_f16p16_scale(Eina_F16p16 a, - int b); -static inline Eina_F16p16 eina_f16p16_div(Eina_F16p16 a, - Eina_F16p16 b); -static inline Eina_F16p16 eina_f16p16_sqrt(Eina_F16p16 a); +EAPI Eina_F32p32 eina_f32p32_cos(Eina_F32p32 a); +EAPI Eina_F32p32 eina_f32p32_sin(Eina_F32p32 a); + +static inline Eina_F16p16 eina_f16p16_int_from(int32_t v); +static inline int32_t eina_f16p16_int_to(Eina_F16p16 v); +static inline Eina_F16p16 eina_f16p16_float_from(float v); +static inline float eina_f16p16_float_to(Eina_F16p16 v); + +static inline Eina_F16p16 eina_f16p16_add(Eina_F16p16 a, Eina_F16p16 b); +static inline Eina_F16p16 eina_f16p16_sub(Eina_F16p16 a, Eina_F16p16 b); +static inline Eina_F16p16 eina_f16p16_mul(Eina_F16p16 a, Eina_F16p16 b); +static inline Eina_F16p16 eina_f16p16_scale(Eina_F16p16 a, int b); +static inline Eina_F16p16 eina_f16p16_div(Eina_F16p16 a, Eina_F16p16 b); +static inline Eina_F16p16 eina_f16p16_sqrt(Eina_F16p16 a); static inline unsigned int eina_f16p16_fracc_get(Eina_F16p16 v); -static inline Eina_F8p24 eina_f8p24_int_from(int32_t v); -static inline int32_t eina_f8p24_int_to(Eina_F8p24 v); -static inline Eina_F8p24 eina_f8p24_float_from(float v); -static inline float eina_f8p24_float_to(Eina_F8p24 v); - -static inline Eina_F8p24 eina_f8p24_add(Eina_F8p24 a, - Eina_F8p24 b); -static inline Eina_F8p24 eina_f8p24_sub(Eina_F8p24 a, - Eina_F8p24 b); -static inline Eina_F8p24 eina_f8p24_mul(Eina_F8p24 a, - Eina_F8p24 b); -static inline Eina_F8p24 eina_f8p24_scale(Eina_F8p24 a, - int b); -static inline Eina_F8p24 eina_f8p24_div(Eina_F8p24 a, - Eina_F8p24 b); -static inline Eina_F8p24 eina_f8p24_sqrt(Eina_F8p24 a); +static inline Eina_F8p24 eina_f8p24_int_from(int32_t v); +static inline int32_t eina_f8p24_int_to(Eina_F8p24 v); +static inline Eina_F8p24 eina_f8p24_float_from(float v); +static inline float eina_f8p24_float_to(Eina_F8p24 v); + +static inline Eina_F8p24 eina_f8p24_add(Eina_F8p24 a, Eina_F8p24 b); +static inline Eina_F8p24 eina_f8p24_sub(Eina_F8p24 a, Eina_F8p24 b); +static inline Eina_F8p24 eina_f8p24_mul(Eina_F8p24 a, Eina_F8p24 b); +static inline Eina_F8p24 eina_f8p24_scale(Eina_F8p24 a, int b); +static inline Eina_F8p24 eina_f8p24_div(Eina_F8p24 a, Eina_F8p24 b); +static inline Eina_F8p24 eina_f8p24_sqrt(Eina_F8p24 a); static inline unsigned int eina_f8p24_fracc_get(Eina_F8p24 v); -static inline Eina_F32p32 eina_f16p16_to_f32p32(Eina_F16p16 a); -static inline Eina_F32p32 eina_f8p24_to_f32p32(Eina_F8p24 a); -static inline Eina_F16p16 eina_f32p32_to_f16p16(Eina_F32p32 a); -static inline Eina_F16p16 eina_f8p24_to_f16p16(Eina_F8p24 a); -static inline Eina_F8p24 eina_f32p32_to_f8p24(Eina_F32p32 a); -static inline Eina_F8p24 eina_f16p16_to_f8p24(Eina_F16p16 a); +static inline Eina_F32p32 eina_f16p16_to_f32p32(Eina_F16p16 a); +static inline Eina_F32p32 eina_f8p24_to_f32p32(Eina_F8p24 a); +static inline Eina_F16p16 eina_f32p32_to_f16p16(Eina_F32p32 a); +static inline Eina_F16p16 eina_f8p24_to_f16p16(Eina_F8p24 a); +static inline Eina_F8p24 eina_f32p32_to_f8p24(Eina_F32p32 a); +static inline Eina_F8p24 eina_f16p16_to_f8p24(Eina_F16p16 a); #include "eina_inline_f32p32.x" #include "eina_inline_f16p16.x" diff --git a/tests/suite/ecore/src/include/eina_hamster.h b/tests/suite/ecore/src/include/eina_hamster.h index 0818b15616..5b160994fd 100644 --- a/tests/suite/ecore/src/include/eina_hamster.h +++ b/tests/suite/ecore/src/include/eina_hamster.h @@ -41,4 +41,4 @@ EAPI int eina_hamster_count(void); * @} */ -#endif /* EINA_HAMSTER_H_ */ +#endif /* EINA_HAMSTER_H_ */ diff --git a/tests/suite/ecore/src/include/eina_hash.h b/tests/suite/ecore/src/include/eina_hash.h index 03451339a9..d1fc8b13aa 100644 --- a/tests/suite/ecore/src/include/eina_hash.h +++ b/tests/suite/ecore/src/include/eina_hash.h @@ -49,107 +49,115 @@ typedef struct _Eina_Hash Eina_Hash; typedef struct _Eina_Hash_Tuple Eina_Hash_Tuple; -struct _Eina_Hash_Tuple -{ - const void *key; /**< The key */ - void *data; /**< The data associated to the key */ - unsigned int key_length; /**< The length of the key */ +struct _Eina_Hash_Tuple { + const void *key; + /**< The key */ + void *data; + /**< The data associated to the key */ + unsigned int key_length; + /**< The length of the key */ }; -typedef unsigned int (*Eina_Key_Length)(const void *key); +typedef unsigned int (*Eina_Key_Length) (const void *key); #define EINA_KEY_LENGTH(Function) ((Eina_Key_Length)Function) -typedef int (*Eina_Key_Cmp)(const void *key1, int key1_length, const void *key2, int key2_length); +typedef int (*Eina_Key_Cmp) (const void *key1, int key1_length, + const void *key2, int key2_length); #define EINA_KEY_CMP(Function) ((Eina_Key_Cmp)Function) -typedef int (*Eina_Key_Hash)(const void *key, int key_length); +typedef int (*Eina_Key_Hash) (const void *key, int key_length); #define EINA_KEY_HASH(Function) ((Eina_Key_Hash)Function) -typedef Eina_Bool (*Eina_Hash_Foreach)(const Eina_Hash *hash, const void *key, void *data, void *fdata); +typedef Eina_Bool(*Eina_Hash_Foreach) (const Eina_Hash * hash, + const void *key, void *data, + void *fdata); -EAPI Eina_Hash * eina_hash_new(Eina_Key_Length key_length_cb, - Eina_Key_Cmp key_cmp_cb, - Eina_Key_Hash key_hash_cb, - Eina_Free_Cb data_free_cb, - int buckets_power_size) EINA_MALLOC EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(2, 3); -EAPI Eina_Hash * eina_hash_string_djb2_new(Eina_Free_Cb data_free_cb); -EAPI Eina_Hash * eina_hash_string_superfast_new(Eina_Free_Cb data_free_cb); -EAPI Eina_Hash * eina_hash_string_small_new(Eina_Free_Cb data_free_cb); -EAPI Eina_Hash * eina_hash_int32_new(Eina_Free_Cb data_free_cb); -EAPI Eina_Hash * eina_hash_int64_new(Eina_Free_Cb data_free_cb); -EAPI Eina_Hash * eina_hash_pointer_new(Eina_Free_Cb data_free_cb); -EAPI Eina_Hash * eina_hash_stringshared_new(Eina_Free_Cb data_free_cb); -EAPI Eina_Bool eina_hash_add(Eina_Hash *hash, - const void *key, - const void *data) EINA_ARG_NONNULL(1, 2, 3); -EAPI Eina_Bool eina_hash_direct_add(Eina_Hash *hash, - const void *key, - const void *data) EINA_ARG_NONNULL(1, 2, 3); -EAPI Eina_Bool eina_hash_del(Eina_Hash *hash, - const void *key, - const void *data) EINA_ARG_NONNULL(1); -EAPI void * eina_hash_find(const Eina_Hash *hash, - const void *key) EINA_ARG_NONNULL(1, 2); -EAPI void * eina_hash_modify(Eina_Hash *hash, - const void *key, - const void *data) EINA_ARG_NONNULL(1, 2, 3); -EAPI void * eina_hash_set(Eina_Hash *hash, - const void *key, - const void *data) EINA_ARG_NONNULL(1, 2, 3); -EAPI Eina_Bool eina_hash_move(Eina_Hash *hash, - const void *old_key, - const void *new_key) EINA_ARG_NONNULL(1, 2, 3); -EAPI void eina_hash_free(Eina_Hash *hash) EINA_ARG_NONNULL(1); -EAPI void eina_hash_free_buckets(Eina_Hash *hash) EINA_ARG_NONNULL(1); -EAPI int eina_hash_population(const Eina_Hash *hash) EINA_ARG_NONNULL(1); -EAPI Eina_Bool eina_hash_add_by_hash(Eina_Hash *hash, - const void *key, - int key_length, - int key_hash, - const void *data) EINA_ARG_NONNULL(1, 2, 5); -EAPI Eina_Bool eina_hash_direct_add_by_hash(Eina_Hash *hash, - const void *key, - int key_length, - int key_hash, - const void *data) EINA_ARG_NONNULL(1, 2, 5); -EAPI Eina_Bool eina_hash_del_by_key_hash(Eina_Hash *hash, - const void *key, - int key_length, - int key_hash) EINA_ARG_NONNULL(1, 2); -EAPI Eina_Bool eina_hash_del_by_key(Eina_Hash *hash, - const void *key) EINA_ARG_NONNULL(1, 2); -EAPI Eina_Bool eina_hash_del_by_data(Eina_Hash *hash, - const void *data) EINA_ARG_NONNULL(1, 2); -EAPI Eina_Bool eina_hash_del_by_hash(Eina_Hash *hash, - const void *key, - int key_length, - int key_hash, - const void *data) EINA_ARG_NONNULL(1); -EAPI void * eina_hash_find_by_hash(const Eina_Hash *hash, - const void *key, - int key_length, - int key_hash) EINA_ARG_NONNULL(1, 2); -EAPI void * eina_hash_modify_by_hash(Eina_Hash *hash, - const void *key, - int key_length, - int key_hash, - const void *data) EINA_ARG_NONNULL(1, 2, 5); -EAPI Eina_Iterator * eina_hash_iterator_key_new(const Eina_Hash *hash) EINA_MALLOC EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT; -EAPI Eina_Iterator * eina_hash_iterator_data_new(const Eina_Hash *hash) EINA_MALLOC EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT; -EAPI Eina_Iterator * eina_hash_iterator_tuple_new(const Eina_Hash *hash) EINA_MALLOC EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT; -EAPI void eina_hash_foreach(const Eina_Hash *hash, - Eina_Hash_Foreach cb, - const void *fdata) EINA_ARG_NONNULL(1, 2); +EAPI Eina_Hash *eina_hash_new(Eina_Key_Length key_length_cb, + Eina_Key_Cmp key_cmp_cb, + Eina_Key_Hash key_hash_cb, + Eina_Free_Cb data_free_cb, + int buckets_power_size) +EINA_MALLOC EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(2, 3); +EAPI Eina_Hash *eina_hash_string_djb2_new(Eina_Free_Cb data_free_cb); +EAPI Eina_Hash *eina_hash_string_superfast_new(Eina_Free_Cb data_free_cb); +EAPI Eina_Hash *eina_hash_string_small_new(Eina_Free_Cb data_free_cb); +EAPI Eina_Hash *eina_hash_int32_new(Eina_Free_Cb data_free_cb); +EAPI Eina_Hash *eina_hash_int64_new(Eina_Free_Cb data_free_cb); +EAPI Eina_Hash *eina_hash_pointer_new(Eina_Free_Cb data_free_cb); +EAPI Eina_Hash *eina_hash_stringshared_new(Eina_Free_Cb data_free_cb); +EAPI Eina_Bool eina_hash_add(Eina_Hash * hash, + const void *key, + const void *data) EINA_ARG_NONNULL(1, 2, 3); +EAPI Eina_Bool eina_hash_direct_add(Eina_Hash * hash, + const void *key, + const void *data) EINA_ARG_NONNULL(1, + 2, + 3); +EAPI Eina_Bool eina_hash_del(Eina_Hash * hash, const void *key, + const void *data) EINA_ARG_NONNULL(1); +EAPI void *eina_hash_find(const Eina_Hash * hash, + const void *key) EINA_ARG_NONNULL(1, 2); +EAPI void *eina_hash_modify(Eina_Hash * hash, const void *key, + const void *data) EINA_ARG_NONNULL(1, 2, 3); +EAPI void *eina_hash_set(Eina_Hash * hash, const void *key, + const void *data) EINA_ARG_NONNULL(1, 2, 3); +EAPI Eina_Bool eina_hash_move(Eina_Hash * hash, const void *old_key, + const void *new_key) EINA_ARG_NONNULL(1, 2, + 3); +EAPI void eina_hash_free(Eina_Hash * hash) EINA_ARG_NONNULL(1); +EAPI void eina_hash_free_buckets(Eina_Hash * hash) EINA_ARG_NONNULL(1); +EAPI int eina_hash_population(const Eina_Hash * hash) EINA_ARG_NONNULL(1); +EAPI Eina_Bool eina_hash_add_by_hash(Eina_Hash * hash, + const void *key, + int key_length, + int key_hash, + const void *data) EINA_ARG_NONNULL(1, + 2, + 5); +EAPI Eina_Bool eina_hash_direct_add_by_hash(Eina_Hash * hash, + const void *key, + int key_length, int key_hash, + const void *data) +EINA_ARG_NONNULL(1, 2, 5); +EAPI Eina_Bool eina_hash_del_by_key_hash(Eina_Hash * hash, const void *key, + int key_length, + int key_hash) EINA_ARG_NONNULL(1, + 2); +EAPI Eina_Bool eina_hash_del_by_key(Eina_Hash * hash, + const void *key) EINA_ARG_NONNULL(1, + 2); +EAPI Eina_Bool eina_hash_del_by_data(Eina_Hash * hash, + const void *data) EINA_ARG_NONNULL(1, + 2); +EAPI Eina_Bool eina_hash_del_by_hash(Eina_Hash * hash, const void *key, + int key_length, int key_hash, + const void *data) EINA_ARG_NONNULL(1); +EAPI void *eina_hash_find_by_hash(const Eina_Hash * hash, const void *key, + int key_length, + int key_hash) EINA_ARG_NONNULL(1, 2); +EAPI void *eina_hash_modify_by_hash(Eina_Hash * hash, const void *key, + int key_length, int key_hash, + const void *data) EINA_ARG_NONNULL(1, + 2, + 5); +EAPI Eina_Iterator *eina_hash_iterator_key_new(const Eina_Hash * hash) +EINA_MALLOC EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT; +EAPI Eina_Iterator *eina_hash_iterator_data_new(const Eina_Hash * hash) +EINA_MALLOC EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT; +EAPI Eina_Iterator *eina_hash_iterator_tuple_new(const Eina_Hash * hash) +EINA_MALLOC EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT; +EAPI void eina_hash_foreach(const Eina_Hash * hash, + Eina_Hash_Foreach cb, + const void *fdata) EINA_ARG_NONNULL(1, 2); /* Paul Hsieh (http://www.azillionmonkeys.com/qed/hash.html) hash function used by WebCore (http://webkit.org/blog/8/hashtables-part-2/) */ -EAPI int eina_hash_superfast(const char *key, - int len) EINA_ARG_NONNULL(1); +EAPI int eina_hash_superfast(const char *key, int len) EINA_ARG_NONNULL(1); /* Hash function first reported by dan bernstein many years ago in comp.lang.c */ -static inline int eina_hash_djb2(const char *key, - int len) EINA_ARG_NONNULL(1); -static inline int eina_hash_djb2_len(const char *key, - int *plen) EINA_ARG_NONNULL(1, 2); +static inline int eina_hash_djb2(const char *key, + int len) EINA_ARG_NONNULL(1); +static inline int eina_hash_djb2_len(const char *key, + int *plen) EINA_ARG_NONNULL(1, 2); /* Hash function from http://www.concentric.net/~Ttwang/tech/inthash.htm */ -static inline int eina_hash_int32(const unsigned int *pkey, - int len) EINA_ARG_NONNULL(1); -static inline int eina_hash_int64(const unsigned long int *pkey, - int len) EINA_ARG_NONNULL(1); +static inline int eina_hash_int32(const unsigned int *pkey, + int len) EINA_ARG_NONNULL(1); +static inline int eina_hash_int64(const unsigned long int *pkey, + int len) EINA_ARG_NONNULL(1); #include "eina_inline_hash.x" @@ -165,4 +173,4 @@ static inline int eina_hash_int64(const unsigned long int *pkey, * @} */ -#endif /*EINA_HASH_H_*/ +#endif /*EINA_HASH_H_ */ diff --git a/tests/suite/ecore/src/include/eina_inlist.h b/tests/suite/ecore/src/include/eina_inlist.h index 34ee0ed522..6e55de38ea 100644 --- a/tests/suite/ecore/src/include/eina_inlist.h +++ b/tests/suite/ecore/src/include/eina_inlist.h @@ -52,11 +52,13 @@ typedef struct _Eina_Inlist Eina_Inlist; * @struct _Eina_Inlist * Inlined list type. */ -struct _Eina_Inlist -{ - Eina_Inlist *next; /**< next node */ - Eina_Inlist *prev; /**< previous node */ - Eina_Inlist *last; /**< last node */ +struct _Eina_Inlist { + Eina_Inlist *next; + /**< next node */ + Eina_Inlist *prev; + /**< previous node */ + Eina_Inlist *last; + /**< last node */ }; #define EINA_INLIST Eina_Inlist __in_list @@ -65,28 +67,50 @@ struct _Eina_Inlist type) ((type *)((char *)ptr - \ offsetof(type, __in_list))) -EAPI Eina_Inlist * eina_inlist_append(Eina_Inlist *in_list, - Eina_Inlist *in_item) EINA_ARG_NONNULL(2) EINA_WARN_UNUSED_RESULT; -EAPI Eina_Inlist * eina_inlist_prepend(Eina_Inlist *in_list, - Eina_Inlist *in_item) EINA_ARG_NONNULL(2) EINA_WARN_UNUSED_RESULT; -EAPI Eina_Inlist * eina_inlist_append_relative(Eina_Inlist *in_list, - Eina_Inlist *in_item, - Eina_Inlist *in_relative) EINA_ARG_NONNULL(2) EINA_WARN_UNUSED_RESULT; -EAPI Eina_Inlist * eina_inlist_prepend_relative(Eina_Inlist *in_list, - Eina_Inlist *in_item, - Eina_Inlist *in_relative) EINA_ARG_NONNULL(2) EINA_WARN_UNUSED_RESULT; -EAPI Eina_Inlist * eina_inlist_remove(Eina_Inlist *in_list, - Eina_Inlist *in_item) EINA_ARG_NONNULL(1, 2) EINA_WARN_UNUSED_RESULT; -EAPI Eina_Inlist * eina_inlist_find(Eina_Inlist *in_list, - Eina_Inlist *in_item) EINA_ARG_NONNULL(2) EINA_WARN_UNUSED_RESULT; -EAPI Eina_Inlist * eina_inlist_promote(Eina_Inlist *list, - Eina_Inlist *item) EINA_ARG_NONNULL(1, 2) EINA_WARN_UNUSED_RESULT; -EAPI Eina_Inlist * eina_inlist_demote(Eina_Inlist *list, - Eina_Inlist *item) EINA_ARG_NONNULL(1, 2) EINA_WARN_UNUSED_RESULT; -EAPI unsigned int eina_inlist_count(const Eina_Inlist *list) EINA_WARN_UNUSED_RESULT; - -EAPI Eina_Iterator *eina_inlist_iterator_new(const Eina_Inlist *in_list) EINA_MALLOC EINA_WARN_UNUSED_RESULT; -EAPI Eina_Accessor *eina_inlist_accessor_new(const Eina_Inlist *in_list) EINA_MALLOC EINA_WARN_UNUSED_RESULT; +EAPI Eina_Inlist *eina_inlist_append(Eina_Inlist * in_list, + Eina_Inlist * + in_item) EINA_ARG_NONNULL(2) + EINA_WARN_UNUSED_RESULT; +EAPI Eina_Inlist *eina_inlist_prepend(Eina_Inlist * in_list, + Eina_Inlist * + in_item) EINA_ARG_NONNULL(2) + EINA_WARN_UNUSED_RESULT; +EAPI Eina_Inlist *eina_inlist_append_relative(Eina_Inlist * in_list, + Eina_Inlist * in_item, + Eina_Inlist * + in_relative) +EINA_ARG_NONNULL(2) EINA_WARN_UNUSED_RESULT; +EAPI Eina_Inlist *eina_inlist_prepend_relative(Eina_Inlist * in_list, + Eina_Inlist * in_item, + Eina_Inlist * + in_relative) +EINA_ARG_NONNULL(2) EINA_WARN_UNUSED_RESULT; +EAPI Eina_Inlist *eina_inlist_remove(Eina_Inlist * in_list, + Eina_Inlist * + in_item) EINA_ARG_NONNULL(1, + 2) + EINA_WARN_UNUSED_RESULT; +EAPI Eina_Inlist *eina_inlist_find(Eina_Inlist * in_list, + Eina_Inlist * + in_item) EINA_ARG_NONNULL(2) + EINA_WARN_UNUSED_RESULT; +EAPI Eina_Inlist *eina_inlist_promote(Eina_Inlist * list, + Eina_Inlist * + item) EINA_ARG_NONNULL(1, + 2) + EINA_WARN_UNUSED_RESULT; +EAPI Eina_Inlist *eina_inlist_demote(Eina_Inlist * list, + Eina_Inlist * + item) EINA_ARG_NONNULL(1, + 2) + EINA_WARN_UNUSED_RESULT; +EAPI unsigned int eina_inlist_count(const Eina_Inlist * + list) EINA_WARN_UNUSED_RESULT; + +EAPI Eina_Iterator *eina_inlist_iterator_new(const Eina_Inlist * in_list) +EINA_MALLOC EINA_WARN_UNUSED_RESULT; +EAPI Eina_Accessor *eina_inlist_accessor_new(const Eina_Inlist * in_list) +EINA_MALLOC EINA_WARN_UNUSED_RESULT; /* This two macros are helpers for the _FOREACH ones, don't use them */ #define _EINA_INLIST_OFFSET(ref) ((char *)&(ref)->__in_list - (char *)(ref)) @@ -112,4 +136,4 @@ EAPI Eina_Accessor *eina_inlist_accessor_new(const Eina_Inlist *in_list) EINA_MA * @} */ -#endif /*EINA_INLIST_H_*/ +#endif /*EINA_INLIST_H_ */ diff --git a/tests/suite/ecore/src/include/eina_iterator.h b/tests/suite/ecore/src/include/eina_iterator.h index 15188be0fa..5db0809911 100644 --- a/tests/suite/ecore/src/include/eina_iterator.h +++ b/tests/suite/ecore/src/include/eina_iterator.h @@ -42,26 +42,28 @@ */ typedef struct _Eina_Iterator Eina_Iterator; -typedef Eina_Bool (*Eina_Iterator_Next_Callback)(Eina_Iterator *it, void **data); -typedef void *(*Eina_Iterator_Get_Container_Callback)(Eina_Iterator *it); -typedef void (*Eina_Iterator_Free_Callback)(Eina_Iterator *it); -typedef Eina_Bool (*Eina_Iterator_Lock_Callback)(Eina_Iterator *it); +typedef Eina_Bool(*Eina_Iterator_Next_Callback) (Eina_Iterator * it, + void **data); +typedef void *(*Eina_Iterator_Get_Container_Callback) (Eina_Iterator * it); +typedef void (*Eina_Iterator_Free_Callback) (Eina_Iterator * it); +typedef Eina_Bool(*Eina_Iterator_Lock_Callback) (Eina_Iterator * it); -struct _Eina_Iterator -{ +struct _Eina_Iterator { #define EINA_ITERATOR_VERSION 1 - int version; + int version; - Eina_Iterator_Next_Callback next EINA_ARG_NONNULL(1, 2) EINA_WARN_UNUSED_RESULT; - Eina_Iterator_Get_Container_Callback get_container EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT; - Eina_Iterator_Free_Callback free EINA_ARG_NONNULL(1); + Eina_Iterator_Next_Callback next EINA_ARG_NONNULL(1, + 2) + EINA_WARN_UNUSED_RESULT; + Eina_Iterator_Get_Container_Callback get_container + EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT; + Eina_Iterator_Free_Callback free EINA_ARG_NONNULL(1); - Eina_Iterator_Lock_Callback lock EINA_WARN_UNUSED_RESULT; - Eina_Iterator_Lock_Callback unlock EINA_WARN_UNUSED_RESULT; + Eina_Iterator_Lock_Callback lock EINA_WARN_UNUSED_RESULT; + Eina_Iterator_Lock_Callback unlock EINA_WARN_UNUSED_RESULT; #define EINA_MAGIC_ITERATOR 0x98761233 - EINA_MAGIC -}; + EINA_MAGIC}; #define FUNC_ITERATOR_NEXT(Function) ((Eina_Iterator_Next_Callback)Function) @@ -71,18 +73,24 @@ struct _Eina_Iterator #define FUNC_ITERATOR_FREE(Function) ((Eina_Iterator_Free_Callback)Function) #define FUNC_ITERATOR_LOCK(Function) ((Eina_Iterator_Lock_Callback)Function) -EAPI void eina_iterator_free (Eina_Iterator *iterator) EINA_ARG_NONNULL(1); +EAPI void eina_iterator_free(Eina_Iterator * iterator) EINA_ARG_NONNULL(1); -EAPI void * eina_iterator_container_get (Eina_Iterator *iterator) EINA_ARG_NONNULL(1) EINA_PURE; -EAPI Eina_Bool eina_iterator_next (Eina_Iterator *iterator, - void **data) EINA_ARG_NONNULL(1, 2) EINA_WARN_UNUSED_RESULT; +EAPI void *eina_iterator_container_get(Eina_Iterator * + iterator) EINA_ARG_NONNULL(1) + EINA_PURE; +EAPI Eina_Bool eina_iterator_next(Eina_Iterator * iterator, + void **data) EINA_ARG_NONNULL(1, + 2) + EINA_WARN_UNUSED_RESULT; -EAPI void eina_iterator_foreach (Eina_Iterator *iterator, - Eina_Each_Cb callback, - const void *fdata) EINA_ARG_NONNULL(1, 2); +EAPI void eina_iterator_foreach(Eina_Iterator * iterator, + Eina_Each_Cb callback, + const void *fdata) EINA_ARG_NONNULL(1, 2); -EAPI Eina_Bool eina_iterator_lock(Eina_Iterator *iterator) EINA_ARG_NONNULL(1); -EAPI Eina_Bool eina_iterator_unlock(Eina_Iterator *iterator) EINA_ARG_NONNULL(1); +EAPI Eina_Bool eina_iterator_lock(Eina_Iterator * + iterator) EINA_ARG_NONNULL(1); +EAPI Eina_Bool eina_iterator_unlock(Eina_Iterator * + iterator) EINA_ARG_NONNULL(1); /** * @def EINA_ITERATOR_FOREACH diff --git a/tests/suite/ecore/src/include/eina_lalloc.h b/tests/suite/ecore/src/include/eina_lalloc.h index d41a9edb83..69ccba8653 100644 --- a/tests/suite/ecore/src/include/eina_lalloc.h +++ b/tests/suite/ecore/src/include/eina_lalloc.h @@ -33,21 +33,22 @@ * @{ */ -typedef Eina_Bool (*Eina_Lalloc_Alloc)(void *user_data, int num); +typedef Eina_Bool(*Eina_Lalloc_Alloc) (void *user_data, int num); #define EINA_LALLOC_ALLOC(function) ((Eina_Lalloc_Alloc)function) -typedef void (*Eina_Lalloc_Free)(void *user_data); +typedef void (*Eina_Lalloc_Free) (void *user_data); #define EINA_LALLOC_FREE(function) ((Eina_Lalloc_Free)function) typedef struct _Eina_Lalloc Eina_Lalloc; EAPI Eina_Lalloc *eina_lalloc_new(void *data, - Eina_Lalloc_Alloc alloc_cb, - Eina_Lalloc_Free free_cb, - int num_init) EINA_ARG_NONNULL(2, 3); -EAPI void eina_lalloc_free(Eina_Lalloc *a) EINA_ARG_NONNULL(1); -EAPI Eina_Bool eina_lalloc_elements_add(Eina_Lalloc *a, - int num) EINA_ARG_NONNULL(1); -EAPI Eina_Bool eina_lalloc_element_add(Eina_Lalloc *a) EINA_ARG_NONNULL(1); + Eina_Lalloc_Alloc alloc_cb, + Eina_Lalloc_Free free_cb, + int num_init) EINA_ARG_NONNULL(2, 3); +EAPI void eina_lalloc_free(Eina_Lalloc * a) EINA_ARG_NONNULL(1); +EAPI Eina_Bool eina_lalloc_elements_add(Eina_Lalloc * a, + int num) EINA_ARG_NONNULL(1); +EAPI Eina_Bool eina_lalloc_element_add(Eina_Lalloc * + a) EINA_ARG_NONNULL(1); /** * @} @@ -57,4 +58,4 @@ EAPI Eina_Bool eina_lalloc_element_add(Eina_Lalloc *a) EINA_ARG_NONNULL(1); * @} */ -#endif /* EINA_LALLOC_H_ */ +#endif /* EINA_LALLOC_H_ */ diff --git a/tests/suite/ecore/src/include/eina_list.h b/tests/suite/ecore/src/include/eina_list.h index 835422d418..63219f7cda 100644 --- a/tests/suite/ecore/src/include/eina_list.h +++ b/tests/suite/ecore/src/include/eina_list.h @@ -58,63 +58,127 @@ typedef struct _Eina_List_Accounting Eina_List_Accounting; * @struct _Eina_List * Type for a generic double linked list. */ -struct _Eina_List -{ - void *data; /**< Pointer to list element payload */ - Eina_List *next; /**< Next member in the list */ - Eina_List *prev; /**< Previous member in the list */ - Eina_List_Accounting *accounting; /**< Private list accounting info - don't touch */ +struct _Eina_List { + void *data; + /**< Pointer to list element payload */ + Eina_List *next; + /**< Next member in the list */ + Eina_List *prev; + /**< Previous member in the list */ + Eina_List_Accounting *accounting; + /**< Private list accounting info - don't touch */ - EINA_MAGIC -}; + EINA_MAGIC}; -struct _Eina_List_Accounting -{ - Eina_List *last; - unsigned int count; - EINA_MAGIC -}; +struct _Eina_List_Accounting { + Eina_List *last; + unsigned int count; + EINA_MAGIC}; -EAPI Eina_List * eina_list_append (Eina_List *list, const void *data) EINA_ARG_NONNULL(2) EINA_WARN_UNUSED_RESULT; -EAPI Eina_List * eina_list_prepend (Eina_List *list, const void *data) EINA_ARG_NONNULL(2) EINA_WARN_UNUSED_RESULT; -EAPI Eina_List * eina_list_append_relative (Eina_List *list, const void *data, const void *relative) EINA_ARG_NONNULL(2) EINA_WARN_UNUSED_RESULT; -EAPI Eina_List * eina_list_append_relative_list (Eina_List *list, const void *data, Eina_List *relative) EINA_ARG_NONNULL(2) EINA_WARN_UNUSED_RESULT; -EAPI Eina_List * eina_list_prepend_relative (Eina_List *list, const void *data, const void *relative) EINA_ARG_NONNULL(2) EINA_WARN_UNUSED_RESULT; -EAPI Eina_List * eina_list_prepend_relative_list (Eina_List *list, const void *data, Eina_List *relative) EINA_ARG_NONNULL(2) EINA_WARN_UNUSED_RESULT; -EAPI Eina_List * eina_list_sorted_insert(Eina_List *list, Eina_Compare_Cb func, const void *data) EINA_ARG_NONNULL(2, 3) EINA_WARN_UNUSED_RESULT; -EAPI Eina_List * eina_list_remove (Eina_List *list, const void *data) EINA_ARG_NONNULL(2) EINA_WARN_UNUSED_RESULT; -EAPI Eina_List * eina_list_remove_list (Eina_List *list, Eina_List *remove_list) EINA_ARG_NONNULL( 2) EINA_WARN_UNUSED_RESULT; -EAPI Eina_List * eina_list_promote_list (Eina_List *list, Eina_List *move_list) EINA_ARG_NONNULL( 2) EINA_WARN_UNUSED_RESULT; -EAPI Eina_List * eina_list_demote_list (Eina_List *list, Eina_List *move_list); -EAPI void * eina_list_data_find(const Eina_List *list, const void *data) EINA_PURE EINA_ARG_NONNULL(2) EINA_WARN_UNUSED_RESULT; -EAPI Eina_List * eina_list_data_find_list (const Eina_List *list, const void *data) EINA_PURE EINA_ARG_NONNULL(2) EINA_WARN_UNUSED_RESULT; -EAPI Eina_List * eina_list_free (Eina_List *list); -EAPI void * eina_list_nth(const Eina_List *list, unsigned int n) EINA_PURE EINA_WARN_UNUSED_RESULT; -EAPI Eina_List * eina_list_nth_list (const Eina_List *list, unsigned int n) EINA_PURE EINA_WARN_UNUSED_RESULT; -EAPI Eina_List * eina_list_reverse (Eina_List *list) EINA_WARN_UNUSED_RESULT; -EAPI Eina_List * eina_list_reverse_clone(const Eina_List *list) EINA_WARN_UNUSED_RESULT; -EAPI Eina_List * eina_list_clone(const Eina_List *list) EINA_WARN_UNUSED_RESULT; -EAPI Eina_List * eina_list_sort (Eina_List *list, unsigned int size, Eina_Compare_Cb func) EINA_ARG_NONNULL(3) EINA_WARN_UNUSED_RESULT; -EAPI Eina_List * eina_list_merge (Eina_List *left, Eina_List *right) EINA_WARN_UNUSED_RESULT; -EAPI Eina_List * eina_list_sorted_merge(Eina_List *left, Eina_List *right, Eina_Compare_Cb func) EINA_ARG_NONNULL(3) EINA_WARN_UNUSED_RESULT; -EAPI Eina_List * eina_list_split_list(Eina_List *list, Eina_List *relative, Eina_List **right) EINA_WARN_UNUSED_RESULT; +EAPI Eina_List *eina_list_append(Eina_List * list, + const void *data) EINA_ARG_NONNULL(2) + EINA_WARN_UNUSED_RESULT; +EAPI Eina_List *eina_list_prepend(Eina_List * list, + const void *data) EINA_ARG_NONNULL(2) + EINA_WARN_UNUSED_RESULT; +EAPI Eina_List *eina_list_append_relative(Eina_List * list, + const void *data, + const void *relative) +EINA_ARG_NONNULL(2) EINA_WARN_UNUSED_RESULT; +EAPI Eina_List *eina_list_append_relative_list(Eina_List * list, + const void *data, + Eina_List * + relative) +EINA_ARG_NONNULL(2) EINA_WARN_UNUSED_RESULT; +EAPI Eina_List *eina_list_prepend_relative(Eina_List * list, + const void *data, + const void *relative) +EINA_ARG_NONNULL(2) EINA_WARN_UNUSED_RESULT; +EAPI Eina_List *eina_list_prepend_relative_list(Eina_List * list, + const void *data, + Eina_List * + relative) +EINA_ARG_NONNULL(2) EINA_WARN_UNUSED_RESULT; +EAPI Eina_List *eina_list_sorted_insert(Eina_List * list, + Eina_Compare_Cb func, + const void *data) +EINA_ARG_NONNULL(2, 3) EINA_WARN_UNUSED_RESULT; +EAPI Eina_List *eina_list_remove(Eina_List * list, + const void *data) EINA_ARG_NONNULL(2) + EINA_WARN_UNUSED_RESULT; +EAPI Eina_List *eina_list_remove_list(Eina_List * list, + Eina_List * + remove_list) EINA_ARG_NONNULL(2) + EINA_WARN_UNUSED_RESULT; +EAPI Eina_List *eina_list_promote_list(Eina_List * list, + Eina_List * + move_list) EINA_ARG_NONNULL(2) + EINA_WARN_UNUSED_RESULT; +EAPI Eina_List *eina_list_demote_list(Eina_List * list, + Eina_List * move_list); +EAPI void *eina_list_data_find(const Eina_List * list, const void *data) +EINA_PURE EINA_ARG_NONNULL(2) EINA_WARN_UNUSED_RESULT; +EAPI Eina_List *eina_list_data_find_list(const Eina_List * list, + const void *data) +EINA_PURE EINA_ARG_NONNULL(2) EINA_WARN_UNUSED_RESULT; +EAPI Eina_List *eina_list_free(Eina_List * list); +EAPI void *eina_list_nth(const Eina_List * list, unsigned int n) +EINA_PURE EINA_WARN_UNUSED_RESULT; +EAPI Eina_List *eina_list_nth_list(const Eina_List * list, unsigned int n) +EINA_PURE EINA_WARN_UNUSED_RESULT; +EAPI Eina_List *eina_list_reverse(Eina_List * + list) EINA_WARN_UNUSED_RESULT; +EAPI Eina_List *eina_list_reverse_clone(const Eina_List * + list) EINA_WARN_UNUSED_RESULT; +EAPI Eina_List *eina_list_clone(const Eina_List * + list) EINA_WARN_UNUSED_RESULT; +EAPI Eina_List *eina_list_sort(Eina_List * list, unsigned int size, + Eina_Compare_Cb func) EINA_ARG_NONNULL(3) + EINA_WARN_UNUSED_RESULT; +EAPI Eina_List *eina_list_merge(Eina_List * left, + Eina_List * right) EINA_WARN_UNUSED_RESULT; +EAPI Eina_List *eina_list_sorted_merge(Eina_List * left, Eina_List * right, + Eina_Compare_Cb func) +EINA_ARG_NONNULL(3) EINA_WARN_UNUSED_RESULT; +EAPI Eina_List *eina_list_split_list(Eina_List * list, + Eina_List * relative, + Eina_List ** + right) EINA_WARN_UNUSED_RESULT; -EAPI Eina_List * eina_list_search_sorted_near_list(const Eina_List *list, Eina_Compare_Cb func, const void *data, int *result_cmp); -EAPI Eina_List * eina_list_search_sorted_list(const Eina_List *list, Eina_Compare_Cb func, const void *data); -EAPI void * eina_list_search_sorted(const Eina_List *list, Eina_Compare_Cb func, const void *data); -EAPI Eina_List * eina_list_search_unsorted_list(const Eina_List *list, Eina_Compare_Cb func, const void *data); -EAPI void * eina_list_search_unsorted(const Eina_List *list, Eina_Compare_Cb func, const void *data); +EAPI Eina_List *eina_list_search_sorted_near_list(const Eina_List * list, + Eina_Compare_Cb func, + const void *data, + int *result_cmp); +EAPI Eina_List *eina_list_search_sorted_list(const Eina_List * list, + Eina_Compare_Cb func, + const void *data); +EAPI void *eina_list_search_sorted(const Eina_List * list, + Eina_Compare_Cb func, const void *data); +EAPI Eina_List *eina_list_search_unsorted_list(const Eina_List * list, + Eina_Compare_Cb func, + const void *data); +EAPI void *eina_list_search_unsorted(const Eina_List * list, + Eina_Compare_Cb func, + const void *data); -static inline Eina_List * eina_list_last (const Eina_List *list) EINA_PURE EINA_WARN_UNUSED_RESULT; -static inline Eina_List * eina_list_next (const Eina_List *list) EINA_PURE EINA_WARN_UNUSED_RESULT; -static inline Eina_List * eina_list_prev (const Eina_List *list) EINA_PURE EINA_WARN_UNUSED_RESULT; -static inline void * eina_list_data_get(const Eina_List *list) EINA_PURE EINA_WARN_UNUSED_RESULT; -static inline unsigned int eina_list_count(const Eina_List *list) EINA_PURE; +static inline Eina_List *eina_list_last(const Eina_List * list) +EINA_PURE EINA_WARN_UNUSED_RESULT; +static inline Eina_List *eina_list_next(const Eina_List * list) +EINA_PURE EINA_WARN_UNUSED_RESULT; +static inline Eina_List *eina_list_prev(const Eina_List * list) +EINA_PURE EINA_WARN_UNUSED_RESULT; +static inline void *eina_list_data_get(const Eina_List * list) +EINA_PURE EINA_WARN_UNUSED_RESULT; +static inline unsigned int eina_list_count(const Eina_List * + list) EINA_PURE; -EAPI Eina_Iterator * eina_list_iterator_new(const Eina_List *list) EINA_MALLOC EINA_WARN_UNUSED_RESULT; -EAPI Eina_Iterator * eina_list_iterator_reversed_new(const Eina_List *list) EINA_MALLOC EINA_WARN_UNUSED_RESULT; -EAPI Eina_Accessor * eina_list_accessor_new(const Eina_List *list) EINA_MALLOC EINA_WARN_UNUSED_RESULT; +EAPI Eina_Iterator *eina_list_iterator_new(const Eina_List * list) +EINA_MALLOC EINA_WARN_UNUSED_RESULT; +EAPI Eina_Iterator *eina_list_iterator_reversed_new(const Eina_List * list) +EINA_MALLOC EINA_WARN_UNUSED_RESULT; +EAPI Eina_Accessor *eina_list_accessor_new(const Eina_List * list) +EINA_MALLOC EINA_WARN_UNUSED_RESULT; /** * @def EINA_LIST_FOREACH @@ -346,4 +410,4 @@ EAPI Eina_Accessor * eina_list_accessor_new(const Eina_List *list) * @} */ -#endif /* EINA_LIST_H_ */ +#endif /* EINA_LIST_H_ */ diff --git a/tests/suite/ecore/src/include/eina_log.h b/tests/suite/ecore/src/include/eina_log.h index d0fd1594d0..3e39bc5e8a 100644 --- a/tests/suite/ecore/src/include/eina_log.h +++ b/tests/suite/ecore/src/include/eina_log.h @@ -104,9 +104,9 @@ EAPI extern int EINA_LOG_DOMAIN_GLOBAL; * @endcode * */ -# define EINA_LOG_DOMAIN_DEFAULT EINA_LOG_DOMAIN_GLOBAL +#define EINA_LOG_DOMAIN_DEFAULT EINA_LOG_DOMAIN_GLOBAL -#endif /* EINA_LOG_DOMAIN_DEFAULT */ +#endif /* EINA_LOG_DOMAIN_DEFAULT */ /** @@ -229,15 +229,19 @@ typedef struct _Eina_Log_Domain Eina_Log_Domain; * @struct _Eina_Log_Domain * The domain used for logging. */ -struct _Eina_Log_Domain -{ - int level; /**< Max level to log */ - const char *domain_str; /**< Formatted string with color to print */ - const char *name; /**< Domain name */ - size_t namelen; /**< strlen(name) */ - - /* Private */ - Eina_Bool deleted : 1; /**< Flags deletion of domain, a free slot */ +struct _Eina_Log_Domain { + int level; + /**< Max level to log */ + const char *domain_str; + /**< Formatted string with color to print */ + const char *name; + /**< Domain name */ + size_t namelen; + /**< strlen(name) */ + + /* Private */ + Eina_Bool deleted:1; + /**< Flags deletion of domain, a free slot */ }; EAPI void eina_log_threads_enable(void); @@ -246,133 +250,123 @@ EAPI void eina_log_threads_enable(void); * @enum _Eina_Log_Level * List of available logging levels. */ -typedef enum _Eina_Log_Level -{ - EINA_LOG_LEVEL_CRITICAL, /**< Critical log level */ - EINA_LOG_LEVEL_ERR, /**< Error log level */ - EINA_LOG_LEVEL_WARN, /**< Warning log level */ - EINA_LOG_LEVEL_INFO, /**< Information log level */ - EINA_LOG_LEVEL_DBG, /**< Debug log level */ - EINA_LOG_LEVELS, /**< Count of default log levels */ - EINA_LOG_LEVEL_UNKNOWN = (-2147483647 - 1) /**< Unknown level */ +typedef enum _Eina_Log_Level { + EINA_LOG_LEVEL_CRITICAL, + /**< Critical log level */ + EINA_LOG_LEVEL_ERR, + /**< Error log level */ + EINA_LOG_LEVEL_WARN, + /**< Warning log level */ + EINA_LOG_LEVEL_INFO, + /**< Information log level */ + EINA_LOG_LEVEL_DBG, + /**< Debug log level */ + EINA_LOG_LEVELS, + /**< Count of default log levels */ + EINA_LOG_LEVEL_UNKNOWN = (-2147483647 - 1)/**< Unknown level */ } Eina_Log_Level; /** * @typedef Eina_Log_Print_Cb * Type for print callbacks. */ -typedef void (*Eina_Log_Print_Cb)(const Eina_Log_Domain *d, - Eina_Log_Level level, - const char *file, const char *fnc, int line, - const char *fmt, void *data, va_list args); +typedef void (*Eina_Log_Print_Cb) (const Eina_Log_Domain * d, + Eina_Log_Level level, + const char *file, const char *fnc, + int line, const char *fmt, void *data, + va_list args); /* * Customization */ EAPI void -eina_log_print_cb_set(Eina_Log_Print_Cb cb, void *data) EINA_ARG_NONNULL(1); +eina_log_print_cb_set(Eina_Log_Print_Cb cb, + void *data) EINA_ARG_NONNULL(1); -EAPI void -eina_log_level_set(int level); -EAPI int -eina_log_level_get(void) EINA_WARN_UNUSED_RESULT; +EAPI void eina_log_level_set(int level); +EAPI int eina_log_level_get(void) EINA_WARN_UNUSED_RESULT; -static inline Eina_Bool -eina_log_level_check(int level); +static inline Eina_Bool eina_log_level_check(int level); -EAPI Eina_Bool -eina_log_main_thread_check(void) EINA_CONST EINA_WARN_UNUSED_RESULT; +EAPI Eina_Bool eina_log_main_thread_check(void) +EINA_CONST EINA_WARN_UNUSED_RESULT; -EAPI void -eina_log_color_disable_set(Eina_Bool disabled); -EAPI Eina_Bool -eina_log_color_disable_get(void) EINA_WARN_UNUSED_RESULT; -EAPI void -eina_log_file_disable_set(Eina_Bool disabled); -EAPI Eina_Bool -eina_log_file_disable_get(void) EINA_WARN_UNUSED_RESULT; -EAPI void -eina_log_function_disable_set(Eina_Bool disabled); -EAPI Eina_Bool -eina_log_function_disable_get(void) EINA_WARN_UNUSED_RESULT; -EAPI void -eina_log_abort_on_critical_set(Eina_Bool abort_on_critical); +EAPI void eina_log_color_disable_set(Eina_Bool disabled); +EAPI Eina_Bool eina_log_color_disable_get(void) EINA_WARN_UNUSED_RESULT; +EAPI void eina_log_file_disable_set(Eina_Bool disabled); +EAPI Eina_Bool eina_log_file_disable_get(void) EINA_WARN_UNUSED_RESULT; +EAPI void eina_log_function_disable_set(Eina_Bool disabled); +EAPI Eina_Bool eina_log_function_disable_get(void) EINA_WARN_UNUSED_RESULT; +EAPI void eina_log_abort_on_critical_set(Eina_Bool abort_on_critical); EAPI Eina_Bool eina_log_abort_on_critical_get(void) EINA_WARN_UNUSED_RESULT; -EAPI void -eina_log_abort_on_critical_level_set(int critical_level); +EAPI void eina_log_abort_on_critical_level_set(int critical_level); EAPI int eina_log_abort_on_critical_level_get(void) EINA_WARN_UNUSED_RESULT; EAPI void -eina_log_domain_level_set(const char *domain_name, int level) EINA_ARG_NONNULL(1); -EAPI int -eina_log_domain_level_get(const char *domain_name) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); +eina_log_domain_level_set(const char *domain_name, + int level) EINA_ARG_NONNULL(1); +EAPI int eina_log_domain_level_get(const char *domain_name) +EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); EAPI int eina_log_domain_registered_level_get(int domain) EINA_WARN_UNUSED_RESULT; -static inline Eina_Bool -eina_log_domain_level_check(int domain, int level); +static inline Eina_Bool eina_log_domain_level_check(int domain, int level); /* * Logging domains */ EAPI int -eina_log_domain_register(const char *name, const char *color) EINA_ARG_NONNULL(1); -EAPI void -eina_log_domain_unregister(int domain); +eina_log_domain_register(const char *name, + const char *color) EINA_ARG_NONNULL(1); +EAPI void eina_log_domain_unregister(int domain); /* * Logging functions. */ EAPI void eina_log_print(int domain, - Eina_Log_Level level, - const char *file, - const char *function, - int line, - const char *fmt, - ...) EINA_ARG_NONNULL(3, 4, 6) EINA_PRINTF(6, 7) EINA_NOINSTRUMENT; -EAPI void -eina_log_vprint(int domain, - Eina_Log_Level level, - const char *file, - const char *fnc, - int line, - const char *fmt, - va_list args) EINA_ARG_NONNULL(3, 4, 6) EINA_NOINSTRUMENT; + Eina_Log_Level level, + const char *file, + const char *function, + int line, + const char *fmt, + ...) EINA_ARG_NONNULL(3, 4, 6) EINA_PRINTF(6, + 7) +EINA_NOINSTRUMENT; +EAPI void eina_log_vprint(int domain, Eina_Log_Level level, + const char *file, const char *fnc, int line, + const char *fmt, + va_list args) EINA_ARG_NONNULL(3, 4, + 6) + EINA_NOINSTRUMENT; /* * Logging methods (change how logging is done). */ EAPI void -eina_log_print_cb_stdout(const Eina_Log_Domain *d, - Eina_Log_Level level, - const char *file, - const char *fnc, - int line, - const char *fmt, - void *data, - va_list args); +eina_log_print_cb_stdout(const Eina_Log_Domain * d, + Eina_Log_Level level, + const char *file, + const char *fnc, + int line, + const char *fmt, void *data, va_list args); EAPI void -eina_log_print_cb_stderr(const Eina_Log_Domain *d, - Eina_Log_Level level, - const char *file, - const char *fnc, - int line, - const char *fmt, - void *data, - va_list args); +eina_log_print_cb_stderr(const Eina_Log_Domain * d, + Eina_Log_Level level, + const char *file, + const char *fnc, + int line, + const char *fmt, void *data, va_list args); EAPI void -eina_log_print_cb_file(const Eina_Log_Domain *d, - Eina_Log_Level level, - const char *file, - const char *fnc, - int line, - const char *fmt, - void *data, - va_list args); +eina_log_print_cb_file(const Eina_Log_Domain * d, + Eina_Log_Level level, + const char *file, + const char *fnc, + int line, + const char *fmt, void *data, va_list args); #include "eina_inline_log.x" @@ -384,4 +378,4 @@ eina_log_print_cb_file(const Eina_Log_Domain *d, * @} */ -#endif /* EINA_LOG_H_ */ +#endif /* EINA_LOG_H_ */ diff --git a/tests/suite/ecore/src/include/eina_magic.h b/tests/suite/ecore/src/include/eina_magic.h index dd1a9f3a56..1f703932ad 100644 --- a/tests/suite/ecore/src/include/eina_magic.h +++ b/tests/suite/ecore/src/include/eina_magic.h @@ -41,11 +41,14 @@ typedef unsigned int Eina_Magic; * @typedef Eina_Magic * An abstract type for a magic number. */ -EAPI const char *eina_magic_string_get(Eina_Magic magic) EINA_PURE EINA_WARN_UNUSED_RESULT; -EAPI Eina_Bool eina_magic_string_set(Eina_Magic magic, - const char *magic_name) EINA_ARG_NONNULL(2); -EAPI Eina_Bool eina_magic_string_static_set(Eina_Magic magic, - const char *magic_name) EINA_ARG_NONNULL(2); +EAPI const char *eina_magic_string_get(Eina_Magic magic) +EINA_PURE EINA_WARN_UNUSED_RESULT; +EAPI Eina_Bool eina_magic_string_set(Eina_Magic magic, + const char *magic_name) +EINA_ARG_NONNULL(2); +EAPI Eina_Bool eina_magic_string_static_set(Eina_Magic magic, + const char *magic_name) +EINA_ARG_NONNULL(2); /** * @def EINA_MAGIC_NONE @@ -120,8 +123,8 @@ EAPI Eina_Bool eina_magic_string_static_set(Eina_Magic magic, __LINE__); EAPI void eina_magic_fail(void *d, Eina_Magic m, Eina_Magic req_m, - const char *file, const char *fnc, - int line) EINA_ARG_NONNULL(4, 5); + const char *file, const char *fnc, + int line) EINA_ARG_NONNULL(4, 5); #else @@ -150,4 +153,4 @@ EAPI void eina_magic_fail(void *d, Eina_Magic m, Eina_Magic req_m, * @} */ -#endif /* EINA_MAGIC_H_ */ +#endif /* EINA_MAGIC_H_ */ diff --git a/tests/suite/ecore/src/include/eina_main.h b/tests/suite/ecore/src/include/eina_main.h index db80042465..06e64d9813 100644 --- a/tests/suite/ecore/src/include/eina_main.h +++ b/tests/suite/ecore/src/include/eina_main.h @@ -49,12 +49,15 @@ * @typedef Eina_Version * The version of Eina. */ -typedef struct _Eina_Version -{ - int major; /**< Major component of the version */ - int minor; /**< Minor component of the version */ - int micro; /**< Micro component of the version */ - int revision; /**< Revision component of the version */ +typedef struct _Eina_Version { + int major; + /**< Major component of the version */ + int minor; + /**< Minor component of the version */ + int micro; + /**< Micro component of the version */ + int revision; + /**< Revision component of the version */ } Eina_Version; EAPI extern Eina_Version *eina_version; @@ -72,4 +75,4 @@ EAPI int eina_threads_shutdown(void); * @} */ -#endif /* EINA_MAIN_H_ */ +#endif /* EINA_MAIN_H_ */ diff --git a/tests/suite/ecore/src/include/eina_matrixsparse.h b/tests/suite/ecore/src/include/eina_matrixsparse.h index cbf29ccb7e..561ff1a6ba 100644 --- a/tests/suite/ecore/src/include/eina_matrixsparse.h +++ b/tests/suite/ecore/src/include/eina_matrixsparse.h @@ -69,41 +69,71 @@ typedef struct _Eina_Matrixsparse_Item_Row Eina_Matrixsparse_Item_Row; /* constructors and destructors */ EAPI Eina_Matrixsparse *eina_matrixsparse_new(unsigned long rows, - unsigned long cols, - void (*free_func)(void *user_data, - void *cell_data), - const void *user_data); -EAPI void eina_matrixsparse_free(Eina_Matrixsparse *m); + unsigned long cols, + void (*free_func) (void + *user_data, + void + *cell_data), + const void *user_data); +EAPI void eina_matrixsparse_free(Eina_Matrixsparse * m); /* size manipulation */ -EAPI void eina_matrixsparse_size_get(const Eina_Matrixsparse *m, - unsigned long *rows, - unsigned long *cols); -EAPI Eina_Bool eina_matrixsparse_size_set(Eina_Matrixsparse *m, - unsigned long rows, - unsigned long cols); +EAPI void eina_matrixsparse_size_get(const Eina_Matrixsparse * m, + unsigned long *rows, + unsigned long *cols); +EAPI Eina_Bool eina_matrixsparse_size_set(Eina_Matrixsparse * m, + unsigned long rows, + unsigned long cols); /* data getting */ -EAPI Eina_Bool eina_matrixsparse_cell_idx_get(const Eina_Matrixsparse *m, unsigned long row, unsigned long col, Eina_Matrixsparse_Cell **cell); -EAPI void * eina_matrixsparse_cell_data_get(const Eina_Matrixsparse_Cell *cell); -EAPI void * eina_matrixsparse_data_idx_get(const Eina_Matrixsparse *m, unsigned long row, unsigned long col); -EAPI Eina_Bool eina_matrixsparse_cell_position_get(const Eina_Matrixsparse_Cell *cell, unsigned long *row, unsigned long *col); +EAPI Eina_Bool eina_matrixsparse_cell_idx_get(const Eina_Matrixsparse * m, + unsigned long row, + unsigned long col, + Eina_Matrixsparse_Cell ** + cell); +EAPI void *eina_matrixsparse_cell_data_get(const Eina_Matrixsparse_Cell * + cell); +EAPI void *eina_matrixsparse_data_idx_get(const Eina_Matrixsparse * m, + unsigned long row, + unsigned long col); +EAPI Eina_Bool eina_matrixsparse_cell_position_get(const + Eina_Matrixsparse_Cell * + cell, + unsigned long *row, + unsigned long *col); /* data setting */ -EAPI Eina_Bool eina_matrixsparse_cell_data_replace(Eina_Matrixsparse_Cell *cell, const void *data, void **p_old); -EAPI Eina_Bool eina_matrixsparse_cell_data_set(Eina_Matrixsparse_Cell *cell, const void *data); -EAPI Eina_Bool eina_matrixsparse_data_idx_replace(Eina_Matrixsparse *m, unsigned long row, unsigned long col, const void *data, void **p_old); -EAPI Eina_Bool eina_matrixsparse_data_idx_set(Eina_Matrixsparse *m, unsigned long row, unsigned long col, const void *data); +EAPI Eina_Bool eina_matrixsparse_cell_data_replace(Eina_Matrixsparse_Cell * + cell, const void *data, + void **p_old); +EAPI Eina_Bool eina_matrixsparse_cell_data_set(Eina_Matrixsparse_Cell * + cell, const void *data); +EAPI Eina_Bool eina_matrixsparse_data_idx_replace(Eina_Matrixsparse * m, + unsigned long row, + unsigned long col, + const void *data, + void **p_old); +EAPI Eina_Bool eina_matrixsparse_data_idx_set(Eina_Matrixsparse * m, + unsigned long row, + unsigned long col, + const void *data); /* data deleting */ -EAPI Eina_Bool eina_matrixsparse_row_idx_clear(Eina_Matrixsparse *m, unsigned long row); -EAPI Eina_Bool eina_matrixsparse_column_idx_clear(Eina_Matrixsparse *m, unsigned long col); -EAPI Eina_Bool eina_matrixsparse_cell_idx_clear(Eina_Matrixsparse *m, unsigned long row, unsigned long col); -EAPI Eina_Bool eina_matrixsparse_cell_clear(Eina_Matrixsparse_Cell *cell); +EAPI Eina_Bool eina_matrixsparse_row_idx_clear(Eina_Matrixsparse * m, + unsigned long row); +EAPI Eina_Bool eina_matrixsparse_column_idx_clear(Eina_Matrixsparse * m, + unsigned long col); +EAPI Eina_Bool eina_matrixsparse_cell_idx_clear(Eina_Matrixsparse * m, + unsigned long row, + unsigned long col); +EAPI Eina_Bool eina_matrixsparse_cell_clear(Eina_Matrixsparse_Cell * cell); /* iterators */ -EAPI Eina_Iterator *eina_matrixsparse_iterator_new(const Eina_Matrixsparse *m); -EAPI Eina_Iterator *eina_matrixsparse_iterator_complete_new(const Eina_Matrixsparse *m); +EAPI Eina_Iterator *eina_matrixsparse_iterator_new(const Eina_Matrixsparse + * m); +EAPI Eina_Iterator *eina_matrixsparse_iterator_complete_new(const + Eina_Matrixsparse + * m); /** * @} @@ -117,4 +147,4 @@ EAPI Eina_Iterator *eina_matrixsparse_iterator_complete_new(const Eina_Matrixspa * @} */ -#endif /* EINA_MATRIXSPARSE_H_ */ +#endif /* EINA_MATRIXSPARSE_H_ */ diff --git a/tests/suite/ecore/src/include/eina_mempool.h b/tests/suite/ecore/src/include/eina_mempool.h index cc19e94018..b8004eb143 100644 --- a/tests/suite/ecore/src/include/eina_mempool.h +++ b/tests/suite/ecore/src/include/eina_mempool.h @@ -49,20 +49,30 @@ typedef struct _Eina_Mempool_Backend Eina_Mempool_Backend; EAPI extern Eina_Error EINA_ERROR_NOT_MEMPOOL_MODULE; -EAPI Eina_Mempool * eina_mempool_add(const char *module,const char *context,const char *options,...) EINA_MALLOC EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); -EAPI void eina_mempool_del(Eina_Mempool *mp) EINA_ARG_NONNULL(1); - -static inline void * eina_mempool_realloc(Eina_Mempool *mp,void *element,unsigned int size) EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT; -static inline void * eina_mempool_malloc(Eina_Mempool *mp,unsigned int size) EINA_MALLOC EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT; -static inline void eina_mempool_free(Eina_Mempool *mp,void *element) EINA_ARG_NONNULL(1); - -EAPI void eina_mempool_gc(Eina_Mempool *mp) EINA_ARG_NONNULL(1); -EAPI void eina_mempool_statistics(Eina_Mempool *mp) EINA_ARG_NONNULL(1); - -EAPI Eina_Bool eina_mempool_register(Eina_Mempool_Backend *be) EINA_ARG_NONNULL(1); -EAPI void eina_mempool_unregister(Eina_Mempool_Backend *be) EINA_ARG_NONNULL(1); - -EAPI unsigned int eina_mempool_alignof(unsigned int size); +EAPI Eina_Mempool *eina_mempool_add(const char *module, + const char *context, + const char *options, ...) +EINA_MALLOC EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); +EAPI void eina_mempool_del(Eina_Mempool * mp) EINA_ARG_NONNULL(1); + +static inline void *eina_mempool_realloc(Eina_Mempool * mp, void *element, + unsigned int size) +EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT; +static inline void *eina_mempool_malloc(Eina_Mempool * mp, + unsigned int size) +EINA_MALLOC EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT; +static inline void eina_mempool_free(Eina_Mempool * mp, + void *element) EINA_ARG_NONNULL(1); + +EAPI void eina_mempool_gc(Eina_Mempool * mp) EINA_ARG_NONNULL(1); +EAPI void eina_mempool_statistics(Eina_Mempool * mp) EINA_ARG_NONNULL(1); + +EAPI Eina_Bool eina_mempool_register(Eina_Mempool_Backend * + be) EINA_ARG_NONNULL(1); +EAPI void eina_mempool_unregister(Eina_Mempool_Backend * + be) EINA_ARG_NONNULL(1); + +EAPI unsigned int eina_mempool_alignof(unsigned int size); #include "eina_inline_mempool.x" @@ -74,4 +84,4 @@ EAPI unsigned int eina_mempool_alignof(unsigned int size); * @} */ -#endif /* EINA_MEMPOOL_H_ */ +#endif /* EINA_MEMPOOL_H_ */ diff --git a/tests/suite/ecore/src/include/eina_module.h b/tests/suite/ecore/src/include/eina_module.h index 6618381c30..4b856c8bf2 100644 --- a/tests/suite/ecore/src/include/eina_module.h +++ b/tests/suite/ecore/src/include/eina_module.h @@ -61,7 +61,7 @@ */ typedef struct _Eina_Module Eina_Module; -typedef Eina_Bool (*Eina_Module_Cb)(Eina_Module *m, void *data); +typedef Eina_Bool(*Eina_Module_Cb) (Eina_Module * m, void *data); /** * @typedef Eina_Module_Init @@ -71,7 +71,7 @@ typedef Eina_Bool (*Eina_Module_Cb)(Eina_Module *m, void *data); * means the module was successfully initialized. * @see Eina_Module_Shutdown */ -typedef Eina_Bool (*Eina_Module_Init)(void); +typedef Eina_Bool(*Eina_Module_Init) (void); /** * @typedef Eina_Module_Shutdown @@ -79,7 +79,7 @@ typedef Eina_Bool (*Eina_Module_Init)(void); * __eina_module_shutdown, it will be called before calling dlclose() * @see Eina_Module_Init */ -typedef void (*Eina_Module_Shutdown)(void); +typedef void (*Eina_Module_Shutdown) (void); /** * @def EINA_MODULE_INIT @@ -108,36 +108,37 @@ extern EAPI Eina_Error EINA_ERROR_WRONG_MODULE; */ extern EAPI Eina_Error EINA_ERROR_MODULE_INIT_FAILED; -EAPI Eina_Module * -eina_module_new(const char *file) EINA_MALLOC EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); -EAPI Eina_Bool -eina_module_free(Eina_Module *m) EINA_ARG_NONNULL(1); -EAPI Eina_Bool -eina_module_load(Eina_Module *module) EINA_ARG_NONNULL(1); -EAPI Eina_Bool -eina_module_unload(Eina_Module *m) EINA_ARG_NONNULL(1); -EAPI void * -eina_module_symbol_get(const Eina_Module *module, const char *symbol) EINA_PURE EINA_ARG_NONNULL(1, 2) EINA_WARN_UNUSED_RESULT; -EAPI const char * -eina_module_file_get(const Eina_Module *m) EINA_PURE EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); - -EAPI char * -eina_module_symbol_path_get(const void *symbol, const char *sub_dir) EINA_PURE EINA_MALLOC EINA_ARG_NONNULL(1, 2); -EAPI char * -eina_module_environment_path_get(const char *env, const char *sub_dir) EINA_PURE EINA_MALLOC EINA_ARG_NONNULL(1, 2); - -EAPI Eina_Array * -eina_module_arch_list_get(Eina_Array *array, const char *path, const char *arch); -EAPI Eina_Array * -eina_module_list_get(Eina_Array *array, const char *path, Eina_Bool recursive, Eina_Module_Cb cb, void *data) EINA_MALLOC EINA_WARN_UNUSED_RESULT; -EAPI void -eina_module_list_load(Eina_Array *list) EINA_ARG_NONNULL(1); -EAPI void -eina_module_list_unload(Eina_Array *list) EINA_ARG_NONNULL(1); -EAPI void -eina_module_list_free(Eina_Array *list) EINA_ARG_NONNULL(1); -EAPI Eina_Module * -eina_module_find(const Eina_Array *array, const char *module) EINA_ARG_NONNULL(1, 2); +EAPI Eina_Module *eina_module_new(const char *file) +EINA_MALLOC EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); +EAPI Eina_Bool eina_module_free(Eina_Module * m) EINA_ARG_NONNULL(1); +EAPI Eina_Bool eina_module_load(Eina_Module * module) EINA_ARG_NONNULL(1); +EAPI Eina_Bool eina_module_unload(Eina_Module * m) EINA_ARG_NONNULL(1); +EAPI void *eina_module_symbol_get(const Eina_Module * module, + const char *symbol) +EINA_PURE EINA_ARG_NONNULL(1, 2) EINA_WARN_UNUSED_RESULT; +EAPI const char *eina_module_file_get(const Eina_Module * m) +EINA_PURE EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); + +EAPI char *eina_module_symbol_path_get(const void *symbol, + const char *sub_dir) +EINA_PURE EINA_MALLOC EINA_ARG_NONNULL(1, 2); +EAPI char *eina_module_environment_path_get(const char *env, + const char *sub_dir) +EINA_PURE EINA_MALLOC EINA_ARG_NONNULL(1, 2); + +EAPI Eina_Array *eina_module_arch_list_get(Eina_Array * array, + const char *path, + const char *arch); +EAPI Eina_Array *eina_module_list_get(Eina_Array * array, const char *path, + Eina_Bool recursive, + Eina_Module_Cb cb, void *data) +EINA_MALLOC EINA_WARN_UNUSED_RESULT; +EAPI void eina_module_list_load(Eina_Array * list) EINA_ARG_NONNULL(1); +EAPI void eina_module_list_unload(Eina_Array * list) EINA_ARG_NONNULL(1); +EAPI void eina_module_list_free(Eina_Array * list) EINA_ARG_NONNULL(1); +EAPI Eina_Module *eina_module_find(const Eina_Array * array, + const char *module) EINA_ARG_NONNULL(1, + 2); /** * @} @@ -147,4 +148,4 @@ eina_module_find(const Eina_Array *array, const char *module) EINA_ARG_NONNULL(1 * @} */ -#endif /*EINA_MODULE_H_*/ +#endif /*EINA_MODULE_H_ */ diff --git a/tests/suite/ecore/src/include/eina_quadtree.h b/tests/suite/ecore/src/include/eina_quadtree.h index ad24c3ebb3..f77b21c954 100644 --- a/tests/suite/ecore/src/include/eina_quadtree.h +++ b/tests/suite/ecore/src/include/eina_quadtree.h @@ -27,27 +27,32 @@ typedef struct _Eina_QuadTree Eina_QuadTree; typedef struct _Eina_QuadTree_Item Eina_QuadTree_Item; typedef enum { - EINA_QUAD_LEFT, - EINA_QUAD_RIGHT, - EINA_QUAD_BOTH + EINA_QUAD_LEFT, + EINA_QUAD_RIGHT, + EINA_QUAD_BOTH } Eina_Quad_Direction; -typedef Eina_Quad_Direction (*Eina_Quad_Callback)(const void *object, size_t middle); +typedef Eina_Quad_Direction(*Eina_Quad_Callback) (const void *object, + size_t middle); -EAPI Eina_QuadTree * eina_quadtree_new(size_t w, size_t h, Eina_Quad_Callback vertical, Eina_Quad_Callback horizontal); -EAPI void eina_quadtree_free(Eina_QuadTree *q); -EAPI void eina_quadtree_resize(Eina_QuadTree *q, size_t w, size_t h); +EAPI Eina_QuadTree *eina_quadtree_new(size_t w, size_t h, + Eina_Quad_Callback vertical, + Eina_Quad_Callback horizontal); +EAPI void eina_quadtree_free(Eina_QuadTree * q); +EAPI void eina_quadtree_resize(Eina_QuadTree * q, size_t w, size_t h); -EAPI void eina_quadtree_cycle(Eina_QuadTree *q); -EAPI void eina_quadtree_increase(Eina_QuadTree_Item *object); +EAPI void eina_quadtree_cycle(Eina_QuadTree * q); +EAPI void eina_quadtree_increase(Eina_QuadTree_Item * object); -EAPI Eina_QuadTree_Item *eina_quadtree_add(Eina_QuadTree *q, const void *object); -EAPI Eina_Bool eina_quadtree_del(Eina_QuadTree_Item *object); -EAPI Eina_Bool eina_quadtree_change(Eina_QuadTree_Item *object); -EAPI Eina_Bool eina_quadtree_hide(Eina_QuadTree_Item *object); -EAPI Eina_Bool eina_quadtree_show(Eina_QuadTree_Item *object); +EAPI Eina_QuadTree_Item *eina_quadtree_add(Eina_QuadTree * q, + const void *object); +EAPI Eina_Bool eina_quadtree_del(Eina_QuadTree_Item * object); +EAPI Eina_Bool eina_quadtree_change(Eina_QuadTree_Item * object); +EAPI Eina_Bool eina_quadtree_hide(Eina_QuadTree_Item * object); +EAPI Eina_Bool eina_quadtree_show(Eina_QuadTree_Item * object); -EAPI Eina_Inlist * eina_quadtree_collide(Eina_QuadTree *q, int x, int y, int w, int h); -EAPI void * eina_quadtree_object(Eina_Inlist *list); +EAPI Eina_Inlist *eina_quadtree_collide(Eina_QuadTree * q, int x, int y, + int w, int h); +EAPI void *eina_quadtree_object(Eina_Inlist * list); #endif diff --git a/tests/suite/ecore/src/include/eina_rbtree.h b/tests/suite/ecore/src/include/eina_rbtree.h index 026db41ca1..f2b0e987bb 100644 --- a/tests/suite/ecore/src/include/eina_rbtree.h +++ b/tests/suite/ecore/src/include/eina_rbtree.h @@ -48,8 +48,8 @@ * node color. */ typedef enum { - EINA_RBTREE_RED, - EINA_RBTREE_BLACK + EINA_RBTREE_RED, + EINA_RBTREE_BLACK } Eina_Rbtree_Color; /** @@ -57,8 +57,8 @@ typedef enum { * walk direction. */ typedef enum { - EINA_RBTREE_LEFT = 0, - EINA_RBTREE_RIGHT = 1 + EINA_RBTREE_LEFT = 0, + EINA_RBTREE_RIGHT = 1 } Eina_Rbtree_Direction; /** @@ -66,11 +66,10 @@ typedef enum { * Type for a Red-Black tree node. It should be inlined into user's type. */ typedef struct _Eina_Rbtree Eina_Rbtree; -struct _Eina_Rbtree -{ - Eina_Rbtree *son[2]; +struct _Eina_Rbtree { + Eina_Rbtree *son[2]; - Eina_Rbtree_Color color : 1; + Eina_Rbtree_Color color:1; }; /** @@ -99,7 +98,11 @@ struct _Eina_Rbtree * @typedef Eina_Rbtree_Cmp_Node_Cb * Function used compare two nodes and see which direction to navigate. */ -typedef Eina_Rbtree_Direction (*Eina_Rbtree_Cmp_Node_Cb)(const Eina_Rbtree *left, const Eina_Rbtree *right, void *data); +typedef Eina_Rbtree_Direction(*Eina_Rbtree_Cmp_Node_Cb) (const Eina_Rbtree + * left, + const Eina_Rbtree + * right, + void *data); /** * @def EINA_RBTREE_CMP_NODE_CB @@ -111,7 +114,9 @@ typedef Eina_Rbtree_Direction (*Eina_Rbtree_Cmp_Node_Cb)(const Eina_Rbtree *left * @typedef Eina_Rbtree_Cmp_Key_Cb * Function used compare node with a given key of specified length. */ -typedef int (*Eina_Rbtree_Cmp_Key_Cb)(const Eina_Rbtree *node, const void *key, int length, void *data); +typedef int (*Eina_Rbtree_Cmp_Key_Cb) (const Eina_Rbtree * node, + const void *key, int length, + void *data); /** * @def EINA_RBTREE_CMP_KEY_CB * Cast using #Eina_Rbtree_Cmp_Key_Cb @@ -122,22 +127,39 @@ typedef int (*Eina_Rbtree_Cmp_Key_Cb)(const Eina_Rbtree *node, const void *key, * @typedef Eina_Rbtree_Free_Cb * Function used free a node. */ -typedef void (*Eina_Rbtree_Free_Cb)(Eina_Rbtree *node, void *data); +typedef void (*Eina_Rbtree_Free_Cb) (Eina_Rbtree * node, void *data); /** * @def EINA_RBTREE_FREE_CB * Cast using #Eina_Rbtree_Free_Cb */ #define EINA_RBTREE_FREE_CB(Function) ((Eina_Rbtree_Free_Cb)Function) -EAPI Eina_Rbtree * eina_rbtree_inline_insert(Eina_Rbtree *root,Eina_Rbtree *node,Eina_Rbtree_Cmp_Node_Cb cmp,const void *data) EINA_ARG_NONNULL(2, 3) EINA_WARN_UNUSED_RESULT; -EAPI Eina_Rbtree * eina_rbtree_inline_remove(Eina_Rbtree *root,Eina_Rbtree *node,Eina_Rbtree_Cmp_Node_Cb cmp,const void *data) EINA_ARG_NONNULL(2, 3) EINA_WARN_UNUSED_RESULT; -EAPI void eina_rbtree_delete(Eina_Rbtree *root,Eina_Rbtree_Free_Cb func,void *data) EINA_ARG_NONNULL(2); - -static inline Eina_Rbtree * eina_rbtree_inline_lookup(const Eina_Rbtree *root,const void *key,int length,Eina_Rbtree_Cmp_Key_Cb cmp,const void *data) EINA_PURE EINA_ARG_NONNULL(2, 4) EINA_WARN_UNUSED_RESULT; - -EAPI Eina_Iterator * eina_rbtree_iterator_prefix(const Eina_Rbtree *root) EINA_MALLOC EINA_WARN_UNUSED_RESULT; -EAPI Eina_Iterator * eina_rbtree_iterator_infix(const Eina_Rbtree *root) EINA_MALLOC EINA_WARN_UNUSED_RESULT; -EAPI Eina_Iterator * eina_rbtree_iterator_postfix(const Eina_Rbtree *root) EINA_MALLOC EINA_WARN_UNUSED_RESULT; +EAPI Eina_Rbtree *eina_rbtree_inline_insert(Eina_Rbtree * root, + Eina_Rbtree * node, + Eina_Rbtree_Cmp_Node_Cb cmp, + const void *data) +EINA_ARG_NONNULL(2, 3) EINA_WARN_UNUSED_RESULT; +EAPI Eina_Rbtree *eina_rbtree_inline_remove(Eina_Rbtree * root, + Eina_Rbtree * node, + Eina_Rbtree_Cmp_Node_Cb cmp, + const void *data) +EINA_ARG_NONNULL(2, 3) EINA_WARN_UNUSED_RESULT; +EAPI void eina_rbtree_delete(Eina_Rbtree * root, Eina_Rbtree_Free_Cb func, + void *data) EINA_ARG_NONNULL(2); + +static inline Eina_Rbtree *eina_rbtree_inline_lookup(const Eina_Rbtree * + root, const void *key, + int length, + Eina_Rbtree_Cmp_Key_Cb + cmp, const void *data) +EINA_PURE EINA_ARG_NONNULL(2, 4) EINA_WARN_UNUSED_RESULT; + +EAPI Eina_Iterator *eina_rbtree_iterator_prefix(const Eina_Rbtree * root) +EINA_MALLOC EINA_WARN_UNUSED_RESULT; +EAPI Eina_Iterator *eina_rbtree_iterator_infix(const Eina_Rbtree * root) +EINA_MALLOC EINA_WARN_UNUSED_RESULT; +EAPI Eina_Iterator *eina_rbtree_iterator_postfix(const Eina_Rbtree * root) +EINA_MALLOC EINA_WARN_UNUSED_RESULT; #include "eina_inline_rbtree.x" diff --git a/tests/suite/ecore/src/include/eina_rectangle.h b/tests/suite/ecore/src/include/eina_rectangle.h index a9daf66672..71a4e70c28 100644 --- a/tests/suite/ecore/src/include/eina_rectangle.h +++ b/tests/suite/ecore/src/include/eina_rectangle.h @@ -37,12 +37,15 @@ * @typedef Eina_Rectangle * Simple rectangle structure. */ -typedef struct _Eina_Rectangle -{ - int x; /**< top-left x co-ordinate of rectangle */ - int y; /**< top-left y co-ordinate of rectangle */ - int w; /**< width of rectangle */ - int h; /**< height of rectangle */ +typedef struct _Eina_Rectangle { + int x; + /**< top-left x co-ordinate of rectangle */ + int y; + /**< top-left y co-ordinate of rectangle */ + int w; + /**< width of rectangle */ + int h; + /**< height of rectangle */ } Eina_Rectangle; /** @@ -51,27 +54,72 @@ typedef struct _Eina_Rectangle */ typedef struct _Eina_Rectangle_Pool Eina_Rectangle_Pool; -static inline int eina_spans_intersect(int c1, int l1, int c2, int l2) EINA_WARN_UNUSED_RESULT; -static inline Eina_Bool eina_rectangle_is_empty(const Eina_Rectangle *r) EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT; -static inline void eina_rectangle_coords_from(Eina_Rectangle *r, int x, int y, int w, int h) EINA_ARG_NONNULL(1); -static inline Eina_Bool eina_rectangles_intersect(const Eina_Rectangle *r1, const Eina_Rectangle *r2) EINA_ARG_NONNULL(1, 2) EINA_WARN_UNUSED_RESULT; -static inline Eina_Bool eina_rectangle_xcoord_inside(const Eina_Rectangle *r, int x) EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT; -static inline Eina_Bool eina_rectangle_ycoord_inside(const Eina_Rectangle *r, int y) EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT; -static inline Eina_Bool eina_rectangle_coords_inside(const Eina_Rectangle *r, int x, int y) EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT; -static inline void eina_rectangle_union(Eina_Rectangle *dst, const Eina_Rectangle *src) EINA_ARG_NONNULL(1, 2); -static inline Eina_Bool eina_rectangle_intersection(Eina_Rectangle *dst, const Eina_Rectangle *src) EINA_ARG_NONNULL(1, 2) EINA_WARN_UNUSED_RESULT; -static inline void eina_rectangle_rescale_in(const Eina_Rectangle *out, const Eina_Rectangle *in, Eina_Rectangle *res) EINA_ARG_NONNULL(1, 2, 3); -static inline void eina_rectangle_rescale_out(const Eina_Rectangle *out, const Eina_Rectangle *in, Eina_Rectangle *res) EINA_ARG_NONNULL(1, 2, 3); +static inline int eina_spans_intersect(int c1, int l1, int c2, + int l2) EINA_WARN_UNUSED_RESULT; +static inline Eina_Bool eina_rectangle_is_empty(const Eina_Rectangle * + r) EINA_ARG_NONNULL(1) + EINA_WARN_UNUSED_RESULT; +static inline void eina_rectangle_coords_from(Eina_Rectangle * r, int x, + int y, int w, + int h) EINA_ARG_NONNULL(1); +static inline Eina_Bool eina_rectangles_intersect(const Eina_Rectangle * + r1, + const Eina_Rectangle * + r2) EINA_ARG_NONNULL(1, + 2) + EINA_WARN_UNUSED_RESULT; +static inline Eina_Bool eina_rectangle_xcoord_inside(const Eina_Rectangle * + r, + int x) +EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT; +static inline Eina_Bool eina_rectangle_ycoord_inside(const Eina_Rectangle * + r, + int y) +EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT; +static inline Eina_Bool eina_rectangle_coords_inside(const Eina_Rectangle * + r, int x, + int y) +EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT; +static inline void eina_rectangle_union(Eina_Rectangle * dst, + const Eina_Rectangle * + src) EINA_ARG_NONNULL(1, 2); +static inline Eina_Bool eina_rectangle_intersection(Eina_Rectangle * dst, + const Eina_Rectangle * + src) +EINA_ARG_NONNULL(1, 2) EINA_WARN_UNUSED_RESULT; +static inline void eina_rectangle_rescale_in(const Eina_Rectangle * out, + const Eina_Rectangle * in, + Eina_Rectangle * + res) EINA_ARG_NONNULL(1, 2, + 3); +static inline void eina_rectangle_rescale_out(const Eina_Rectangle * out, + const Eina_Rectangle * in, + Eina_Rectangle * + res) EINA_ARG_NONNULL(1, 2, + 3); -EAPI Eina_Rectangle_Pool * eina_rectangle_pool_new(int w, int h) EINA_MALLOC EINA_WARN_UNUSED_RESULT; -EAPI Eina_Rectangle_Pool * eina_rectangle_pool_get(Eina_Rectangle *rect) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); -EAPI Eina_Bool eina_rectangle_pool_geometry_get(Eina_Rectangle_Pool *pool, int *w, int *h) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT; -EAPI void * eina_rectangle_pool_data_get(Eina_Rectangle_Pool *pool) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); -EAPI void eina_rectangle_pool_data_set(Eina_Rectangle_Pool *pool, const void *data) EINA_ARG_NONNULL(1); -EAPI void eina_rectangle_pool_free(Eina_Rectangle_Pool *pool) EINA_ARG_NONNULL(1); -EAPI int eina_rectangle_pool_count(Eina_Rectangle_Pool *pool) EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT; -EAPI Eina_Rectangle * eina_rectangle_pool_request(Eina_Rectangle_Pool *pool, int w, int h) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); -EAPI void eina_rectangle_pool_release(Eina_Rectangle *rect) EINA_ARG_NONNULL(1); +EAPI Eina_Rectangle_Pool *eina_rectangle_pool_new(int w, int h) +EINA_MALLOC EINA_WARN_UNUSED_RESULT; +EAPI Eina_Rectangle_Pool *eina_rectangle_pool_get(Eina_Rectangle * rect) +EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); +EAPI Eina_Bool eina_rectangle_pool_geometry_get(Eina_Rectangle_Pool * pool, + int *w, int *h) +EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT; +EAPI void *eina_rectangle_pool_data_get(Eina_Rectangle_Pool * pool) +EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); +EAPI void eina_rectangle_pool_data_set(Eina_Rectangle_Pool * pool, + const void *data) +EINA_ARG_NONNULL(1); +EAPI void eina_rectangle_pool_free(Eina_Rectangle_Pool * + pool) EINA_ARG_NONNULL(1); +EAPI int eina_rectangle_pool_count(Eina_Rectangle_Pool * + pool) EINA_ARG_NONNULL(1) + EINA_WARN_UNUSED_RESULT; +EAPI Eina_Rectangle *eina_rectangle_pool_request(Eina_Rectangle_Pool * + pool, int w, int h) +EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); +EAPI void eina_rectangle_pool_release(Eina_Rectangle * + rect) EINA_ARG_NONNULL(1); /** * @def EINA_RECTANGLE_SET @@ -93,8 +141,9 @@ EAPI void eina_rectangle_pool_release(Eina_Rectangle *rect) EINA_ARG_NONNULL(1); (Rectangle)->w = W; \ (Rectangle)->h = H; -EAPI Eina_Rectangle *eina_rectangle_new(int x, int y, int w, int h) EINA_MALLOC EINA_WARN_UNUSED_RESULT; -EAPI void eina_rectangle_free(Eina_Rectangle *rect) EINA_ARG_NONNULL(1); +EAPI Eina_Rectangle *eina_rectangle_new(int x, int y, int w, int h) +EINA_MALLOC EINA_WARN_UNUSED_RESULT; +EAPI void eina_rectangle_free(Eina_Rectangle * rect) EINA_ARG_NONNULL(1); #include "eina_inline_rectangle.x" diff --git a/tests/suite/ecore/src/include/eina_safety_checks.h b/tests/suite/ecore/src/include/eina_safety_checks.h index 29ebba07d3..43bb86e6b8 100644 --- a/tests/suite/ecore/src/include/eina_safety_checks.h +++ b/tests/suite/ecore/src/include/eina_safety_checks.h @@ -193,7 +193,7 @@ EAPI extern Eina_Error EINA_ERROR_SAFETY_FAILED; #endif -#else /* no safety checks */ +#else /* no safety checks */ #define EINA_SAFETY_ON_NULL_RETURN(exp) \ do { (void)(!(exp)); } while (0) @@ -222,8 +222,8 @@ EAPI extern Eina_Error EINA_ERROR_SAFETY_FAILED; #define EINA_SAFETY_ON_FALSE_GOTO(exp, label) \ do { if (0 && !(exp)) { goto label; } } while (0) -#endif /* safety checks macros */ -#endif /* EINA_SAFETY_CHECKS_H_ */ +#endif /* safety checks macros */ +#endif /* EINA_SAFETY_CHECKS_H_ */ /** * @} diff --git a/tests/suite/ecore/src/include/eina_sched.h b/tests/suite/ecore/src/include/eina_sched.h index 607b9f5b85..89d0d9eaf0 100644 --- a/tests/suite/ecore/src/include/eina_sched.h +++ b/tests/suite/ecore/src/include/eina_sched.h @@ -23,4 +23,4 @@ EAPI void eina_sched_prio_drop(void); -#endif /* EINA_SCHED_H_ */ +#endif /* EINA_SCHED_H_ */ diff --git a/tests/suite/ecore/src/include/eina_str.h b/tests/suite/ecore/src/include/eina_str.h index 1d12615e5a..736fa6a7a4 100644 --- a/tests/suite/ecore/src/include/eina_str.h +++ b/tests/suite/ecore/src/include/eina_str.h @@ -19,26 +19,46 @@ */ /* strlcpy implementation for libc's lacking it */ -EAPI size_t eina_strlcpy(char *dst, const char *src, size_t siz) EINA_ARG_NONNULL(1, 2); -EAPI size_t eina_strlcat(char *dst, const char *src, size_t siz) EINA_ARG_NONNULL(1, 2); - -EAPI Eina_Bool eina_str_has_prefix(const char *str, const char *prefix) EINA_PURE EINA_ARG_NONNULL(1, 2) EINA_WARN_UNUSED_RESULT; -EAPI Eina_Bool eina_str_has_suffix(const char *str, const char *suffix) EINA_PURE EINA_ARG_NONNULL(1, 2) EINA_WARN_UNUSED_RESULT; -EAPI Eina_Bool eina_str_has_extension(const char *str, const char *ext) EINA_PURE EINA_ARG_NONNULL(1, 2) EINA_WARN_UNUSED_RESULT; - -EAPI char ** eina_str_split(const char *string, const char *delimiter, int max_tokens) EINA_ARG_NONNULL(1, 2) EINA_MALLOC EINA_WARN_UNUSED_RESULT; -EAPI char ** eina_str_split_full(const char *string, const char *delimiter, int max_tokens, unsigned int *elements) EINA_ARG_NONNULL(1, 2, 4) EINA_MALLOC EINA_WARN_UNUSED_RESULT; - -EAPI size_t eina_str_join_len(char *dst, size_t size, char sep, const char *a, size_t a_len, const char *b, size_t b_len) EINA_ARG_NONNULL(1, 4, 6); - -EAPI char * eina_str_convert(const char *enc_from, const char *enc_to, const char *text) EINA_WARN_UNUSED_RESULT EINA_MALLOC EINA_ARG_NONNULL(1, 2, 3); - -EAPI char * eina_str_escape(const char *str) EINA_WARN_UNUSED_RESULT EINA_MALLOC EINA_ARG_NONNULL(1); - -EAPI void eina_str_tolower(char **str); -EAPI void eina_str_toupper(char **str); - -static inline size_t eina_str_join(char *dst, size_t size, char sep, const char *a, const char *b) EINA_ARG_NONNULL(1, 4, 5); +EAPI size_t eina_strlcpy(char *dst, const char *src, + size_t siz) EINA_ARG_NONNULL(1, 2); +EAPI size_t eina_strlcat(char *dst, const char *src, + size_t siz) EINA_ARG_NONNULL(1, 2); + +EAPI Eina_Bool eina_str_has_prefix(const char *str, const char *prefix) +EINA_PURE EINA_ARG_NONNULL(1, 2) EINA_WARN_UNUSED_RESULT; +EAPI Eina_Bool eina_str_has_suffix(const char *str, const char *suffix) +EINA_PURE EINA_ARG_NONNULL(1, 2) EINA_WARN_UNUSED_RESULT; +EAPI Eina_Bool eina_str_has_extension(const char *str, const char *ext) +EINA_PURE EINA_ARG_NONNULL(1, 2) EINA_WARN_UNUSED_RESULT; + +EAPI char **eina_str_split(const char *string, const char *delimiter, + int max_tokens) EINA_ARG_NONNULL(1, 2) +EINA_MALLOC EINA_WARN_UNUSED_RESULT; +EAPI char **eina_str_split_full(const char *string, const char *delimiter, + int max_tokens, + unsigned int *elements) EINA_ARG_NONNULL(1, + 2, + 4) +EINA_MALLOC EINA_WARN_UNUSED_RESULT; + +EAPI size_t eina_str_join_len(char *dst, size_t size, char sep, + const char *a, size_t a_len, const char *b, + size_t b_len) EINA_ARG_NONNULL(1, 4, 6); + +EAPI char *eina_str_convert(const char *enc_from, const char *enc_to, + const char *text) +EINA_WARN_UNUSED_RESULT EINA_MALLOC EINA_ARG_NONNULL(1, 2, 3); + +EAPI char *eina_str_escape(const char *str) +EINA_WARN_UNUSED_RESULT EINA_MALLOC EINA_ARG_NONNULL(1); + +EAPI void eina_str_tolower(char **str); +EAPI void eina_str_toupper(char **str); + +static inline size_t eina_str_join(char *dst, size_t size, char sep, + const char *a, + const char *b) EINA_ARG_NONNULL(1, 4, + 5); /** * @def eina_str_join_static(dst, sep, a, b) @@ -58,7 +78,8 @@ static inline size_t eina_str_join(char *dst, size_t size, char sep, const char */ #define eina_str_join_static(dst, sep, a, b) eina_str_join_len(dst, sizeof(dst), sep, a, (sizeof(a) > 0) ? sizeof(a) - 1 : 0, b, (sizeof(b) > 0) ? sizeof(b) - 1 : 0) -static inline size_t eina_strlen_bounded(const char *str, size_t maxlen) EINA_PURE EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); +static inline size_t eina_strlen_bounded(const char *str, size_t maxlen) +EINA_PURE EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); #include "eina_inline_str.x" @@ -70,4 +91,4 @@ static inline size_t eina_strlen_bounded(const char *str, size_t maxlen) EINA_PU * @} */ -#endif /* EINA_STR_H */ +#endif /* EINA_STR_H */ diff --git a/tests/suite/ecore/src/include/eina_strbuf.h b/tests/suite/ecore/src/include/eina_strbuf.h index 4424eb4852..432fe5f179 100644 --- a/tests/suite/ecore/src/include/eina_strbuf.h +++ b/tests/suite/ecore/src/include/eina_strbuf.h @@ -37,7 +37,8 @@ typedef struct _Eina_Strbuf Eina_Strbuf; * @see eina_strbuf_append() * @see eina_strbuf_string_get() */ -EAPI Eina_Strbuf *eina_strbuf_new(void) EINA_MALLOC EINA_WARN_UNUSED_RESULT; +EAPI Eina_Strbuf *eina_strbuf_new(void) +EINA_MALLOC EINA_WARN_UNUSED_RESULT; /** * @brief Free a string buffer. @@ -47,7 +48,7 @@ EAPI Eina_Strbuf *eina_strbuf_new(void) EINA_MALLOC EINA_WARN_UNUSED_RESULT; * This function frees the memory of @p buf. @p buf must have been * created by eina_strbuf_new(). */ -EAPI void eina_strbuf_free(Eina_Strbuf *buf) EINA_ARG_NONNULL(1); +EAPI void eina_strbuf_free(Eina_Strbuf * buf) EINA_ARG_NONNULL(1); /** * @brief Reset a string buffer. @@ -57,7 +58,7 @@ EAPI void eina_strbuf_free(Eina_Strbuf *buf) EINA_ARG_NONNULL(1); * This function reset @p buf: the buffer len is set to 0, and the * string is set to '\\0'. No memory is free'd. */ -EAPI void eina_strbuf_reset(Eina_Strbuf *buf) EINA_ARG_NONNULL(1); +EAPI void eina_strbuf_reset(Eina_Strbuf * buf) EINA_ARG_NONNULL(1); /** * @brief Append a string to a buffer, reallocating as necessary. @@ -75,7 +76,8 @@ EAPI void eina_strbuf_reset(Eina_Strbuf *buf) EINA_ARG_NONNULL(1); * @see eina_strbuf_append() * @see eina_strbuf_append_length() */ -EAPI Eina_Bool eina_strbuf_append(Eina_Strbuf *buf, const char *str) EINA_ARG_NONNULL(1, 2); +EAPI Eina_Bool eina_strbuf_append(Eina_Strbuf * buf, + const char *str) EINA_ARG_NONNULL(1, 2); /** * @brief Append an escaped string to a buffer, reallocating as necessary. @@ -88,7 +90,9 @@ EAPI Eina_Bool eina_strbuf_append(Eina_Strbuf *buf, const char *str) EINA_ARG * str can not be appended, #EINA_FALSE is returned, otherwise, * #EINA_TRUE is returned. */ -EAPI Eina_Bool eina_strbuf_append_escaped(Eina_Strbuf *buf, const char *str) EINA_ARG_NONNULL(1, 2); +EAPI Eina_Bool eina_strbuf_append_escaped(Eina_Strbuf * buf, + const char *str) +EINA_ARG_NONNULL(1, 2); /** * @brief Append a string to a buffer, reallocating as necessary, @@ -111,7 +115,8 @@ EAPI Eina_Bool eina_strbuf_append_escaped(Eina_Strbuf *buf, const char *str) * @see eina_strbuf_append() * @see eina_strbuf_append_length() */ -EAPI Eina_Bool eina_strbuf_append_n(Eina_Strbuf *buf, const char *str, size_t maxlen) EINA_ARG_NONNULL(1, 2); +EAPI Eina_Bool eina_strbuf_append_n(Eina_Strbuf * buf, const char *str, + size_t maxlen) EINA_ARG_NONNULL(1, 2); /** * @brief Append a string of exact length to a buffer, reallocating as necessary. @@ -132,7 +137,10 @@ EAPI Eina_Bool eina_strbuf_append_n(Eina_Strbuf *buf, const char *str, size_t * @see eina_strbuf_append() * @see eina_strbuf_append_n() */ -EAPI Eina_Bool eina_strbuf_append_length(Eina_Strbuf *buf, const char *str, size_t length) EINA_ARG_NONNULL(1, 2); +EAPI Eina_Bool eina_strbuf_append_length(Eina_Strbuf * buf, + const char *str, + size_t length) EINA_ARG_NONNULL(1, + 2); /** * @brief Append a character to a string buffer, reallocating as @@ -145,7 +153,8 @@ EAPI Eina_Bool eina_strbuf_append_length(Eina_Strbuf *buf, const char *str, s * This function inserts @p c to @p buf. If it can not insert it, * #EINA_FALSE is returned, otherwise #EINA_TRUE is returned. */ -EAPI Eina_Bool eina_strbuf_append_char(Eina_Strbuf *buf, char c) EINA_ARG_NONNULL(1); +EAPI Eina_Bool eina_strbuf_append_char(Eina_Strbuf * buf, + char c) EINA_ARG_NONNULL(1); /** * @brief Append a string to a buffer, reallocating as necessary. @@ -156,7 +165,11 @@ EAPI Eina_Bool eina_strbuf_append_char(Eina_Strbuf *buf, char c) EINA_ARG_NON * * @see eina_strbuf_append() */ -EAPI Eina_Bool eina_strbuf_append_printf(Eina_Strbuf *buf, const char *fmt, ...) EINA_ARG_NONNULL(1, 2) EINA_PRINTF(2, 3); +EAPI Eina_Bool eina_strbuf_append_printf(Eina_Strbuf * buf, + const char *fmt, + ...) EINA_ARG_NONNULL(1, + 2) +EINA_PRINTF(2, 3); /** * @brief Append a string to a buffer, reallocating as necessary. @@ -168,7 +181,10 @@ EAPI Eina_Bool eina_strbuf_append_printf(Eina_Strbuf *buf, const char *fmt, . * * @see eina_strbuf_append() */ -EAPI Eina_Bool eina_strbuf_append_vprintf(Eina_Strbuf *buf, const char *fmt, va_list args) EINA_ARG_NONNULL(1, 2); +EAPI Eina_Bool eina_strbuf_append_vprintf(Eina_Strbuf * buf, + const char *fmt, + va_list args) EINA_ARG_NONNULL(1, + 2); /** * @brief Insert a string to a buffer, reallocating as necessary. @@ -184,7 +200,8 @@ EAPI Eina_Bool eina_strbuf_append_vprintf(Eina_Strbuf *buf, const char *fmt, * consider using that variant. If @p buf can't insert it, #EINA_FALSE * is returned, otherwise #EINA_TRUE is returned. */ -EAPI Eina_Bool eina_strbuf_insert(Eina_Strbuf *buf, const char *str, size_t pos) EINA_ARG_NONNULL(1, 2); +EAPI Eina_Bool eina_strbuf_insert(Eina_Strbuf * buf, const char *str, + size_t pos) EINA_ARG_NONNULL(1, 2); /** * @brief Insert an escaped string to a buffer, reallocating as @@ -199,7 +216,10 @@ EAPI Eina_Bool eina_strbuf_insert(Eina_Strbuf *buf, const char *str, size_t p * position @p pos. If @p buf can't insert @p str, #EINA_FALSE is * returned, otherwise #EINA_TRUE is returned. */ -EAPI Eina_Bool eina_strbuf_insert_escaped(Eina_Strbuf *buf, const char *str, size_t pos) EINA_ARG_NONNULL(1, 2); +EAPI Eina_Bool eina_strbuf_insert_escaped(Eina_Strbuf * buf, + const char *str, + size_t pos) EINA_ARG_NONNULL(1, + 2); /** * @brief Insert a string to a buffer, reallocating as necessary. Limited by maxlen. @@ -219,7 +239,9 @@ EAPI Eina_Bool eina_strbuf_insert_escaped(Eina_Strbuf *buf, const char *str, * @p str). If @p str can not be inserted, #EINA_FALSE is returned, * otherwise, #EINA_TRUE is returned. */ -EAPI Eina_Bool eina_strbuf_insert_n(Eina_Strbuf *buf, const char *str, size_t maxlen, size_t pos) EINA_ARG_NONNULL(1, 2); +EAPI Eina_Bool eina_strbuf_insert_n(Eina_Strbuf * buf, const char *str, + size_t maxlen, + size_t pos) EINA_ARG_NONNULL(1, 2); /** * @brief Insert a string of exact length to a buffer, reallocating as necessary. @@ -241,7 +263,10 @@ EAPI Eina_Bool eina_strbuf_insert_n(Eina_Strbuf *buf, const char *str, size_t * @see eina_strbuf_insert() * @see eina_strbuf_insert_n() */ -EAPI Eina_Bool eina_strbuf_insert_length(Eina_Strbuf *buf, const char *str, size_t length, size_t pos) EINA_ARG_NONNULL(1, 2); +EAPI Eina_Bool eina_strbuf_insert_length(Eina_Strbuf * buf, + const char *str, size_t length, + size_t pos) EINA_ARG_NONNULL(1, + 2); /** * @brief Insert a character to a string buffer, reallocating as @@ -256,7 +281,8 @@ EAPI Eina_Bool eina_strbuf_insert_length(Eina_Strbuf *buf, const char *str, s * can't append it, #EINA_FALSE is returned, otherwise #EINA_TRUE is * returned. */ -EAPI Eina_Bool eina_strbuf_insert_char(Eina_Strbuf *buf, char c, size_t pos) EINA_ARG_NONNULL(1); +EAPI Eina_Bool eina_strbuf_insert_char(Eina_Strbuf * buf, char c, + size_t pos) EINA_ARG_NONNULL(1); /** * @brief Insert a string to a buffer, reallocating as necessary. @@ -266,7 +292,11 @@ EAPI Eina_Bool eina_strbuf_insert_char(Eina_Strbuf *buf, char c, size_t pos) * @param pos The position to insert the string. * @return #EINA_TRUE on success, #EINA_FALSE on failure. */ -EAPI Eina_Bool eina_strbuf_insert_printf(Eina_Strbuf *buf, const char *fmt, size_t pos, ...) EINA_ARG_NONNULL(1, 2) EINA_PRINTF(2, 4); +EAPI Eina_Bool eina_strbuf_insert_printf(Eina_Strbuf * buf, + const char *fmt, size_t pos, + ...) EINA_ARG_NONNULL(1, + 2) +EINA_PRINTF(2, 4); /** * @brief Insert a string to a buffer, reallocating as necessary. @@ -277,7 +307,10 @@ EAPI Eina_Bool eina_strbuf_insert_printf(Eina_Strbuf *buf, const char *fmt, s * @param args The variable arguments. * @return #EINA_TRUE on success, #EINA_FALSE on failure. */ -EAPI Eina_Bool eina_strbuf_insert_vprintf(Eina_Strbuf *buf, const char *fmt, size_t pos, va_list args) EINA_ARG_NONNULL(1, 2); +EAPI Eina_Bool eina_strbuf_insert_vprintf(Eina_Strbuf * buf, + const char *fmt, size_t pos, + va_list args) EINA_ARG_NONNULL(1, + 2); /** * @def eina_strbuf_prepend(buf, str) @@ -395,7 +428,8 @@ EAPI Eina_Bool eina_strbuf_insert_vprintf(Eina_Strbuf *buf, const char *fmt, * in bytes. It returns #EINA_FALSE on failure, #EINA_TRUE otherwise. */ -EAPI Eina_Bool eina_strbuf_remove(Eina_Strbuf *buf, size_t start, size_t end) EINA_ARG_NONNULL(1); +EAPI Eina_Bool eina_strbuf_remove(Eina_Strbuf * buf, size_t start, + size_t end) EINA_ARG_NONNULL(1); /** * @brief Retrieve a pointer to the contents of a string buffer @@ -410,7 +444,9 @@ EAPI Eina_Bool eina_strbuf_remove(Eina_Strbuf *buf, size_t start, size_t end) EI * * @see eina_strbuf_string_steal() */ -EAPI const char *eina_strbuf_string_get(const Eina_Strbuf *buf) EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT; +EAPI const char *eina_strbuf_string_get(const Eina_Strbuf * + buf) EINA_ARG_NONNULL(1) + EINA_WARN_UNUSED_RESULT; /** * @brief Steal the contents of a string buffer. @@ -425,7 +461,8 @@ EAPI const char *eina_strbuf_string_get(const Eina_Strbuf *buf) EINA_ARG_NONNULL * * @see eina_strbuf_string_get() */ -EAPI char *eina_strbuf_string_steal(Eina_Strbuf *buf) EINA_MALLOC EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); +EAPI char *eina_strbuf_string_steal(Eina_Strbuf * buf) +EINA_MALLOC EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * @brief Free the contents of a string buffer but not the buffer. @@ -435,7 +472,7 @@ EAPI char *eina_strbuf_string_steal(Eina_Strbuf *buf) EINA_MALLOC EINA_WARN_UNUS * This function frees the string contained in @p buf without freeing * @p buf. */ -EAPI void eina_strbuf_string_free(Eina_Strbuf *buf) EINA_ARG_NONNULL(1); +EAPI void eina_strbuf_string_free(Eina_Strbuf * buf) EINA_ARG_NONNULL(1); /** * @brief Retrieve the length of the string buffer content. @@ -445,9 +482,14 @@ EAPI void eina_strbuf_string_free(Eina_Strbuf *buf) EINA_ARG_NONNULL(1); * * This function returns the length of @p buf. */ -EAPI size_t eina_strbuf_length_get(const Eina_Strbuf *buf) EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT; +EAPI size_t eina_strbuf_length_get(const Eina_Strbuf * + buf) EINA_ARG_NONNULL(1) + EINA_WARN_UNUSED_RESULT; -EAPI Eina_Bool eina_strbuf_replace(Eina_Strbuf *buf, const char *str, const char *with, unsigned int n) EINA_ARG_NONNULL(1, 2, 3); +EAPI Eina_Bool eina_strbuf_replace(Eina_Strbuf * buf, const char *str, + const char *with, + unsigned int n) EINA_ARG_NONNULL(1, 2, + 3); /** * @def eina_strbuf_replace_first(buf, str, with) @@ -464,7 +506,9 @@ EAPI Eina_Bool eina_strbuf_replace(Eina_Strbuf *buf, const char *str, const char */ #define eina_strbuf_replace_first(buf, str, with) eina_strbuf_replace(buf, str, with, 1) -EAPI int eina_strbuf_replace_all(Eina_Strbuf *buf, const char *str, const char *with) EINA_ARG_NONNULL(1, 2, 3); +EAPI int eina_strbuf_replace_all(Eina_Strbuf * buf, const char *str, + const char *with) EINA_ARG_NONNULL(1, 2, + 3); /** * @} @@ -474,4 +518,4 @@ EAPI int eina_strbuf_replace_all(Eina_Strbuf *buf, const char *str, const char * * @} */ -#endif /* EINA_STRBUF_H */ +#endif /* EINA_STRBUF_H */ diff --git a/tests/suite/ecore/src/include/eina_stringshare.h b/tests/suite/ecore/src/include/eina_stringshare.h index 4df5b40ab9..cc9f46cd6a 100644 --- a/tests/suite/ecore/src/include/eina_stringshare.h +++ b/tests/suite/ecore/src/include/eina_stringshare.h @@ -67,18 +67,32 @@ * @{ */ -EAPI const char * eina_stringshare_add_length(const char *str, unsigned int slen) EINA_WARN_UNUSED_RESULT; -EAPI const char * eina_stringshare_add(const char *str) EINA_WARN_UNUSED_RESULT; -EAPI const char * eina_stringshare_printf(const char *fmt, ...) EINA_WARN_UNUSED_RESULT EINA_PRINTF(1, 2); -EAPI const char * eina_stringshare_vprintf(const char *fmt, va_list args) EINA_WARN_UNUSED_RESULT; -EAPI const char * eina_stringshare_nprintf(unsigned int len, const char *fmt, ...) EINA_WARN_UNUSED_RESULT EINA_PRINTF(2, 3); -EAPI const char * eina_stringshare_ref(const char *str); -EAPI void eina_stringshare_del(const char *str); -EAPI int eina_stringshare_strlen(const char *str) EINA_PURE EINA_WARN_UNUSED_RESULT; -EAPI void eina_stringshare_dump(void); +EAPI const char *eina_stringshare_add_length(const char *str, + unsigned int slen) + EINA_WARN_UNUSED_RESULT; +EAPI const char *eina_stringshare_add(const char *str) + EINA_WARN_UNUSED_RESULT; +EAPI const char *eina_stringshare_printf(const char *fmt, ...) +EINA_WARN_UNUSED_RESULT EINA_PRINTF(1, 2); +EAPI const char *eina_stringshare_vprintf(const char *fmt, + va_list args) + EINA_WARN_UNUSED_RESULT; +EAPI const char *eina_stringshare_nprintf(unsigned int len, + const char *fmt, ...) +EINA_WARN_UNUSED_RESULT EINA_PRINTF(2, 3); +EAPI const char *eina_stringshare_ref(const char *str); +EAPI void eina_stringshare_del(const char *str); +EAPI int eina_stringshare_strlen(const char *str) +EINA_PURE EINA_WARN_UNUSED_RESULT; +EAPI void eina_stringshare_dump(void); -static inline Eina_Bool eina_stringshare_replace(const char **p_str, const char *news) EINA_ARG_NONNULL(1); -static inline Eina_Bool eina_stringshare_replace_length(const char **p_str, const char *news, unsigned int slen) EINA_ARG_NONNULL(1); +static inline Eina_Bool eina_stringshare_replace(const char **p_str, + const char *news) +EINA_ARG_NONNULL(1); +static inline Eina_Bool eina_stringshare_replace_length(const char **p_str, + const char *news, + unsigned int slen) +EINA_ARG_NONNULL(1); #include "eina_inline_stringshare.x" @@ -90,4 +104,4 @@ static inline Eina_Bool eina_stringshare_replace_length(const char **p_str, cons * @} */ -#endif /* EINA_STRINGSHARE_H_ */ +#endif /* EINA_STRINGSHARE_H_ */ diff --git a/tests/suite/ecore/src/include/eina_tiler.h b/tests/suite/ecore/src/include/eina_tiler.h index 19762a5cf8..b671b11d78 100644 --- a/tests/suite/ecore/src/include/eina_tiler.h +++ b/tests/suite/ecore/src/include/eina_tiler.h @@ -51,26 +51,40 @@ typedef struct Eina_Tile_Grid_Info Eina_Tile_Grid_Info; * @struct Eina_Tile_Grid_Info * Grid type of a tiler. */ -struct Eina_Tile_Grid_Info -{ - unsigned long col; /**< column of the tiler grid */ - unsigned long row; /**< row of the tiler grid*/ - Eina_Rectangle rect; /**< rectangle of the tiler grid*/ - Eina_Bool full; /**< whether the grid is full or not */ +struct Eina_Tile_Grid_Info { + unsigned long col; + /**< column of the tiler grid */ + unsigned long row; + /**< row of the tiler grid*/ + Eina_Rectangle rect; + /**< rectangle of the tiler grid*/ + Eina_Bool full; + /**< whether the grid is full or not */ }; typedef struct _Eina_Tile_Grid_Slicer Eina_Tile_Grid_Slicer; -EAPI Eina_Tiler * eina_tiler_new(int w, int h); -EAPI void eina_tiler_free(Eina_Tiler *t); -EAPI void eina_tiler_tile_size_set(Eina_Tiler *t, int w, int h); -EAPI Eina_Bool eina_tiler_rect_add(Eina_Tiler *t, const Eina_Rectangle *r); -EAPI void eina_tiler_rect_del(Eina_Tiler *t, const Eina_Rectangle *r); -EAPI void eina_tiler_clear(Eina_Tiler *t); -EAPI Eina_Iterator *eina_tiler_iterator_new(const Eina_Tiler *t); -EAPI Eina_Iterator *eina_tile_grid_slicer_iterator_new(int x, int y, int w, int h, int tile_w, int tile_h); -static inline Eina_Bool eina_tile_grid_slicer_next(Eina_Tile_Grid_Slicer *slc, const Eina_Tile_Grid_Info **rect); -static inline Eina_Bool eina_tile_grid_slicer_setup(Eina_Tile_Grid_Slicer *slc, int x, int y, int w, int h, int tile_w, int tile_h); +EAPI Eina_Tiler *eina_tiler_new(int w, int h); +EAPI void eina_tiler_free(Eina_Tiler * t); +EAPI void eina_tiler_tile_size_set(Eina_Tiler * t, int w, int h); +EAPI Eina_Bool eina_tiler_rect_add(Eina_Tiler * t, + const Eina_Rectangle * r); +EAPI void eina_tiler_rect_del(Eina_Tiler * t, const Eina_Rectangle * r); +EAPI void eina_tiler_clear(Eina_Tiler * t); +EAPI Eina_Iterator *eina_tiler_iterator_new(const Eina_Tiler * t); +EAPI Eina_Iterator *eina_tile_grid_slicer_iterator_new(int x, int y, int w, + int h, int tile_w, + int tile_h); +static inline Eina_Bool eina_tile_grid_slicer_next(Eina_Tile_Grid_Slicer * + slc, + const + Eina_Tile_Grid_Info ** + rect); +static inline Eina_Bool eina_tile_grid_slicer_setup(Eina_Tile_Grid_Slicer * + slc, int x, int y, + int w, int h, + int tile_w, + int tile_h); #include "eina_inline_tiler.x" @@ -83,4 +97,4 @@ static inline Eina_Bool eina_tile_grid_slicer_setup(Eina_Tile_Grid_Slicer *slc, * @} */ -#endif /* EINA_TILER_H_ */ +#endif /* EINA_TILER_H_ */ diff --git a/tests/suite/ecore/src/include/eina_trash.h b/tests/suite/ecore/src/include/eina_trash.h index 0d165f1931..c7088e4f8a 100644 --- a/tests/suite/ecore/src/include/eina_trash.h +++ b/tests/suite/ecore/src/include/eina_trash.h @@ -47,14 +47,18 @@ typedef struct _Eina_Trash Eina_Trash; * @struct _Eina_Trash * Type for a generic container of unused allocated pointer. */ -struct _Eina_Trash -{ - Eina_Trash *next; /**< next item in trash. */ +struct _Eina_Trash { + Eina_Trash *next; + /**< next item in trash. */ }; -static inline void eina_trash_init(Eina_Trash **trash) EINA_ARG_NONNULL(1); -static inline void eina_trash_push(Eina_Trash **trash, void *data) EINA_ARG_NONNULL(1); -static inline void *eina_trash_pop(Eina_Trash **trash) EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT; +static inline void eina_trash_init(Eina_Trash ** + trash) EINA_ARG_NONNULL(1); +static inline void eina_trash_push(Eina_Trash ** trash, + void *data) EINA_ARG_NONNULL(1); +static inline void *eina_trash_pop(Eina_Trash ** + trash) EINA_ARG_NONNULL(1) + EINA_WARN_UNUSED_RESULT; /** * @def EINA_TRASH_CLEAN @@ -97,4 +101,4 @@ static inline void *eina_trash_pop(Eina_Trash **trash) EINA_ARG_NONNULL(1) EINA_ * @} */ -#endif /* EINA_TRASH_H_ */ +#endif /* EINA_TRASH_H_ */ diff --git a/tests/suite/ecore/src/include/eina_types.h b/tests/suite/ecore/src/include/eina_types.h index c94983f618..bb20a23138 100644 --- a/tests/suite/ecore/src/include/eina_types.h +++ b/tests/suite/ecore/src/include/eina_types.h @@ -32,186 +32,186 @@ */ #ifdef EAPI -# undef EAPI +#undef EAPI #endif #ifdef _WIN32 -# ifdef EFL_EINA_BUILD -# ifdef DLL_EXPORT -# define EAPI __declspec(dllexport) -# else -# define EAPI -# endif /* ! DLL_EXPORT */ -# else -# define EAPI __declspec(dllimport) -# endif /* ! EFL_EINA_BUILD */ +#ifdef EFL_EINA_BUILD +#ifdef DLL_EXPORT +#define EAPI __declspec(dllexport) #else -# ifdef __GNUC__ -# if __GNUC__ >= 4 -# define EAPI __attribute__ ((visibility("default"))) -# else -# define EAPI -# endif -# else -# define EAPI -# endif +#define EAPI +#endif /* ! DLL_EXPORT */ +#else +#define EAPI __declspec(dllimport) +#endif /* ! EFL_EINA_BUILD */ +#else +#ifdef __GNUC__ +#if __GNUC__ >= 4 +#define EAPI __attribute__ ((visibility("default"))) +#else +#define EAPI +#endif +#else +#define EAPI +#endif #endif #include "eina_config.h" #ifdef EINA_WARN_UNUSED_RESULT -# undef EINA_WARN_UNUSED_RESULT +#undef EINA_WARN_UNUSED_RESULT #endif #ifdef EINA_ARG_NONNULL -# undef EINA_ARG_NONNULL +#undef EINA_ARG_NONNULL #endif #ifdef EINA_DEPRECATED -# undef EINA_DEPRECATED +#undef EINA_DEPRECATED #endif #ifdef EINA_MALLOC -# undef EINA_MALLOC +#undef EINA_MALLOC #endif #ifdef EINA_PURE -# undef EINA_PURE +#undef EINA_PURE #endif #ifdef EINA_PRINTF -# undef EINA_PRINTF +#undef EINA_PRINTF #endif #ifdef EINA_SCANF -# undef EINA_SCANF +#undef EINA_SCANF #endif #ifdef EINA_FORMAT -# undef EINA_FORMAT +#undef EINA_FORMAT #endif #ifdef EINA_CONST -# undef EINA_CONST +#undef EINA_CONST #endif #ifdef EINA_NOINSTRUMENT -# undef EINA_NOINSTRUMENT +#undef EINA_NOINSTRUMENT #endif #ifdef EINA_UNLIKELY -# undef EINA_UNLIKELY +#undef EINA_UNLIKELY #endif #ifdef EINA_LIKELY -# undef EINA_LIKELY +#undef EINA_LIKELY #endif #ifdef __GNUC__ -# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) -# define EINA_WARN_UNUSED_RESULT __attribute__ ((warn_unused_result)) -# else -# define EINA_WARN_UNUSED_RESULT -# endif - -# if (!defined(EINA_SAFETY_CHECKS)) && (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)) -# define EINA_ARG_NONNULL(idx, ...) __attribute__ ((nonnull(idx, ## __VA_ARGS__))) -# else -# define EINA_ARG_NONNULL(idx, ...) -# endif - -# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1) -# define EINA_DEPRECATED __attribute__ ((__deprecated__)) -# else -# define EINA_DEPRECATED -# endif - -# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) -# define EINA_MALLOC __attribute__ ((malloc)) -# define EINA_PURE __attribute__ ((pure)) -# else -# define EINA_MALLOC -# define EINA_PURE -# endif - -# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4) -# define EINA_PRINTF(fmt, arg) __attribute__((format (printf, fmt, arg))) -# define EINA_SCANF(fmt, arg) __attribute__((format (scanf, fmt, arg))) -# define EINA_FORMAT(fmt) __attribute__((format_arg(fmt))) -# define EINA_CONST __attribute__((const)) -# define EINA_NOINSTRUMENT __attribute__((no_instrument_function)) -# define EINA_UNLIKELY(exp) __builtin_expect((exp), 0) -# define EINA_LIKELY(exp) __builtin_expect((exp), 1) -# else -# define EINA_PRINTF(fmt, arg) -# define EINA_SCANF(fmt, arg) -# define EINA_FORMAT(fmt) -# define EINA_CONST -# define EINA_NOINSTRUMENT -# define EINA_UNLIKELY(exp) exp -# define EINA_LIKELY(exp) exp -# endif +#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) +#define EINA_WARN_UNUSED_RESULT __attribute__ ((warn_unused_result)) +#else +#define EINA_WARN_UNUSED_RESULT +#endif + +#if (!defined(EINA_SAFETY_CHECKS)) && (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)) +#define EINA_ARG_NONNULL(idx, ...) __attribute__ ((nonnull(idx, ## __VA_ARGS__))) +#else +#define EINA_ARG_NONNULL(idx, ...) +#endif + +#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1) +#define EINA_DEPRECATED __attribute__ ((__deprecated__)) +#else +#define EINA_DEPRECATED +#endif + +#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) +#define EINA_MALLOC __attribute__ ((malloc)) +#define EINA_PURE __attribute__ ((pure)) +#else +#define EINA_MALLOC +#define EINA_PURE +#endif + +#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4) +#define EINA_PRINTF(fmt, arg) __attribute__((format (printf, fmt, arg))) +#define EINA_SCANF(fmt, arg) __attribute__((format (scanf, fmt, arg))) +#define EINA_FORMAT(fmt) __attribute__((format_arg(fmt))) +#define EINA_CONST __attribute__((const)) +#define EINA_NOINSTRUMENT __attribute__((no_instrument_function)) +#define EINA_UNLIKELY(exp) __builtin_expect((exp), 0) +#define EINA_LIKELY(exp) __builtin_expect((exp), 1) +#else +#define EINA_PRINTF(fmt, arg) +#define EINA_SCANF(fmt, arg) +#define EINA_FORMAT(fmt) +#define EINA_CONST +#define EINA_NOINSTRUMENT +#define EINA_UNLIKELY(exp) exp +#define EINA_LIKELY(exp) exp +#endif #elif defined(_WIN32) -# define EINA_WARN_UNUSED_RESULT -# define EINA_ARG_NONNULL(idx, ...) -# if defined(_MSC_VER) && _MSC_VER >= 1300 -# define EINA_DEPRECATED __declspec(deprecated) -# else -# define EINA_DEPRECATED -# endif -# define EINA_MALLOC -# define EINA_PURE -# define EINA_PRINTF(fmt, arg) -# define EINA_SCANF(fmt, arg) -# define EINA_FORMAT(fmt) -# define EINA_CONST -# define EINA_NOINSTRUMENT -# define EINA_UNLIKELY(exp) exp -# define EINA_LIKELY(exp) exp +#define EINA_WARN_UNUSED_RESULT +#define EINA_ARG_NONNULL(idx, ...) +#if defined(_MSC_VER) && _MSC_VER >= 1300 +#define EINA_DEPRECATED __declspec(deprecated) +#else +#define EINA_DEPRECATED +#endif +#define EINA_MALLOC +#define EINA_PURE +#define EINA_PRINTF(fmt, arg) +#define EINA_SCANF(fmt, arg) +#define EINA_FORMAT(fmt) +#define EINA_CONST +#define EINA_NOINSTRUMENT +#define EINA_UNLIKELY(exp) exp +#define EINA_LIKELY(exp) exp #elif defined(__SUNPRO_C) -# define EINA_WARN_UNUSED_RESULT -# define EINA_ARG_NONNULL(...) -# define EINA_DEPRECATED -# if __SUNPRO_C >= 0x590 -# define EINA_MALLOC __attribute__ ((malloc)) -# define EINA_PURE __attribute__ ((pure)) -# else -# define EINA_MALLOC -# define EINA_PURE -# endif -# define EINA_PRINTF(fmt, arg) -# define EINA_SCANF(fmt, arg) -# define EINA_FORMAT(fmt) -# if __SUNPRO_C >= 0x590 -# define EINA_CONST __attribute__ ((const)) -# else -# define EINA_CONST -# endif -# define EINA_NOINSTRUMENT -# define EINA_UNLIKELY(exp) exp -# define EINA_LIKELY(exp) exp - -#else /* ! __GNUC__ && ! _WIN32 && ! __SUNPRO_C */ +#define EINA_WARN_UNUSED_RESULT +#define EINA_ARG_NONNULL(...) +#define EINA_DEPRECATED +#if __SUNPRO_C >= 0x590 +#define EINA_MALLOC __attribute__ ((malloc)) +#define EINA_PURE __attribute__ ((pure)) +#else +#define EINA_MALLOC +#define EINA_PURE +#endif +#define EINA_PRINTF(fmt, arg) +#define EINA_SCANF(fmt, arg) +#define EINA_FORMAT(fmt) +#if __SUNPRO_C >= 0x590 +#define EINA_CONST __attribute__ ((const)) +#else +#define EINA_CONST +#endif +#define EINA_NOINSTRUMENT +#define EINA_UNLIKELY(exp) exp +#define EINA_LIKELY(exp) exp + +#else /* ! __GNUC__ && ! _WIN32 && ! __SUNPRO_C */ /** * @def EINA_WARN_UNUSED_RESULT * Used to warn when the returned value of the function is not used. */ -# define EINA_WARN_UNUSED_RESULT +#define EINA_WARN_UNUSED_RESULT /** * @def EINA_ARG_NONNULL * Used to warn when the specified arguments of the function are @c NULL. */ -# define EINA_ARG_NONNULL(idx, ...) +#define EINA_ARG_NONNULL(idx, ...) /** * @def EINA_DEPRECATED * Used to warn when the function is considered as deprecated. */ -# define EINA_DEPRECATED -# define EINA_MALLOC -# define EINA_PURE -# define EINA_PRINTF(fmt, arg) -# define EINA_SCANF(fmt, arg) -# define EINA_FORMAT(fmt) -# define EINA_CONST -# define EINA_NOINSTRUMENT -# define EINA_UNLIKELY(exp) exp -# define EINA_LIKELY(exp) exp -#endif /* ! __GNUC__ && ! _WIN32 && ! __SUNPRO_C */ +#define EINA_DEPRECATED +#define EINA_MALLOC +#define EINA_PURE +#define EINA_PRINTF(fmt, arg) +#define EINA_SCANF(fmt, arg) +#define EINA_FORMAT(fmt) +#define EINA_CONST +#define EINA_NOINSTRUMENT +#define EINA_UNLIKELY(exp) exp +#define EINA_LIKELY(exp) exp +#endif /* ! __GNUC__ && ! _WIN32 && ! __SUNPRO_C */ /** @@ -245,7 +245,7 @@ EAPI extern const unsigned int eina_prime_table[]; * if it is 'greater', 1 must be returned, and if they are equal, 0 * must be returned. */ -typedef int (*Eina_Compare_Cb)(const void *data1, const void *data2); +typedef int (*Eina_Compare_Cb) (const void *data1, const void *data2); /** * @def EINA_COMPARE_CB @@ -253,7 +253,8 @@ typedef int (*Eina_Compare_Cb)(const void *data1, const void *data2); */ #define EINA_COMPARE_CB(function) ((Eina_Compare_Cb)function) -typedef Eina_Bool (*Eina_Each_Cb)(const void *container, void *data, void *fdata); +typedef Eina_Bool(*Eina_Each_Cb) (const void *container, void *data, + void *fdata); /** * @def EINA_EACH_CB @@ -265,7 +266,7 @@ typedef Eina_Bool (*Eina_Each_Cb)(const void *container, void *data, void *fdata * @typedef Eina_Free_Cb * A callback type used to free data when iterating over a container. */ -typedef void (*Eina_Free_Cb)(void *data); +typedef void (*Eina_Free_Cb) (void *data); /** * @def EINA_FREE_CB @@ -281,4 +282,4 @@ typedef void (*Eina_Free_Cb)(void *data); * @} */ -#endif /* EINA_TYPES_H_ */ +#endif /* EINA_TYPES_H_ */ diff --git a/tests/suite/ecore/src/include/eina_unicode.h b/tests/suite/ecore/src/include/eina_unicode.h index 06a2af1752..4cd362fcb5 100644 --- a/tests/suite/ecore/src/include/eina_unicode.h +++ b/tests/suite/ecore/src/include/eina_unicode.h @@ -26,13 +26,13 @@ * A type that holds Unicode codepoints. */ #if EINA_SIZEOF_WCHAR_T >= 4 -# include <wchar.h> +#include <wchar.h> typedef wchar_t Eina_Unicode; #elif defined(EINA_HAVE_INTTYPES_H) -# include <inttypes.h> +#include <inttypes.h> typedef uint32_t Eina_Unicode; #elif defined(EINA_HAVE_STDINT_H) -# include <stdint.h> +#include <stdint.h> typedef uint32_t Eina_Unicode; #else /* Hope that int is big enough */ @@ -41,21 +41,36 @@ typedef unsigned int Eina_Unicode; EAPI extern const Eina_Unicode *EINA_UNICODE_EMPTY_STRING; -EAPI size_t eina_unicode_strlen(const Eina_Unicode *ustr) EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT EINA_PURE; -EAPI size_t eina_unicode_strnlen(const Eina_Unicode *ustr, int n) EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT EINA_PURE; +EAPI size_t eina_unicode_strlen(const Eina_Unicode * + ustr) EINA_ARG_NONNULL(1) +EINA_WARN_UNUSED_RESULT EINA_PURE; +EAPI size_t eina_unicode_strnlen(const Eina_Unicode * ustr, + int n) EINA_ARG_NONNULL(1) +EINA_WARN_UNUSED_RESULT EINA_PURE; -EAPI Eina_Unicode *eina_unicode_strdup(const Eina_Unicode *text) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC; +EAPI Eina_Unicode *eina_unicode_strdup(const Eina_Unicode * text) +EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC; -EAPI int eina_unicode_strcmp(const Eina_Unicode *a, const Eina_Unicode *b) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2) EINA_PURE; +EAPI int eina_unicode_strcmp(const Eina_Unicode * a, + const Eina_Unicode * b) +EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2) EINA_PURE; -EAPI Eina_Unicode *eina_unicode_strcpy(Eina_Unicode *dest, const Eina_Unicode *source) EINA_ARG_NONNULL(1, 2); +EAPI Eina_Unicode *eina_unicode_strcpy(Eina_Unicode * dest, + const Eina_Unicode * + source) EINA_ARG_NONNULL(1, 2); -EAPI Eina_Unicode *eina_unicode_strstr(const Eina_Unicode *haystack, const Eina_Unicode *needle) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2) EINA_PURE; +EAPI Eina_Unicode *eina_unicode_strstr(const Eina_Unicode * haystack, + const Eina_Unicode * needle) +EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2) EINA_PURE; -EAPI Eina_Unicode *eina_unicode_strncpy(Eina_Unicode *dest, const Eina_Unicode *source, size_t n) EINA_ARG_NONNULL(1, 2); +EAPI Eina_Unicode *eina_unicode_strncpy(Eina_Unicode * dest, + const Eina_Unicode * source, + size_t n) EINA_ARG_NONNULL(1, 2); -EAPI Eina_Unicode *eina_unicode_escape(const Eina_Unicode *str) EINA_ARG_NONNULL(1) EINA_MALLOC EINA_WARN_UNUSED_RESULT; +EAPI Eina_Unicode *eina_unicode_escape(const Eina_Unicode * + str) EINA_ARG_NONNULL(1) +EINA_MALLOC EINA_WARN_UNUSED_RESULT; /** * @} diff --git a/tests/suite/ecore/src/include/eina_ustrbuf.h b/tests/suite/ecore/src/include/eina_ustrbuf.h index e042b5df9d..5a24ccda67 100644 --- a/tests/suite/ecore/src/include/eina_ustrbuf.h +++ b/tests/suite/ecore/src/include/eina_ustrbuf.h @@ -37,7 +37,8 @@ typedef struct _Eina_Strbuf Eina_UStrbuf; * @see eina_ustrbuf_append() * @see eina_ustrbuf_string_get() */ -EAPI Eina_UStrbuf *eina_ustrbuf_new(void) EINA_MALLOC EINA_WARN_UNUSED_RESULT; +EAPI Eina_UStrbuf *eina_ustrbuf_new(void) +EINA_MALLOC EINA_WARN_UNUSED_RESULT; /** * @brief Free a string buffer. @@ -47,7 +48,7 @@ EAPI Eina_UStrbuf *eina_ustrbuf_new(void) EINA_MALLOC EINA_WARN_UNUSED_RESULT; * This function frees the memory of @p buf. @p buf must have been * created by eina_ustrbuf_new(). */ -EAPI void eina_ustrbuf_free(Eina_UStrbuf *buf) EINA_ARG_NONNULL(1); +EAPI void eina_ustrbuf_free(Eina_UStrbuf * buf) EINA_ARG_NONNULL(1); /** * @brief Reset a string buffer. @@ -57,7 +58,7 @@ EAPI void eina_ustrbuf_free(Eina_UStrbuf *buf) EINA_ARG_NONNULL(1); * This function reset @p buf: the buffer len is set to 0, and the * string is set to '\\0'. No memory is free'd. */ -EAPI void eina_ustrbuf_reset(Eina_UStrbuf *buf) EINA_ARG_NONNULL(1); +EAPI void eina_ustrbuf_reset(Eina_UStrbuf * buf) EINA_ARG_NONNULL(1); /** * @brief Append a string to a buffer, reallocating as necessary. @@ -75,7 +76,9 @@ EAPI void eina_ustrbuf_reset(Eina_UStrbuf *buf) EINA_ARG_NONNULL(1); * @see eina_ustrbuf_append() * @see eina_ustrbuf_append_length() */ -EAPI Eina_Bool eina_ustrbuf_append(Eina_UStrbuf *buf, const Eina_Unicode *str) EINA_ARG_NONNULL(1, 2); +EAPI Eina_Bool eina_ustrbuf_append(Eina_UStrbuf * buf, + const Eina_Unicode * + str) EINA_ARG_NONNULL(1, 2); /** * @brief Append an escaped string to a buffer, reallocating as necessary. @@ -88,7 +91,9 @@ EAPI Eina_Bool eina_ustrbuf_append(Eina_UStrbuf *buf, const Eina_Unicode *st * str can not be appended, #EINA_FALSE is returned, otherwise, * #EINA_TRUE is returned. */ -EAPI Eina_Bool eina_ustrbuf_append_escaped(Eina_UStrbuf *buf, const Eina_Unicode *str) EINA_ARG_NONNULL(1, 2); +EAPI Eina_Bool eina_ustrbuf_append_escaped(Eina_UStrbuf * buf, + const Eina_Unicode * + str) EINA_ARG_NONNULL(1, 2); /** * @brief Append a string to a buffer, reallocating as necessary, @@ -111,7 +116,9 @@ EAPI Eina_Bool eina_ustrbuf_append_escaped(Eina_UStrbuf *buf, const Eina_Uni * @see eina_ustrbuf_append() * @see eina_ustrbuf_append_length() */ -EAPI Eina_Bool eina_ustrbuf_append_n(Eina_UStrbuf *buf, const Eina_Unicode *str, size_t maxlen) EINA_ARG_NONNULL(1, 2); +EAPI Eina_Bool eina_ustrbuf_append_n(Eina_UStrbuf * buf, + const Eina_Unicode * str, + size_t maxlen) EINA_ARG_NONNULL(1, 2); /** * @brief Append a string of exact length to a buffer, reallocating as necessary. @@ -132,7 +139,10 @@ EAPI Eina_Bool eina_ustrbuf_append_n(Eina_UStrbuf *buf, const Eina_Unicode * * @see eina_ustrbuf_append() * @see eina_ustrbuf_append_n() */ -EAPI Eina_Bool eina_ustrbuf_append_length(Eina_UStrbuf *buf, const Eina_Unicode *str, size_t length) EINA_ARG_NONNULL(1, 2); +EAPI Eina_Bool eina_ustrbuf_append_length(Eina_UStrbuf * buf, + const Eina_Unicode * str, + size_t length) +EINA_ARG_NONNULL(1, 2); /** * @brief Append a character to a string buffer, reallocating as @@ -145,7 +155,9 @@ EAPI Eina_Bool eina_ustrbuf_append_length(Eina_UStrbuf *buf, const Eina_Unic * This function inserts @p c to @p buf. If it can not insert it, * #EINA_FALSE is returned, otherwise #EINA_TRUE is returned. */ -EAPI Eina_Bool eina_ustrbuf_append_char(Eina_UStrbuf *buf, Eina_Unicode c) EINA_ARG_NONNULL(1); +EAPI Eina_Bool eina_ustrbuf_append_char(Eina_UStrbuf * buf, + Eina_Unicode c) +EINA_ARG_NONNULL(1); /** * @brief Insert a string to a buffer, reallocating as necessary. @@ -161,7 +173,9 @@ EAPI Eina_Bool eina_ustrbuf_append_char(Eina_UStrbuf *buf, Eina_Unicode c) E * consider using that variant. If @p buf can't insert it, #EINA_FALSE * is returned, otherwise #EINA_TRUE is returned. */ -EAPI Eina_Bool eina_ustrbuf_insert(Eina_UStrbuf *buf, const Eina_Unicode *str, size_t pos) EINA_ARG_NONNULL(1, 2); +EAPI Eina_Bool eina_ustrbuf_insert(Eina_UStrbuf * buf, + const Eina_Unicode * str, + size_t pos) EINA_ARG_NONNULL(1, 2); /** * @brief Insert an escaped string to a buffer, reallocating as @@ -176,7 +190,10 @@ EAPI Eina_Bool eina_ustrbuf_insert(Eina_UStrbuf *buf, const Eina_Unicode *st * position @p pos. If @p buf can't insert @p str, #EINA_FALSE is * returned, otherwise #EINA_TRUE is returned. */ -EAPI Eina_Bool eina_ustrbuf_insert_escaped(Eina_UStrbuf *buf, const Eina_Unicode *str, size_t pos) EINA_ARG_NONNULL(1, 2); +EAPI Eina_Bool eina_ustrbuf_insert_escaped(Eina_UStrbuf * buf, + const Eina_Unicode * str, + size_t pos) EINA_ARG_NONNULL(1, + 2); /** * @brief Insert a string to a buffer, reallocating as necessary. Limited by maxlen. @@ -196,7 +213,10 @@ EAPI Eina_Bool eina_ustrbuf_insert_escaped(Eina_UStrbuf *buf, const Eina_Uni * @p str). If @p str can not be inserted, #EINA_FALSE is returned, * otherwise, #EINA_TRUE is returned. */ -EAPI Eina_Bool eina_ustrbuf_insert_n(Eina_UStrbuf *buf, const Eina_Unicode *str, size_t maxlen, size_t pos) EINA_ARG_NONNULL(1, 2); +EAPI Eina_Bool eina_ustrbuf_insert_n(Eina_UStrbuf * buf, + const Eina_Unicode * str, + size_t maxlen, + size_t pos) EINA_ARG_NONNULL(1, 2); /** * @brief Insert a string of exact length to a buffer, reallocating as necessary. @@ -218,7 +238,11 @@ EAPI Eina_Bool eina_ustrbuf_insert_n(Eina_UStrbuf *buf, const Eina_Unicode * * @see eina_ustrbuf_insert() * @see eina_ustrbuf_insert_n() */ -EAPI Eina_Bool eina_ustrbuf_insert_length(Eina_UStrbuf *buf, const Eina_Unicode *str, size_t length, size_t pos) EINA_ARG_NONNULL(1, 2); +EAPI Eina_Bool eina_ustrbuf_insert_length(Eina_UStrbuf * buf, + const Eina_Unicode * str, + size_t length, + size_t pos) EINA_ARG_NONNULL(1, + 2); /** * @brief Insert a character to a string buffer, reallocating as @@ -233,7 +257,8 @@ EAPI Eina_Bool eina_ustrbuf_insert_length(Eina_UStrbuf *buf, const Eina_Unic * can't append it, #EINA_FALSE is returned, otherwise #EINA_TRUE is * returned. */ -EAPI Eina_Bool eina_ustrbuf_insert_char(Eina_UStrbuf *buf, Eina_Unicode c, size_t pos) EINA_ARG_NONNULL(1); +EAPI Eina_Bool eina_ustrbuf_insert_char(Eina_UStrbuf * buf, Eina_Unicode c, + size_t pos) EINA_ARG_NONNULL(1); /** * @def eina_ustrbuf_prepend(buf, str) @@ -351,7 +376,8 @@ EAPI Eina_Bool eina_ustrbuf_insert_char(Eina_UStrbuf *buf, Eina_Unicode c, s * in bytes. It returns #EINA_FALSE on failure, #EINA_TRUE otherwise. */ EAPI Eina_Bool -eina_ustrbuf_remove(Eina_UStrbuf *buf, size_t start, size_t end) EINA_ARG_NONNULL(1); +eina_ustrbuf_remove(Eina_UStrbuf * buf, size_t start, + size_t end) EINA_ARG_NONNULL(1); /** * @brief Retrieve a pointer to the contents of a string buffer @@ -366,8 +392,9 @@ eina_ustrbuf_remove(Eina_UStrbuf *buf, size_t start, size_t end) EINA_ARG_NONNUL * * @see eina_ustrbuf_string_steal() */ -EAPI const Eina_Unicode * -eina_ustrbuf_string_get(const Eina_UStrbuf *buf) EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT; +EAPI const Eina_Unicode *eina_ustrbuf_string_get(const Eina_UStrbuf * + buf) EINA_ARG_NONNULL(1) + EINA_WARN_UNUSED_RESULT; /** * @brief Steal the contents of a string buffer. @@ -382,8 +409,8 @@ eina_ustrbuf_string_get(const Eina_UStrbuf *buf) EINA_ARG_NONNULL(1) EINA_WARN_U * * @see eina_ustrbuf_string_get() */ -EAPI Eina_Unicode * -eina_ustrbuf_string_steal(Eina_UStrbuf *buf) EINA_MALLOC EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); +EAPI Eina_Unicode *eina_ustrbuf_string_steal(Eina_UStrbuf * buf) +EINA_MALLOC EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * @brief Free the contents of a string buffer but not the buffer. @@ -393,8 +420,7 @@ eina_ustrbuf_string_steal(Eina_UStrbuf *buf) EINA_MALLOC EINA_WARN_UNUSED_RESULT * This function frees the string contained in @p buf without freeing * @p buf. */ -EAPI void -eina_ustrbuf_string_free(Eina_UStrbuf *buf) EINA_ARG_NONNULL(1); +EAPI void eina_ustrbuf_string_free(Eina_UStrbuf * buf) EINA_ARG_NONNULL(1); /** * @brief Retrieve the length of the string buffer content. @@ -405,7 +431,8 @@ eina_ustrbuf_string_free(Eina_UStrbuf *buf) EINA_ARG_NONNULL(1); * This function returns the length of @p buf. */ EAPI size_t -eina_ustrbuf_length_get(const Eina_UStrbuf *buf) EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT; +eina_ustrbuf_length_get(const Eina_UStrbuf * + buf) EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT; /** * @} @@ -415,4 +442,4 @@ eina_ustrbuf_length_get(const Eina_UStrbuf *buf) EINA_ARG_NONNULL(1) EINA_WARN_U * @} */ -#endif /* EINA_STRBUF_H */ +#endif /* EINA_STRBUF_H */ diff --git a/tests/suite/ecore/src/include/eina_ustringshare.h b/tests/suite/ecore/src/include/eina_ustringshare.h index ac8c8896e2..2db5aa9002 100644 --- a/tests/suite/ecore/src/include/eina_ustringshare.h +++ b/tests/suite/ecore/src/include/eina_ustringshare.h @@ -66,15 +66,30 @@ * @{ */ -EAPI const Eina_Unicode *eina_ustringshare_add_length(const Eina_Unicode *str, unsigned int slen) EINA_WARN_UNUSED_RESULT; -EAPI const Eina_Unicode *eina_ustringshare_add(const Eina_Unicode *str) EINA_WARN_UNUSED_RESULT; -EAPI const Eina_Unicode *eina_ustringshare_ref(const Eina_Unicode *str); -EAPI void eina_ustringshare_del(const Eina_Unicode *str); -EAPI int eina_ustringshare_strlen(const Eina_Unicode *str) EINA_PURE EINA_WARN_UNUSED_RESULT; -EAPI void eina_ustringshare_dump(void); +EAPI const Eina_Unicode *eina_ustringshare_add_length(const Eina_Unicode * + str, + unsigned int slen) + EINA_WARN_UNUSED_RESULT; +EAPI const Eina_Unicode *eina_ustringshare_add(const Eina_Unicode * + str) + EINA_WARN_UNUSED_RESULT; +EAPI const Eina_Unicode *eina_ustringshare_ref(const Eina_Unicode * str); +EAPI void eina_ustringshare_del(const Eina_Unicode * str); +EAPI int eina_ustringshare_strlen(const Eina_Unicode * str) +EINA_PURE EINA_WARN_UNUSED_RESULT; +EAPI void eina_ustringshare_dump(void); -static inline Eina_Bool eina_ustringshare_replace(const Eina_Unicode **p_str, const Eina_Unicode *news) EINA_ARG_NONNULL(1); -static inline Eina_Bool eina_ustringshare_replace_length(const Eina_Unicode **p_str, const Eina_Unicode *news, unsigned int slen) EINA_ARG_NONNULL(1); +static inline Eina_Bool eina_ustringshare_replace(const Eina_Unicode ** + p_str, + const Eina_Unicode * + news) +EINA_ARG_NONNULL(1); +static inline Eina_Bool eina_ustringshare_replace_length(const Eina_Unicode + ** p_str, + const Eina_Unicode + * news, + unsigned int slen) +EINA_ARG_NONNULL(1); #include "eina_inline_ustringshare.x" @@ -86,4 +101,4 @@ static inline Eina_Bool eina_ustringshare_replace_length(const Eina_Unicode **p * @} */ -#endif /* EINA_STRINGSHARE_H_ */ +#endif /* EINA_STRINGSHARE_H_ */ |