From 6f85c6f672cf3815a14628e34aaafe2670fd2ab7 Mon Sep 17 00:00:00 2001 From: discomfitor Date: Sun, 8 Aug 2010 20:49:26 +0000 Subject: [PATCH] formatting git-svn-id: http://svn.enlightenment.org/svn/e/trunk/eina@50913 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/include/eina_array.h | 68 ++++----------- src/include/eina_list.h | 218 ++++++++++------------------------------------- 2 files changed, 58 insertions(+), 228 deletions(-) diff --git a/src/include/eina_array.h b/src/include/eina_array.h index 95235bd..8d66d9e 100644 --- a/src/include/eina_array.h +++ b/src/include/eina_array.h @@ -73,59 +73,21 @@ struct _Eina_Array 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 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; +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 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; /** * @def EINA_ARRAY_ITER_NEXT diff --git a/src/include/eina_list.h b/src/include/eina_list.h index 35c8079..359e011 100644 --- a/src/include/eina_list.h +++ b/src/include/eina_list.h @@ -75,171 +75,46 @@ struct _Eina_List_Accounting 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 @@ -375,14 +250,12 @@ EINA_WARN_UNUSED_RESULT; l_next = \ eina_list_next(l), \ data = \ - eina_list_data_get( \ - l); \ + eina_list_data_get(l); \ l; \ l = l_next, l_next = \ eina_list_next(l), \ data = \ - eina_list_data_get( \ - l)) + eina_list_data_get(l)) /** * @def EINA_LIST_REVERSE_FOREACH_SAFE @@ -422,22 +295,17 @@ EINA_WARN_UNUSED_RESULT; * @endcode */ #define EINA_LIST_REVERSE_FOREACH_SAFE(list, l, l_prev, data) for (l = \ - eina_list_last( \ - list), \ + eina_list_last(list), \ l_prev = \ - eina_list_prev( \ - l), \ + eina_list_prev(l), \ data = \ - eina_list_data_get( \ - l); \ + eina_list_data_get(l); \ l; \ l = l_prev, \ l_prev = \ - eina_list_prev( \ - l), \ + eina_list_prev(l), \ data = \ - eina_list_data_get( \ - l)) + eina_list_data_get(l)) /** * @def EINA_LIST_FREE -- 2.7.4