| Eina.h | | Eina.h | |
| | | | |
| skipping to change at line 65 | | skipping to change at line 65 | |
| * opening shared libraries, errors management, type conversion, | | * opening shared libraries, errors management, type conversion, | |
| * time accounting and memory pool. | | * time accounting and memory pool. | |
| * | | * | |
| * This library is cross-platform and can be compiled and used on | | * This library is cross-platform and can be compiled and used on | |
| * Linux, BSD, Opensolaris and Windows (XP and CE). | | * Linux, BSD, Opensolaris and Windows (XP and CE). | |
| * | | * | |
| * The data types that are available are (see @ref Eina_Data_Types_Group): | | * The data types that are available are (see @ref Eina_Data_Types_Group): | |
| * @li @ref Eina_Array_Group standard array of @c void* data. | | * @li @ref Eina_Array_Group standard array of @c void* data. | |
| * @li @ref Eina_Hash_Group standard hash of @c void* data. | | * @li @ref Eina_Hash_Group standard hash of @c void* data. | |
| * @li @ref Eina_Inline_List_Group list with nodes inlined into user type. | | * @li @ref Eina_Inline_List_Group list with nodes inlined into user type. | |
|
| * @li @ref Eina_CList_Group compact inlined list. | | * @li @ref Eina_CList_Group Compact List. | |
| * @li @ref Eina_List_Group standard list of @c void* data. | | * @li @ref Eina_List_Group standard list of @c void* data. | |
| * @li @ref Eina_Iterator_Group Iterator functions. | | * @li @ref Eina_Iterator_Group Iterator functions. | |
| * @li @ref Eina_Matrixsparse_Group sparse matrix of @c void* data. | | * @li @ref Eina_Matrixsparse_Group sparse matrix of @c void* data. | |
| * @li @ref Eina_Rbtree_Group red-black tree with nodes inlined into user t
ype. | | * @li @ref Eina_Rbtree_Group red-black tree with nodes inlined into user t
ype. | |
| * @li @ref Eina_String_Buffer_Group mutable string to prepend, insert or a
ppend strings to a buffer. | | * @li @ref Eina_String_Buffer_Group mutable string to prepend, insert or a
ppend strings to a buffer. | |
| * @li @ref Eina_Stringshare_Group saves memory by sharing read-only string
references. | | * @li @ref Eina_Stringshare_Group saves memory by sharing read-only string
references. | |
| * @li @ref Eina_Tiler_Group split, merge and navigates into 2D tiled regio
ns. | | * @li @ref Eina_Tiler_Group split, merge and navigates into 2D tiled regio
ns. | |
| * @li @ref Eina_Trash_Group container of unused but allocated data. | | * @li @ref Eina_Trash_Group container of unused but allocated data. | |
| * | | * | |
| * The tools that are available are (see @ref Eina_Tools_Group): | | * The tools that are available are (see @ref Eina_Tools_Group): | |
| | | | |
| skipping to change at line 92 | | skipping to change at line 92 | |
| * @li @ref Eina_Log_Group full-featured logging system. | | * @li @ref Eina_Log_Group full-featured logging system. | |
| * @li @ref Eina_Magic_Group provides runtime type checking. | | * @li @ref Eina_Magic_Group provides runtime type checking. | |
| * @li @ref Eina_Memory_Pool_Group abstraction for various memory allocator
s. | | * @li @ref Eina_Memory_Pool_Group abstraction for various memory allocator
s. | |
| * @li @ref Eina_Module_Group lists, loads and share modules using Eina_Mod
ule standard. | | * @li @ref Eina_Module_Group lists, loads and share modules using Eina_Mod
ule standard. | |
| * @li @ref Eina_Rectangle_Group rectangle structure and standard manipulat
ion methods. | | * @li @ref Eina_Rectangle_Group rectangle structure and standard manipulat
ion methods. | |
| * @li @ref Eina_Safety_Checks_Group extra checks that will report unexpect
ed conditions and can be disabled at compile time. | | * @li @ref Eina_Safety_Checks_Group extra checks that will report unexpect
ed conditions and can be disabled at compile time. | |
| * @li @ref Eina_String_Group a set of functions that manages C strings. | | * @li @ref Eina_String_Group a set of functions that manages C strings. | |
| * | | * | |
| * Please see the @ref authors page for contact details. | | * Please see the @ref authors page for contact details. | |
| * | | * | |
|
| * @defgroup Eina_Data_Types_Group Data types | | * @defgroup Eina_Data_Types_Group Data Types | |
| * | | * | |
| * Eina provide easy to use and optimized data types and structures. | | * Eina provide easy to use and optimized data types and structures. | |
| * | | * | |
| * | | * | |
| * @defgroup Eina_Containers_Group Containers | | * @defgroup Eina_Containers_Group Containers | |
| * | | * | |
| * Containers are data types that hold data and allow iteration over | | * Containers are data types that hold data and allow iteration over | |
| * their elements with an @ref Eina_Iterator_Group, or eventually an | | * their elements with an @ref Eina_Iterator_Group, or eventually an | |
| * @ref Eina_Accessor_Group. | | * @ref Eina_Accessor_Group. | |
| * | | * | |
| | | | |
End of changes. 2 change blocks. |
| 2 lines changed or deleted | | 2 lines changed or added | |
|
| eina_clist.h | | eina_clist.h | |
| | | | |
| skipping to change at line 26 | | skipping to change at line 26 | |
| * | | * | |
| * You should have received a copy of the GNU Lesser General Public | | * You should have received a copy of the GNU Lesser General Public | |
| * License along with this library; if not, write to the Free Software | | * License along with this library; if not, write to the Free Software | |
| * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, US
A | | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, US
A | |
| */ | | */ | |
| | | | |
| #ifndef __EINA_CLIST_H__ | | #ifndef __EINA_CLIST_H__ | |
| #define __EINA_CLIST_H__ | | #define __EINA_CLIST_H__ | |
| | | | |
| /** | | /** | |
|
| * @addtogroup Eina_CList_Group Compact inline list | | * @addtogroup Eina_Data_Types_Group Data Types | |
| | | * | |
| | | * @{ | |
| | | */ | |
| | | | |
| | | /** | |
| | | * @addtogroup Eina_Containers_Group Containers | |
| | | * | |
| | | * @{ | |
| | | */ | |
| | | | |
| | | /** | |
| | | * @defgroup Eina_CList_Group Compact List | |
| | | * | |
| | | * @{ | |
| | | * | |
| * @brief Eina_Clist is a compact (inline) list implementation | | * @brief Eina_Clist is a compact (inline) list implementation | |
| * | | * | |
| * Elements of this list are members of the structs stored in the list | | * Elements of this list are members of the structs stored in the list | |
| * | | * | |
| * Advantages over @ref Eina_List and @ref Eina_Inlist: | | * Advantages over @ref Eina_List and @ref Eina_Inlist: | |
| * - uses less memory (two machine words per item) | | * - uses less memory (two machine words per item) | |
| * - allows removing items without knowing which list they're in using O(1
) time | | * - allows removing items without knowing which list they're in using O(1
) time | |
| * - no need to keep updating the head pointer as the list is changed | | * - no need to keep updating the head pointer as the list is changed | |
| * | | * | |
| * Disadvantages: | | * Disadvantages: | |
| * - O(N) time to calculate list length | | * - O(N) time to calculate list length | |
| * - requires one list entry in a struct per list (i.e. it's an inlist) | | * - requires one list entry in a struct per list (i.e. it's an inlist) | |
| * - requires a head/tail pointer | | * - requires a head/tail pointer | |
| * - need to know the list head when moving to next or previous pointer | | * - need to know the list head when moving to next or previous pointer | |
| * | | * | |
| * @note There's no NULL at the end of the list, the last item points to th
e head. | | * @note There's no NULL at the end of the list, the last item points to th
e head. | |
| * | | * | |
| * @note List heads must be initialized with EINA_CLIST_INIT or by calling
eina_clist_element_init | | * @note List heads must be initialized with EINA_CLIST_INIT or by calling
eina_clist_element_init | |
|
| */ | | * | |
| | | * Define a list like so: | |
| /* Define a list like so: | | | |
| * | | * | |
| * @code | | * @code | |
| * struct gadget | | * struct gadget | |
| * { | | * { | |
| * struct Eina_Clist entry; <-- doesn't have to be the first item
in the struct | | * struct Eina_Clist entry; <-- doesn't have to be the first item
in the struct | |
| * int a, b; | | * int a, b; | |
| * }; | | * }; | |
| * | | * | |
| * static Eina_Clist global_gadgets = EINA_CLIST_INIT( global_gadgets ); | | * static Eina_Clist global_gadgets = EINA_CLIST_INIT( global_gadgets ); | |
| * @endcode | | * @endcode | |
| | | | |
| skipping to change at line 91 | | skipping to change at line 105 | |
| * struct gadget *gadget; | | * struct gadget *gadget; | |
| * EINA_CLIST_FOR_EACH_ENTRY( gadget, &global_gadgets, struct gadget, ent
ry ) | | * EINA_CLIST_FOR_EACH_ENTRY( gadget, &global_gadgets, struct gadget, ent
ry ) | |
| * { | | * { | |
| * ... | | * ... | |
| * } | | * } | |
| * @endcode | | * @endcode | |
| * | | * | |
| */ | | */ | |
| | | | |
| /** | | /** | |
|
| * @addtogroup Eina_Data_Types_Group Data Types | | | |
| * | | | |
| * @{ | | | |
| */ | | | |
| | | | |
| /** | | | |
| * @addtogroup Eina_Containers_Group Containers | | | |
| * | | | |
| * @{ | | | |
| */ | | | |
| | | | |
| /** | | | |
| * @defgroup Eina_CList_Group Compact list | | | |
| * | | | |
| * @{ | | | |
| */ | | | |
| | | | |
| /** | | | |
| * @typedef Eina_Clist | | * @typedef Eina_Clist | |
| * This is the list head and the list entry. | | * This is the list head and the list entry. | |
| * @since 1.1.0 | | * @since 1.1.0 | |
| */ | | */ | |
| typedef struct _Eina_Clist Eina_Clist; | | typedef struct _Eina_Clist Eina_Clist; | |
| | | | |
| /** | | /** | |
| * @struct _Eina_Clist | | * @struct _Eina_Clist | |
| * Compact list type | | * Compact list type | |
| * @note This structure is used as both the list head and the list entry. | | * @note This structure is used as both the list head and the list entry. | |
| | | | |
| skipping to change at line 251 | | skipping to change at line 247 | |
| elem->prev->next = elem->next; | | elem->prev->next = elem->next; | |
| eina_clist_element_init(elem); | | eina_clist_element_init(elem); | |
| } | | } | |
| | | | |
| /** | | /** | |
| * Get the next element. | | * Get the next element. | |
| * | | * | |
| * @param list The list | | * @param list The list | |
| * @param elem An element | | * @param elem An element | |
| * @pre @a elem is in @a list | | * @pre @a elem is in @a list | |
|
| * @return The element after @elem in @list or NULL if @a elem is last in
@a list | | * @return The element after @a elem in @a list or @c NULL if @a elem is l
ast in @a list | |
| * @since 1.1.0 | | * @since 1.1.0 | |
| */ | | */ | |
| static inline Eina_Clist *eina_clist_next(const Eina_Clist *list, const Ein
a_Clist *elem) | | static inline Eina_Clist *eina_clist_next(const Eina_Clist *list, const Ein
a_Clist *elem) | |
| { | | { | |
| Eina_Clist *ret = elem->next; | | Eina_Clist *ret = elem->next; | |
| if (elem->next == list) ret = NULL; | | if (elem->next == list) ret = NULL; | |
| return ret; | | return ret; | |
| } | | } | |
| | | | |
| /** | | /** | |
| | | | |
| skipping to change at line 293 | | skipping to change at line 289 | |
| */ | | */ | |
| static inline Eina_Clist *eina_clist_head(const Eina_Clist *list) | | static inline Eina_Clist *eina_clist_head(const Eina_Clist *list) | |
| { | | { | |
| return eina_clist_next(list, list); | | return eina_clist_next(list, list); | |
| } | | } | |
| | | | |
| /** | | /** | |
| * Get the last element. | | * Get the last element. | |
| * | | * | |
| * @param list The list | | * @param list The list | |
|
| * @returns The last element in @a list or NULL if @list is empty | | * @returns The last element in @a list or NULL if @a list is empty | |
| * @since 1.1.0 | | * @since 1.1.0 | |
| */ | | */ | |
| static inline Eina_Clist *eina_clist_tail(const Eina_Clist *list) | | static inline Eina_Clist *eina_clist_tail(const Eina_Clist *list) | |
| { | | { | |
| return eina_clist_prev(list, list); | | return eina_clist_prev(list, list); | |
| } | | } | |
| | | | |
| /** | | /** | |
| * Check if a list is empty. | | * Check if a list is empty. | |
| * | | * | |
| | | | |
| skipping to change at line 444 | | skipping to change at line 440 | |
| | | | |
| /* macros for statically initialized lists */ | | /* macros for statically initialized lists */ | |
| #undef EINA_CLIST_INIT | | #undef EINA_CLIST_INIT | |
| #define EINA_CLIST_INIT(list) { &(list), &(list) } | | #define EINA_CLIST_INIT(list) { &(list), &(list) } | |
| | | | |
| /* get pointer to object containing list element */ | | /* get pointer to object containing list element */ | |
| #undef EINA_CLIST_ENTRY | | #undef EINA_CLIST_ENTRY | |
| #define EINA_CLIST_ENTRY(elem, type, field) \ | | #define EINA_CLIST_ENTRY(elem, type, field) \ | |
| ((type *)((char *)(elem) - (unsigned long)(&((type *)0)->field))) | | ((type *)((char *)(elem) - (unsigned long)(&((type *)0)->field))) | |
| | | | |
|
| /* | | /** | |
| * @} | | * @} | |
| */ | | */ | |
| | | | |
|
| /* | | /** | |
| * @} | | * @} | |
| */ | | */ | |
| | | | |
|
| /* | | /** | |
| * @} | | * @} | |
| */ | | */ | |
| | | | |
| #endif /* __EINA_CLIST_H__ */ | | #endif /* __EINA_CLIST_H__ */ | |
| | | | |
End of changes. 8 change blocks. |
| 27 lines changed or deleted | | 23 lines changed or added | |
|
| eina_hash.h | | eina_hash.h | |
| | | | |
| skipping to change at line 580 | | skipping to change at line 580 | |
| * @param key The key of the entry to find. | | * @param key The key of the entry to find. | |
| * @return The data pointer for the stored entry on success, @c NULL | | * @return The data pointer for the stored entry on success, @c NULL | |
| * otherwise. | | * otherwise. | |
| * | | * | |
| * This function retrieves the entry associated to @p key in | | * This function retrieves the entry associated to @p key in | |
| * @p hash. If @p hash is @c NULL, this function returns immediately | | * @p hash. If @p hash is @c NULL, this function returns immediately | |
| * @c NULL. This function returns the data pointer on success, @c NULL | | * @c NULL. This function returns the data pointer on success, @c NULL | |
| * otherwise. | | * otherwise. | |
| */ | | */ | |
| EAPI void *eina_hash_find(const Eina_Hash *hash, | | EAPI void *eina_hash_find(const Eina_Hash *hash, | |
|
| const void *key) EINA_ARG_NONNULL(1, 2); | | const void *key) EINA_ARG_NONNULL(2); | |
| | | | |
| /** | | /** | |
| * @brief Modify the entry pointer at the specified key and return the old | | * @brief Modify the entry pointer at the specified key and return the old | |
| * entry. | | * entry. | |
| * @param hash The given hash table. | | * @param hash The given hash table. | |
| * @param key The key of the entry to modify. | | * @param key The key of the entry to modify. | |
| * @param data The data to replace the old entry. | | * @param data The data to replace the old entry. | |
| * @return The data pointer for the old stored entry on success, or | | * @return The data pointer for the old stored entry on success, or | |
| * @c NULL otherwise. | | * @c NULL otherwise. | |
| * | | * | |
| | | | |
| skipping to change at line 1007 | | skipping to change at line 1007 | |
| * { | | * { | |
| * char *hash_fn_data; | | * char *hash_fn_data; | |
| * | | * | |
| * hash_fn_data = strdup("Hello World"); | | * hash_fn_data = strdup("Hello World"); | |
| * eina_hash_foreach(hash, hash_fn, hash_fn_data); | | * eina_hash_foreach(hash, hash_fn, hash_fn_data); | |
| * free(hash_fn_data); | | * free(hash_fn_data); | |
| * } | | * } | |
| * @endcode | | * @endcode | |
| */ | | */ | |
| EAPI void eina_hash_foreach(const Eina_Hash *hash, | | EAPI void eina_hash_foreach(const Eina_Hash *hash, | |
|
| Eina_Hash_Foreach cb, | | Eina_Hash_Foreach func, | |
| const void *fdata) EINA_ARG_NON
NULL(1, 2); | | const void *fdata) EINA_ARG_NON
NULL(1, 2); | |
| /* Paul Hsieh (http://www.azillionmonkeys.com/qed/hash.html) hash function
used by WebCore (http://webkit.org/blog/8/hashtables-part-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, | | EAPI int eina_hash_superfast(const char *key, | |
| int len) EINA_ARG_NONNULL(1); | | int len) EINA_ARG_NONNULL(1); | |
| /* Hash function first reported by dan bernstein many years ago in comp.lan
g.c */ | | /* Hash function first reported by dan bernstein many years ago in comp.lan
g.c */ | |
| static inline int eina_hash_djb2(const char *key, | | static inline int eina_hash_djb2(const char *key, | |
| int len) EINA_ARG_NONNULL(1); | | int len) EINA_ARG_NONNULL(1); | |
| static inline int eina_hash_djb2_len(const char *key, | | static inline int eina_hash_djb2_len(const char *key, | |
| int *plen) EINA_ARG_NONNULL(1,
2); | | int *plen) EINA_ARG_NONNULL(1,
2); | |
| /* Hash function from http://www.concentric.net/~Ttwang/tech/inthash.htm */ | | /* Hash function from http://www.concentric.net/~Ttwang/tech/inthash.htm */ | |
| | | | |
End of changes. 2 change blocks. |
| 2 lines changed or deleted | | 2 lines changed or added | |
|
| eina_inlist.h | | eina_inlist.h | |
| | | | |
| skipping to change at line 430 | | skipping to change at line 430 | |
| #define EINA_INLIST_GET(Inlist) (& ((Inlist)->__in_list)) | | #define EINA_INLIST_GET(Inlist) (& ((Inlist)->__in_list)) | |
| /** Utility macro to get the container object of an inlist */ | | /** Utility macro to get the container object of an inlist */ | |
| #define EINA_INLIST_CONTAINER_GET(ptr, \ | | #define EINA_INLIST_CONTAINER_GET(ptr, \ | |
| type) ((type *)((char *)ptr - \ | | type) ((type *)((char *)ptr - \ | |
| offsetof(type, __in_list)
)) | | offsetof(type, __in_list)
)) | |
| | | | |
| /** | | /** | |
| * Add a new node to end of a list. | | * Add a new node to end of a list. | |
| * | | * | |
| * @note this code is meant to be fast: appends are O(1) and do not | | * @note this code is meant to be fast: appends are O(1) and do not | |
|
| * walk @a list. | | * walk @a in_list. | |
| * | | * | |
|
| * @note @a new_l is considered to be in no list. If it was in another | | * @note @a in_item is considered to be in no list. If it was in another | |
| * list before, eina_inlist_remove() it before adding. No | | * list before, eina_inlist_remove() it before adding. No | |
| * check of @a new_l prev and next pointers is done, so it's safe | | * check of @a new_l prev and next pointers is done, so it's safe | |
| * to have them uninitialized. | | * to have them uninitialized. | |
| * | | * | |
|
| * @param list existing list head or NULL to create a new list. | | * @param in_list existing list head or NULL to create a new list. | |
| * @param new_l new list node, must not be NULL. | | * @param in_item new list node, must not be NULL. | |
| * | | * | |
|
| * @return the new list head. Use it and not @a list anymore. | | * @return the new list head. Use it and not @a in_list anymore. | |
| */ | | */ | |
| EAPI Eina_Inlist *eina_inlist_append(Eina_Inlist *in_list, | | EAPI Eina_Inlist *eina_inlist_append(Eina_Inlist *in_list, | |
| Eina_Inlist *in_item) EINA_ARG_NONNULL
(2) EINA_WARN_UNUSED_RESULT; | | Eina_Inlist *in_item) EINA_ARG_NONNULL
(2) EINA_WARN_UNUSED_RESULT; | |
| | | | |
| /** | | /** | |
| * Add a new node to beginning of list. | | * Add a new node to beginning of list. | |
| * | | * | |
| * @note this code is meant to be fast: appends are O(1) and do not | | * @note this code is meant to be fast: appends are O(1) and do not | |
|
| * walk @a list. | | * walk @a in_list. | |
| * | | * | |
| * @note @a new_l is considered to be in no list. If it was in another | | * @note @a new_l is considered to be in no list. If it was in another | |
| * list before, eina_inlist_remove() it before adding. No | | * list before, eina_inlist_remove() it before adding. No | |
| * check of @a new_l prev and next pointers is done, so it's safe | | * check of @a new_l prev and next pointers is done, so it's safe | |
| * to have them uninitialized. | | * to have them uninitialized. | |
| * | | * | |
|
| * @param list existing list head or NULL to create a new list. | | * @param in_list existing list head or NULL to create a new list. | |
| * @param new_l new list node, must not be NULL. | | * @param in_item new list node, must not be NULL. | |
| * | | * | |
|
| * @return the new list head. Use it and not @a list anymore. | | * @return the new list head. Use it and not @a in_list anymore. | |
| */ | | */ | |
| EAPI Eina_Inlist *eina_inlist_prepend(Eina_Inlist *in_list, | | EAPI Eina_Inlist *eina_inlist_prepend(Eina_Inlist *in_list, | |
| Eina_Inlist *in_item) EINA_ARG_NONNUL
L(2) EINA_WARN_UNUSED_RESULT; | | Eina_Inlist *in_item) EINA_ARG_NONNUL
L(2) EINA_WARN_UNUSED_RESULT; | |
| | | | |
| /** | | /** | |
| * Add a new node after the given relative item in list. | | * Add a new node after the given relative item in list. | |
| * | | * | |
| * @note this code is meant to be fast: appends are O(1) and do not | | * @note this code is meant to be fast: appends are O(1) and do not | |
|
| * walk @a list. | | * walk @a in_list. | |
| * | | * | |
|
| * @note @a new_l is considered to be in no list. If it was in another | | * @note @a in_item_l is considered to be in no list. If it was in another | |
| * list before, eina_inlist_remove() it before adding. No | | * list before, eina_inlist_remove() it before adding. No | |
|
| * check of @a new_l prev and next pointers is done, so it's safe | | * check of @a in_item prev and next pointers is done, so it's safe | |
| * to have them uninitialized. | | * to have them uninitialized. | |
| * | | * | |
|
| * @note @a relative is considered to be inside @a list, no checks are | | * @note @a in_relative is considered to be inside @a in_list, no checks ar
e | |
| * done to confirm that and giving nodes from different lists | | * done to confirm that and giving nodes from different lists | |
|
| * will lead to problems. Giving NULL @a relative is the same as | | * will lead to problems. Giving NULL @a in_relative is the same as | |
| * eina_list_append(). | | * eina_list_append(). | |
| * | | * | |
|
| * @param list existing list head or NULL to create a new list. | | * @param in_list existing list head or NULL to create a new list. | |
| * @param new_l new list node, must not be NULL. | | * @param in_item new list node, must not be NULL. | |
| * @param relative reference node, @a new_l will be added after it. | | * @param in_relative reference node, @a in_item will be added after it. | |
| * | | * | |
| * @return the new list head. Use it and not @a list anymore. | | * @return the new list head. Use it and not @a list anymore. | |
| */ | | */ | |
| EAPI Eina_Inlist *eina_inlist_append_relative(Eina_Inlist *in_list, | | EAPI Eina_Inlist *eina_inlist_append_relative(Eina_Inlist *in_list, | |
| Eina_Inlist *in_item, | | Eina_Inlist *in_item, | |
| Eina_Inlist *in_relative) EIN
A_ARG_NONNULL(2) EINA_WARN_UNUSED_RESULT; | | Eina_Inlist *in_relative) EIN
A_ARG_NONNULL(2) EINA_WARN_UNUSED_RESULT; | |
| | | | |
| /** | | /** | |
| * Add a new node before the given relative item in list. | | * Add a new node before the given relative item in list. | |
| * | | * | |
| * @note this code is meant to be fast: appends are O(1) and do not | | * @note this code is meant to be fast: appends are O(1) and do not | |
|
| * walk @a list. | | * walk @a in_list. | |
| * | | * | |
|
| * @note @a new_l is considered to be in no list. If it was in another | | * @note @a in_item is considered to be in no list. If it was in another | |
| * list before, eina_inlist_remove() it before adding. No | | * list before, eina_inlist_remove() it before adding. No | |
|
| * check of @a new_l prev and next pointers is done, so it's safe | | * check of @a in_item prev and next pointers is done, so it's safe | |
| * to have them uninitialized. | | * to have them uninitialized. | |
| * | | * | |
|
| * @note @a relative is considered to be inside @a list, no checks are | | * @note @a in_relative is considered to be inside @a in_list, no checks ar
e | |
| * done to confirm that and giving nodes from different lists | | * done to confirm that and giving nodes from different lists | |
|
| * will lead to problems. Giving NULL @a relative is the same as | | * will lead to problems. Giving NULL @a in_relative is the same as | |
| * eina_list_prepend(). | | * eina_list_prepend(). | |
| * | | * | |
|
| * @param list existing list head or NULL to create a new list. | | * @param in_list existing list head or NULL to create a new list. | |
| * @param new_l new list node, must not be NULL. | | * @param in_item new list node, must not be NULL. | |
| * @param relative reference node, @a new_l will be added before it. | | * @param in_relative reference node, @a in_item will be added before it. | |
| * | | * | |
|
| * @return the new list head. Use it and not @a list anymore. | | * @return the new list head. Use it and not @a in_list anymore. | |
| */ | | */ | |
| EAPI Eina_Inlist *eina_inlist_prepend_relative(Eina_Inlist *in_list, | | EAPI Eina_Inlist *eina_inlist_prepend_relative(Eina_Inlist *in_list, | |
| Eina_Inlist *in_item, | | Eina_Inlist *in_item, | |
| Eina_Inlist *in_relative) EI
NA_ARG_NONNULL(2) EINA_WARN_UNUSED_RESULT; | | Eina_Inlist *in_relative) EI
NA_ARG_NONNULL(2) EINA_WARN_UNUSED_RESULT; | |
| | | | |
| /** | | /** | |
| * Remove node from list. | | * Remove node from list. | |
| * | | * | |
| * @note this code is meant to be fast: appends are O(1) and do not | | * @note this code is meant to be fast: appends are O(1) and do not | |
| * walk @a list. | | * walk @a list. | |
| * | | * | |
|
| * @note @a item is considered to be inside @a list, no checks are | | * @note @a in_item is considered to be inside @a in_list, no checks are | |
| * done to confirm that and giving nodes from different lists | | * done to confirm that and giving nodes from different lists | |
|
| * will lead to problems, especially if @a item is the head since | | * will lead to problems, especially if @a in_item is the head since | |
| * it will be different from @a list and the wrong new head will | | * it will be different from @a list and the wrong new head will | |
| * be returned. | | * be returned. | |
| * | | * | |
|
| * @param list existing list head, must not be NULL. | | * @param in_list existing list head, must not be NULL. | |
| * @param item existing list node, must not be NULL. | | * @param in_item existing list node, must not be NULL. | |
| * | | * | |
| * @return the new list head. Use it and not @a list anymore. | | * @return the new list head. Use it and not @a list anymore. | |
| */ | | */ | |
| EAPI Eina_Inlist *eina_inlist_remove(Eina_Inlist *in_list, | | EAPI Eina_Inlist *eina_inlist_remove(Eina_Inlist *in_list, | |
| Eina_Inlist *in_item) EINA_ARG_NONNU
LL(1, 2) EINA_WARN_UNUSED_RESULT; | | Eina_Inlist *in_item) EINA_ARG_NONNU
LL(1, 2) EINA_WARN_UNUSED_RESULT; | |
| | | | |
| /** | | /** | |
| * Find given node in list, returns itself if found, NULL if not. | | * Find given node in list, returns itself if found, NULL if not. | |
| * | | * | |
| * @warning this is an expensive call and has O(n) cost, possibly | | * @warning this is an expensive call and has O(n) cost, possibly | |
| * walking the whole list. | | * walking the whole list. | |
| * | | * | |
|
| * @param list existing list to search @a item in, must not be NULL. | | * @param in_list existing list to search @a in_item in, must not be NULL. | |
| * @param item what to search for, must not be NULL. | | * @param in_item what to search for, must not be NULL. | |
| * | | * | |
|
| * @return @a item if found, NULL if not. | | * @return @a in_item if found, NULL if not. | |
| */ | | */ | |
| EAPI Eina_Inlist *eina_inlist_find(Eina_Inlist *in_list, | | EAPI Eina_Inlist *eina_inlist_find(Eina_Inlist *in_list, | |
| Eina_Inlist *in_item) EINA_ARG_NONNULL
(2) EINA_WARN_UNUSED_RESULT; | | Eina_Inlist *in_item) EINA_ARG_NONNULL
(2) EINA_WARN_UNUSED_RESULT; | |
| | | | |
| /** | | /** | |
| * Move existing node to beginning of list. | | * Move existing node to beginning of list. | |
| * | | * | |
| * @note this code is meant to be fast: appends are O(1) and do not | | * @note this code is meant to be fast: appends are O(1) and do not | |
| * walk @a list. | | * walk @a list. | |
| * | | * | |
| | | | |
| skipping to change at line 604 | | skipping to change at line 604 | |
| * | | * | |
| * @warning This is an order-N operation and so the time will depend | | * @warning This is an order-N operation and so the time will depend | |
| * on the number of elements on the list, so, it might become | | * on the number of elements on the list, so, it might become | |
| * slow for big lists! | | * slow for big lists! | |
| */ | | */ | |
| EAPI unsigned int eina_inlist_count(const Eina_Inlist *list) EINA_WARN_UN
USED_RESULT; | | EAPI unsigned int eina_inlist_count(const Eina_Inlist *list) EINA_WARN_UN
USED_RESULT; | |
| | | | |
| /** | | /** | |
| * @brief Returns a new iterator associated to @a list. | | * @brief Returns a new iterator associated to @a list. | |
| * | | * | |
|
| * @param list The list. | | * @param in_list The list. | |
| * @return A new iterator. | | * @return A new iterator. | |
| * | | * | |
| * This function returns a newly allocated iterator associated to @p | | * This function returns a newly allocated iterator associated to @p | |
|
| * list. If @p list is @c NULL or the count member of @p list is less | | * in_list. If @p in_list is @c NULL or the count member of @p in_list is l
ess | |
| * or equal than 0, this function still returns a valid iterator that | | * or equal than 0, this function still returns a valid iterator that | |
| * will always return false on eina_iterator_next(), thus keeping API | | * will always return false on eina_iterator_next(), thus keeping API | |
| * sane. | | * sane. | |
| * | | * | |
| * If the memory can not be allocated, NULL is returned and | | * If the memory can not be allocated, NULL is returned and | |
| * #EINA_ERROR_OUT_OF_MEMORY is set. Otherwise, a valid iterator is | | * #EINA_ERROR_OUT_OF_MEMORY is set. Otherwise, a valid iterator is | |
| * returned. | | * returned. | |
| * | | * | |
| * @warning if the list structure changes then the iterator becomes | | * @warning if the list structure changes then the iterator becomes | |
| * invalid, and if you add or remove nodes iterator | | * invalid, and if you add or remove nodes iterator | |
| * behavior is undefined, and your program may crash! | | * behavior is undefined, and your program may crash! | |
| */ | | */ | |
| EAPI Eina_Iterator *eina_inlist_iterator_new(const Eina_Inlist *in_list) EI
NA_MALLOC EINA_WARN_UNUSED_RESULT; | | EAPI Eina_Iterator *eina_inlist_iterator_new(const Eina_Inlist *in_list) EI
NA_MALLOC EINA_WARN_UNUSED_RESULT; | |
| | | | |
| /** | | /** | |
| * @brief Returns a new accessor associated to a list. | | * @brief Returns a new accessor associated to a list. | |
| * | | * | |
|
| * @param list The list. | | * @param in_list The list. | |
| * @return A new accessor. | | * @return A new accessor. | |
| * | | * | |
| * This function returns a newly allocated accessor associated to | | * This function returns a newly allocated accessor associated to | |
|
| * @p list. If @p list is @c NULL or the count member of @p list is | | * @p in_list. If @p in_list is @c NULL or the count member of @p in_list i | |
| * less or equal than 0, this function returns NULL. If the memory can | | s | |
| * not be allocated, NULL is returned and #EINA_ERROR_OUT_OF_MEMORY is | | * less or equal than 0, this function returns @c NULL. If the memory can | |
| | | * not be allocated, @c NULL is returned and #EINA_ERROR_OUT_OF_MEMORY is | |
| * set. Otherwise, a valid accessor is returned. | | * set. Otherwise, a valid accessor is returned. | |
| */ | | */ | |
| EAPI Eina_Accessor *eina_inlist_accessor_new(const Eina_Inlist *in_list) EI
NA_MALLOC EINA_WARN_UNUSED_RESULT; | | EAPI Eina_Accessor *eina_inlist_accessor_new(const Eina_Inlist *in_list) EI
NA_MALLOC EINA_WARN_UNUSED_RESULT; | |
| | | | |
| /** | | /** | |
| * @brief Insert a new node into a sorted list. | | * @brief Insert a new node into a sorted list. | |
| * | | * | |
| * @param list The given linked list, @b must be sorted. | | * @param list The given linked list, @b must be sorted. | |
| * @param item list node to insert, must not be NULL. | | * @param item list node to insert, must not be NULL. | |
| * @param func The function called for the sort. | | * @param func The function called for the sort. | |
| | | | |
| skipping to change at line 729 | | skipping to change at line 729 | |
| * linear cost again. Consider worst case to be almost O(n) pointer | | * linear cost again. Consider worst case to be almost O(n) pointer | |
| * dereference (list walk). | | * dereference (list walk). | |
| */ | | */ | |
| EAPI Eina_Inlist *eina_inlist_sorted_state_insert(Eina_Inlist *list, | | EAPI Eina_Inlist *eina_inlist_sorted_state_insert(Eina_Inlist *list, | |
| Eina_Inlist *item, | | Eina_Inlist *item, | |
| Eina_Compare_Cb func, | | Eina_Compare_Cb func, | |
| Eina_Inlist_Sorted_State *
state); | | Eina_Inlist_Sorted_State *
state); | |
| /** | | /** | |
| * @brief Sort a list according to the ordering func will return. | | * @brief Sort a list according to the ordering func will return. | |
| * | | * | |
|
| * @param list The list handle to sort. | | * @param head The list handle to sort. | |
| * @param func A function pointer that can handle comparing the list data | | * @param func A function pointer that can handle comparing the list data | |
| * nodes. | | * nodes. | |
| * @return the new head of list. | | * @return the new head of list. | |
| * | | * | |
|
| * This function sorts all the elements of @p list. @p func is used to | | * This function sorts all the elements of @p head. @p func is used to | |
| * compare two elements of @p list. If @p list or @p func are @c NULL, | | * compare two elements of @p head. If @p head or @p func are @c NULL, | |
| * this function returns @c NULL. | | * this function returns @c NULL. | |
| * | | * | |
| * @note @b in-place: this will change the given list, so you should | | * @note @b in-place: this will change the given list, so you should | |
| * now point to the new list head that is returned by this function. | | * now point to the new list head that is returned by this function. | |
| * | | * | |
| * @note worst case is O(n * log2(n)) comparisons (calls to func()), | | * @note worst case is O(n * log2(n)) comparisons (calls to func()), | |
| * O(n) comparisons average case. That means that for 1,000,000 list | | * O(n) comparisons average case. That means that for 1,000,000 list | |
| * elements, sort will usually do 1,000,000 comparisons, but may do up | | * elements, sort will usually do 1,000,000 comparisons, but may do up | |
| * to 20,000,000. | | * to 20,000,000. | |
| * | | * | |
| | | | |
End of changes. 31 change blocks. |
| 42 lines changed or deleted | | 43 lines changed or added | |
|
| eina_log.h | | eina_log.h | |
| | | | |
| skipping to change at line 725 | | skipping to change at line 725 | |
| * macros EINA_LOG(), EINA_LOG_DOM_CRIT(), EINA_LOG_CRIT() and | | * macros EINA_LOG(), EINA_LOG_DOM_CRIT(), EINA_LOG_CRIT() and | |
| * so on. See eina_log.h | | * so on. See eina_log.h | |
| * | | * | |
| * @param domain logging domain to use or @c EINA_LOG_DOMAIN_GLOBAL if | | * @param domain logging domain to use or @c EINA_LOG_DOMAIN_GLOBAL if | |
| * you registered none. It is recommended that modules and | | * you registered none. It is recommended that modules and | |
| * applications have their own logging domain. | | * applications have their own logging domain. | |
| * @param level message level, those with level greater than user | | * @param level message level, those with level greater than user | |
| * specified value (eina_log_level_set() or environment | | * specified value (eina_log_level_set() or environment | |
| * variables EINA_LOG_LEVEL, EINA_LOG_LEVELS) will be ignored. | | * variables EINA_LOG_LEVEL, EINA_LOG_LEVELS) will be ignored. | |
| * @param file filename that originated the call, must @b not be @c NULL. | | * @param file filename that originated the call, must @b not be @c NULL. | |
|
| * @param fnc function that originated the call, must @b not be @c NULL. | | * @param function function that originated the call, must @b not be @c NUL
L. | |
| * @param line originating line in @a file. | | * @param line originating line in @a file. | |
| * @param fmt printf-like format to use. Should not provide trailing | | * @param fmt printf-like format to use. Should not provide trailing | |
| * '\n' as it is automatically included. | | * '\n' as it is automatically included. | |
| * | | * | |
| * @note MT: this function may be called from different threads if | | * @note MT: this function may be called from different threads if | |
| * eina_log_threads_enable() was called before. | | * eina_log_threads_enable() was called before. | |
| */ | | */ | |
| EAPI void eina_log_print(int domain, | | EAPI void eina_log_print(int domain, | |
| Eina_Log_Level level, | | Eina_Log_Level level, | |
| const char *file, | | const char *file, | |
| | | | |
| skipping to change at line 779 | | skipping to change at line 779 | |
| const char *fnc, | | const char *fnc, | |
| int line, | | int line, | |
| const char *fmt, | | const char *fmt, | |
| va_list args) EINA_ARG_NONNULL(3, 4, 6) EI
NA_NOINSTRUMENT; | | va_list args) EINA_ARG_NONNULL(3, 4, 6) EI
NA_NOINSTRUMENT; | |
| | | | |
| /* | | /* | |
| * Logging methods (change how logging is done). | | * Logging methods (change how logging is done). | |
| */ | | */ | |
| | | | |
| /** | | /** | |
|
| * Alternative logging method, this will output to standard output stream. | | * @brief Alternative logging method, this will output to standard output s
tream. | |
| * | | * | |
| * @param d The domain. | | * @param d The domain. | |
| * @param level The level. | | * @param level The level. | |
| * @param file The file which is logged. | | * @param file The file which is logged. | |
| * @param fnc The function which is logged. | | * @param fnc The function which is logged. | |
| * @param line The line which is logged. | | * @param line The line which is logged. | |
| * @param fmt The ouptut format to use. | | * @param fmt The ouptut format to use. | |
| * @param data Not used. | | * @param data Not used. | |
| * @param args The arguments needed by the format. | | * @param args The arguments needed by the format. | |
| * | | * | |
| | | | |
| skipping to change at line 814 | | skipping to change at line 814 | |
| EAPI void eina_log_print_cb_stdout(const Eina_Log_Domain *d, | | EAPI void eina_log_print_cb_stdout(const Eina_Log_Domain *d, | |
| Eina_Log_Level level, | | Eina_Log_Level level, | |
| const char *file, | | const char *file, | |
| const char *fnc, | | const char *fnc, | |
| int line, | | int line, | |
| const char *fmt, | | const char *fmt, | |
| void *data, | | void *data, | |
| va_list args); | | va_list args); | |
| | | | |
| /** | | /** | |
|
| * Default logging method, this will output to standard error stream. | | * @brief Default logging method, this will output to standard error stream | |
| | | . | |
| | | * | |
| | | * @param d The domain. | |
| | | * @param level The level. | |
| | | * @param file The file which is logged. | |
| | | * @param fnc The function which is logged. | |
| | | * @param line The line which is logged. | |
| | | * @param fmt The ouptut format to use. | |
| | | * @param data Not used. | |
| | | * @param args The arguments needed by the format. | |
| * | | * | |
| * This method will colorize output based on domain provided color and | | * This method will colorize output based on domain provided color and | |
| * message logging level. | | * message logging level. | |
| * | | * | |
| * To disable color, set environment variable | | * To disable color, set environment variable | |
| * EINA_LOG_COLOR_DISABLE=1. To enable color, even if directing to a | | * EINA_LOG_COLOR_DISABLE=1. To enable color, even if directing to a | |
| * file or when using a non-supported color terminal, use | | * file or when using a non-supported color terminal, use | |
| * EINA_LOG_COLOR_DISABLE=0. If EINA_LOG_COLOR_DISABLE is unset (or | | * EINA_LOG_COLOR_DISABLE=0. If EINA_LOG_COLOR_DISABLE is unset (or | |
| * -1), then Eina will disable color if terminal ($TERM) is | | * -1), then Eina will disable color if terminal ($TERM) is | |
| * unsupported or if redirecting to a file. | | * unsupported or if redirecting to a file. | |
| | | | |
End of changes. 3 change blocks. |
| 3 lines changed or deleted | | 13 lines changed or added | |
|
| eina_module.h | | eina_module.h | |
| | | | |
| skipping to change at line 70 | | skipping to change at line 70 | |
| * | | * | |
| * @{ | | * @{ | |
| */ | | */ | |
| | | | |
| /** | | /** | |
| * @typedef Eina_Module | | * @typedef Eina_Module | |
| * Dynamic module loader handle. | | * Dynamic module loader handle. | |
| */ | | */ | |
| typedef struct _Eina_Module Eina_Module; | | typedef struct _Eina_Module Eina_Module; | |
| | | | |
|
| | | /** | |
| | | * @typedef Eina_Module_Cb | |
| | | * Dynamic module loader callback. | |
| | | */ | |
| 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 | | * @typedef Eina_Module_Init | |
| * If a function with such signature is exported by module as | | * If a function with such signature is exported by module as | |
| * __eina_module_init, it will be called on the first load after | | * __eina_module_init, it will be called on the first load after | |
| * dlopen() and if #EINA_FALSE is returned, load will fail, #EINA_TRUE | | * dlopen() and if #EINA_FALSE is returned, load will fail, #EINA_TRUE | |
| * means the module was successfully initialized. | | * means the module was successfully initialized. | |
| * @see Eina_Module_Shutdown | | * @see Eina_Module_Shutdown | |
| */ | | */ | |
| | | | |
| skipping to change at line 138 | | skipping to change at line 142 | |
| * to free the allocated memory. | | * to free the allocated memory. | |
| * | | * | |
| * @see eina_module_load | | * @see eina_module_load | |
| */ | | */ | |
| EAPI Eina_Module * | | EAPI Eina_Module * | |
| eina_module_new(const char *file) EINA_MALLOC EINA_WARN_UNUSED_RESULT EINA
_ARG_NONNULL(1); | | eina_module_new(const char *file) EINA_MALLOC EINA_WARN_UNUSED_RESULT EINA
_ARG_NONNULL(1); | |
| | | | |
| /** | | /** | |
| * @brief Delete a module. | | * @brief Delete a module. | |
| * | | * | |
|
| * @param m The module to delete. | | * @param module The module to delete. | |
| * @return EINA_TRUE on success, EINA_FALSE otherwise. | | * @return EINA_TRUE on success, EINA_FALSE otherwise. | |
| * | | * | |
|
| * This function calls eina_module_unload() if @p m has been previously | | * This function calls eina_module_unload() if @p module has been previousl
y | |
| * loaded and frees the allocated memory. On success this function | | * loaded and frees the allocated memory. On success this function | |
|
| * returns EINA_TRUE and EINA_FALSE otherwise. If @p m is @c NULL, the | | * returns EINA_TRUE and EINA_FALSE otherwise. If @p module is @c NULL, the | |
| * function returns immediately. | | * function returns immediately. | |
| */ | | */ | |
| EAPI Eina_Bool | | EAPI Eina_Bool | |
|
| eina_module_free(Eina_Module *m) EINA_ARG_NONNULL(1); | | eina_module_free(Eina_Module *module) EINA_ARG_NONNULL(1); | |
| | | | |
| /** | | /** | |
| * @brief Load a module. | | * @brief Load a module. | |
| * | | * | |
|
| * @param m The module to load. | | * @param module The module to load. | |
| * @return EINA_TRUE on success, EINA_FALSE otherwise. | | * @return EINA_TRUE on success, EINA_FALSE otherwise. | |
| * | | * | |
| * This function load the shared file object passed in | | * This function load the shared file object passed in | |
| * eina_module_new(). If it is a internal Eina module (like the | | * eina_module_new(). If it is a internal Eina module (like the | |
| * mempools), it also initialize it. It the shared file object can not | | * mempools), it also initialize it. It the shared file object can not | |
| * be loaded, the error #EINA_ERROR_WRONG_MODULE is set and | | * be loaded, the error #EINA_ERROR_WRONG_MODULE is set and | |
| * #EINA_FALSE is returned. If it is a internal Eina module and the | | * #EINA_FALSE is returned. If it is a internal Eina module and the | |
| * module can not be initialized, the error | | * module can not be initialized, the error | |
| * #EINA_ERROR_MODULE_INIT_FAILED is set and #EINA_FALSE is | | * #EINA_ERROR_MODULE_INIT_FAILED is set and #EINA_FALSE is | |
| * returned. If the module has already been loaded, it's refeence | | * returned. If the module has already been loaded, it's refeence | |
|
| * counter is increased by one and #EINA_TRUE is returned. If @p m is | | * counter is increased by one and #EINA_TRUE is returned. If @p module is | |
| * @c NULL, the function returns immediately #EINA_FALSE. | | * @c NULL, the function returns immediately #EINA_FALSE. | |
| * | | * | |
| * When the symbols of the shared file objetcts are not needed | | * When the symbols of the shared file objetcts are not needed | |
| * anymore, call eina_module_unload() to unload the module. | | * anymore, call eina_module_unload() to unload the module. | |
| */ | | */ | |
| EAPI Eina_Bool | | EAPI Eina_Bool | |
| eina_module_load(Eina_Module *module) EINA_ARG_NONNULL(1); | | eina_module_load(Eina_Module *module) EINA_ARG_NONNULL(1); | |
| | | | |
| /** | | /** | |
| * @brief Unload a module. | | * @brief Unload a module. | |
| * | | * | |
|
| * @param m The module to load. | | * @param module The module to load. | |
| * @return EINA_TRUE on success, EINA_FALSE otherwise. | | * @return EINA_TRUE on success, EINA_FALSE otherwise. | |
| * | | * | |
|
| * This function unload the module @p m that has been previously | | * This function unload the module @p module that has been previously | |
| * loaded by eina_module_load(). If the reference counter of @p m is | | * loaded by eina_module_load(). If the reference counter of @p module is | |
| * strictly greater than @c 1, #EINA_FALSE is returned. Otherwise, the | | * strictly greater than @c 1, #EINA_FALSE is returned. Otherwise, the | |
| * shared object file is closed and if it is a internal Eina module, it | | * shared object file is closed and if it is a internal Eina module, it | |
| * is shutted down just before. In that case, #EINA_TRUE is | | * is shutted down just before. In that case, #EINA_TRUE is | |
|
| * returned. In all case, the reference counter is decreased. If @p m | | * returned. In all case, the reference counter is decreased. If @p module | |
| * is @c NULL, the function returns immediately #EINA_FALSE. | | * is @c NULL, the function returns immediately #EINA_FALSE. | |
| */ | | */ | |
| EAPI Eina_Bool | | EAPI Eina_Bool | |
|
| eina_module_unload(Eina_Module *m) EINA_ARG_NONNULL(1); | | eina_module_unload(Eina_Module *module) EINA_ARG_NONNULL(1); | |
| | | | |
| /** | | /** | |
| * @brief Retrive the data associated to a symbol. | | * @brief Retrive the data associated to a symbol. | |
| * | | * | |
|
| * @param m The module. | | * @param module The module. | |
| * @param symbol The symbol. | | * @param symbol The symbol. | |
| * @return The data associated to the symbol, or @c NULL on failure. | | * @return The data associated to the symbol, or @c NULL on failure. | |
| * | | * | |
|
| * This function returns the data associated to @p symbol of @p m. @p | | * This function returns the data associated to @p symbol of @p module. @p | |
| * m must have been loaded before with eina_module_load(). If @p m | | * module must have been loaded before with eina_module_load(). If @p modul | |
| | | e | |
| * is @c NULL, or if it has not been correctly loaded before, the | | * is @c NULL, or if it has not been correctly loaded before, the | |
| * function returns immediately @c NULL. | | * function returns immediately @c NULL. | |
| */ | | */ | |
| EAPI void * | | EAPI void * | |
| eina_module_symbol_get(const Eina_Module *module, const char *symbol) EINA
_PURE EINA_ARG_NONNULL(1, 2) EINA_WARN_UNUSED_RESULT; | | eina_module_symbol_get(const Eina_Module *module, const char *symbol) EINA
_PURE EINA_ARG_NONNULL(1, 2) EINA_WARN_UNUSED_RESULT; | |
| | | | |
| /** | | /** | |
| * @brief Return the file name associated to the module. | | * @brief Return the file name associated to the module. | |
| * | | * | |
|
| * @param m The module. | | * @param module The module. | |
| * @return The file name. | | * @return The file name. | |
| * | | * | |
| * This function returns the file name passed in eina_module_new(). If | | * This function returns the file name passed in eina_module_new(). If | |
|
| * @p m is @c NULL, the function returns immediately @c NULL. The | | * @p module is @c NULL, the function returns immediately @c NULL. The | |
| * returned value must no be freed. | | * returned value must no be freed. | |
| */ | | */ | |
| EAPI const char * | | EAPI const char * | |
|
| eina_module_file_get(const Eina_Module *m) EINA_PURE EINA_WARN_UNUSED_RESU
LT EINA_ARG_NONNULL(1); | | eina_module_file_get(const Eina_Module *module) EINA_PURE EINA_WARN_UNUSED
_RESULT EINA_ARG_NONNULL(1); | |
| | | | |
| /** | | /** | |
| * @brief Return the path built from the location of a library and a | | * @brief Return the path built from the location of a library and a | |
| * given sub directory. | | * given sub directory. | |
| * | | * | |
| * @param symbol The symbol to search for. | | * @param symbol The symbol to search for. | |
| * @param sub_dir The subdirectory to append. | | * @param sub_dir The subdirectory to append. | |
| * @return The built path on success, @c NULL otherwise. | | * @return The built path on success, @c NULL otherwise. | |
| * | | * | |
| * This function returns the path built by concatenating the path of | | * This function returns the path built by concatenating the path of | |
| | | | |
| skipping to change at line 257 | | skipping to change at line 261 | |
| */ | | */ | |
| EAPI char * | | EAPI char * | |
| eina_module_environment_path_get(const char *env, const char *sub_dir) EIN
A_PURE EINA_MALLOC EINA_ARG_NONNULL(1, 2); | | eina_module_environment_path_get(const char *env, const char *sub_dir) EIN
A_PURE EINA_MALLOC EINA_ARG_NONNULL(1, 2); | |
| | | | |
| /** | | /** | |
| * @brief Get an array of modules found on the directory path matching an a
rch type. | | * @brief Get an array of modules found on the directory path matching an a
rch type. | |
| * | | * | |
| * @param array The array that stores the list of the modules. | | * @param array The array that stores the list of the modules. | |
| * @param path The directory's path to search for modules. | | * @param path The directory's path to search for modules. | |
| * @param arch The architecture string. | | * @param arch The architecture string. | |
|
| | | * @return The array of modules found in @p path matching @p arch. | |
| * | | * | |
| * This function adds to @p array the module names found in @p path | | * This function adds to @p array the module names found in @p path | |
| * which match the cpu architecture @p arch. If @p path or @p arch is | | * which match the cpu architecture @p arch. If @p path or @p arch is | |
| * @c NULL, the function returns immediately @p array. @p array can be | | * @c NULL, the function returns immediately @p array. @p array can be | |
| * @c NULL. In that case, it is created with 4 elements. | | * @c NULL. In that case, it is created with 4 elements. | |
| */ | | */ | |
| EAPI Eina_Array * | | EAPI Eina_Array * | |
| eina_module_arch_list_get(Eina_Array *array, const char *path, const char
*arch); | | eina_module_arch_list_get(Eina_Array *array, const char *path, const char
*arch); | |
| | | | |
| /** | | /** | |
| * @brief Get a list of modules found on the directory path. | | * @brief Get a list of modules found on the directory path. | |
| * | | * | |
| * @param array The array that stores the list of the modules. | | * @param array The array that stores the list of the modules. | |
| * @param path The directory's path to search for modules. | | * @param path The directory's path to search for modules. | |
| * @param recursive Iterate recursively on the path. | | * @param recursive Iterate recursively on the path. | |
| * @param cb Callback function to call on each module. | | * @param cb Callback function to call on each module. | |
| * @param data Data passed to the callback function. | | * @param data Data passed to the callback function. | |
|
| | | * @return The array of modules found in @p path. | |
| * | | * | |
| * This function adds to @p array the list of modules found in | | * This function adds to @p array the list of modules found in | |
| * @p path. If @p recursive is #EINA_TRUE, then recursive search is | | * @p path. If @p recursive is #EINA_TRUE, then recursive search is | |
| * done. The callback @p cb is called on each module found, and @p data | | * done. The callback @p cb is called on each module found, and @p data | |
| * is passed to @p cb. If @p path is @c NULL, the function returns | | * is passed to @p cb. If @p path is @c NULL, the function returns | |
| * immediately @p array. If the returned value of @p cb is 0, the | | * immediately @p array. If the returned value of @p cb is 0, the | |
| * module will not be added to the list, otherwise it will be added. | | * module will not be added to the list, otherwise it will be added. | |
| * @p array can be @c NULL. In that case, it is created with 4 | | * @p array can be @c NULL. In that case, it is created with 4 | |
| * elements. @p cb can be @c NULL. | | * elements. @p cb can be @c NULL. | |
| */ | | */ | |
| | | | |
| skipping to change at line 296 | | skipping to change at line 302 | |
| | | | |
| /** | | /** | |
| * @brief Load every module on the list of modules. | | * @brief Load every module on the list of modules. | |
| * | | * | |
| * @param array The array of modules to load. | | * @param array The array of modules to load. | |
| * | | * | |
| * This function calls eina_module_load() on each element found in | | * This function calls eina_module_load() on each element found in | |
| * @p array. If @p array is @c NULL, this function does nothing. | | * @p array. If @p array is @c NULL, this function does nothing. | |
| */ | | */ | |
| EAPI void | | EAPI void | |
|
| eina_module_list_load(Eina_Array *list) EINA_ARG_NONNULL(1); | | eina_module_list_load(Eina_Array *array) EINA_ARG_NONNULL(1); | |
| | | | |
| /** | | /** | |
| * @brief Unload every module on the list of modules. | | * @brief Unload every module on the list of modules. | |
| * | | * | |
| * @param array The array of modules to unload. | | * @param array The array of modules to unload. | |
| * | | * | |
| * This function calls eina_module_unload() on each element found in | | * This function calls eina_module_unload() on each element found in | |
| * @p array. If @p array is @c NULL, this function does nothing. | | * @p array. If @p array is @c NULL, this function does nothing. | |
| */ | | */ | |
| EAPI void | | EAPI void | |
|
| eina_module_list_unload(Eina_Array *list) EINA_ARG_NONNULL(1); | | eina_module_list_unload(Eina_Array *array) EINA_ARG_NONNULL(1); | |
| | | | |
| /** | | /** | |
| * @p Free every module on the list of modules. | | * @p Free every module on the list of modules. | |
| * | | * | |
| * @param array The array of modules to free. | | * @param array The array of modules to free. | |
| * | | * | |
| * This function calls eina_module_free() on each element found in | | * This function calls eina_module_free() on each element found in | |
| * @p array. If @p array is @c NULL, this function does nothing. | | * @p array. If @p array is @c NULL, this function does nothing. | |
| */ | | */ | |
| EAPI void | | EAPI void | |
|
| eina_module_list_free(Eina_Array *list) EINA_ARG_NONNULL(1); | | eina_module_list_free(Eina_Array *array) EINA_ARG_NONNULL(1); | |
| | | | |
| /** | | /** | |
| * @brief Find an module in array. | | * @brief Find an module in array. | |
| * | | * | |
| * @param array The array to find the module. | | * @param array The array to find the module. | |
| * @param module The name of module to be searched. | | * @param module The name of module to be searched. | |
|
| | | * @return The module to find on success, @c NULL otherwise. | |
| * | | * | |
| * This function finds an @p module in @p array. | | * This function finds an @p module in @p array. | |
| * If the element is found the function returns the module, else | | * If the element is found the function returns the module, else | |
| * @c NULL is returned. | | * @c NULL is returned. | |
| */ | | */ | |
| EAPI Eina_Module * | | EAPI Eina_Module * | |
| eina_module_find(const Eina_Array *array, const char *module) EINA_ARG_NON
NULL(1, 2); | | eina_module_find(const Eina_Array *array, const char *module) EINA_ARG_NON
NULL(1, 2); | |
| | | | |
| /** | | /** | |
| * @} | | * @} | |
| | | | |
End of changes. 22 change blocks. |
| 20 lines changed or deleted | | 28 lines changed or added | |
|
| eina_simple_xml_parser.h | | eina_simple_xml_parser.h | |
| | | | |
| skipping to change at line 165 | | skipping to change at line 165 | |
| * @return EINA_TRUE on success or EINA_FALSE if it was aborted by user or | | * @return EINA_TRUE on success or EINA_FALSE if it was aborted by user or | |
| * parsing error. | | * parsing error. | |
| */ | | */ | |
| EAPI Eina_Bool eina_simple_xml_parse(const char *buf, unsigned buflen, | | EAPI Eina_Bool eina_simple_xml_parse(const char *buf, unsigned buflen, | |
| Eina_Bool strip, | | Eina_Bool strip, | |
| Eina_Simple_XML_Cb func, const void *da
ta); | | Eina_Simple_XML_Cb func, const void *da
ta); | |
| | | | |
| /** | | /** | |
| * Given the contents of a tag, find where the attributes start. | | * Given the contents of a tag, find where the attributes start. | |
| * | | * | |
|
| * The tag contents is returned by eina_simple_xml_parse() when | | * @param buf the input string. May not contain \0 terminator. | |
| * type is #EINA_SIMPLE_XML_OPEN or #EINA_SIMPLE_XML_OPEN_EMPTY. | | * @param buflen the input string size. | |
| * | | | |
| * @return pointer to the start of attributes, it can be used | | * @return pointer to the start of attributes, it can be used | |
| * to feed eina_simple_xml_attributes_parse(). NULL is returned | | * to feed eina_simple_xml_attributes_parse(). NULL is returned | |
| * if no attributes were found. | | * if no attributes were found. | |
|
| | | * | |
| | | * The tag contents is returned by eina_simple_xml_parse() when | |
| | | * type is #EINA_SIMPLE_XML_OPEN or #EINA_SIMPLE_XML_OPEN_EMPTY. | |
| | | * | |
| */ | | */ | |
| EAPI const char * eina_simple_xml_tag_attributes_find(const char *buf, unsi
gned buflen); | | EAPI const char * eina_simple_xml_tag_attributes_find(const char *buf, unsi
gned buflen); | |
| | | | |
| /** | | /** | |
| * Given a buffer with xml attributes, parse them to key=value pairs. | | * Given a buffer with xml attributes, parse them to key=value pairs. | |
| * | | * | |
| * @param buf the input string. May not contain \0 terminator. | | * @param buf the input string. May not contain \0 terminator. | |
| * @param buflen the input string size. | | * @param buflen the input string size. | |
| * @param func what to call back while parse to do some action. The | | * @param func what to call back while parse to do some action. The | |
| * first parameter is the given user @a data, the second is the | | * first parameter is the given user @a data, the second is the | |
| * key (null-terminated) and the last is the value (null | | * key (null-terminated) and the last is the value (null | |
| * terminated). These strings should not be modified and | | * terminated). These strings should not be modified and | |
| * reference is just valid until the function return. | | * reference is just valid until the function return. | |
|
| | | * @param data data to pass to the callback function. | |
| * | | * | |
| * @return EINA_TRUE on success or EINA_FALSE if it was aborted by user or | | * @return EINA_TRUE on success or EINA_FALSE if it was aborted by user or | |
| * parsing error. | | * parsing error. | |
| */ | | */ | |
| EAPI Eina_Bool eina_simple_xml_attributes_parse(const char *buf, unsigned b
uflen, | | EAPI Eina_Bool eina_simple_xml_attributes_parse(const char *buf, unsigned b
uflen, | |
| Eina_Simple_XML_Attribute_Cb
func, const void *data); | | Eina_Simple_XML_Attribute_Cb
func, const void *data); | |
| | | | |
| /** | | /** | |
| * Create (and append) new attribute to tag. | | * Create (and append) new attribute to tag. | |
| * | | * | |
| | | | |
| skipping to change at line 237 | | skipping to change at line 241 | |
| * | | * | |
| * @param tag to release memory. | | * @param tag to release memory. | |
| */ | | */ | |
| EAPI void eina_simple_xml_node_tag_free(Eina_Simple_XML_Node_Tag *tag); | | EAPI void eina_simple_xml_node_tag_free(Eina_Simple_XML_Node_Tag *tag); | |
| | | | |
| /** | | /** | |
| * Create new data. If parent is provided, it is automatically appended. | | * Create new data. If parent is provided, it is automatically appended. | |
| * | | * | |
| * @param parent if provided, will be set in the resulting structure | | * @param parent if provided, will be set in the resulting structure | |
| * as well as the data will be appended to children list. | | * as well as the data will be appended to children list. | |
|
| * @param content string to be used. Must not be NULL. | | * @param contents string to be used. Must not be NULL. | |
| * @param length size in bytes of @a content. | | * @param length size in bytes of @a contents. | |
| * | | * | |
| * @return newly allocated memory or NULL on error. This memory should be | | * @return newly allocated memory or NULL on error. This memory should be | |
| * released with eina_simple_xml_node_data_free() or indirectly | | * released with eina_simple_xml_node_data_free() or indirectly | |
| * with eina_simple_xml_node_tag_free() of the parent. | | * with eina_simple_xml_node_tag_free() of the parent. | |
| */ | | */ | |
| EAPI Eina_Simple_XML_Node_Data * eina_simple_xml_node_data_new(Eina_Simple_
XML_Node_Tag *parent, const char *contents, size_t length); | | EAPI Eina_Simple_XML_Node_Data * eina_simple_xml_node_data_new(Eina_Simple_
XML_Node_Tag *parent, const char *contents, size_t length); | |
| | | | |
| /** | | /** | |
| * Remove data from parent and delete it. | | * Remove data from parent and delete it. | |
| * | | * | |
|
| * @param data to release memory. | | * @param node to release memory. | |
| */ | | */ | |
| EAPI void eina_simple_xml_node_data_free(Eina_Simple_XML_Node_Data *node); | | EAPI void eina_simple_xml_node_data_free(Eina_Simple_XML_Node_Data *node); | |
| | | | |
| /** | | /** | |
| * Create new cdata. If parent is provided, it is automatically appended. | | * Create new cdata. If parent is provided, it is automatically appended. | |
| * | | * | |
| * @param parent if provided, will be set in the resulting structure | | * @param parent if provided, will be set in the resulting structure | |
| * as well as the cdata will be appended to children list. | | * as well as the cdata will be appended to children list. | |
|
| * @param content string to be used. Must not be NULL. | | * @param contents string to be used. Must not be NULL. | |
| * @param length size in bytes of @a content. | | * @param length size in bytes of @a content. | |
| * | | * | |
| * @return newly allocated memory or NULL on error. This memory should be | | * @return newly allocated memory or NULL on error. This memory should be | |
| * released with eina_simple_xml_node_cdata_free() or indirectly | | * released with eina_simple_xml_node_cdata_free() or indirectly | |
| * with eina_simple_xml_node_tag_free() of the parent. | | * with eina_simple_xml_node_tag_free() of the parent. | |
| */ | | */ | |
| EAPI Eina_Simple_XML_Node_CData * eina_simple_xml_node_cdata_new(Eina_Simpl
e_XML_Node_Tag *parent, const char *contents, size_t length); | | EAPI Eina_Simple_XML_Node_CData * eina_simple_xml_node_cdata_new(Eina_Simpl
e_XML_Node_Tag *parent, const char *contents, size_t length); | |
| | | | |
| /** | | /** | |
| * Remove cdata from parent and delete it. | | * Remove cdata from parent and delete it. | |
| * | | * | |
|
| * @param cdata to release memory. | | * @param node to release memory. | |
| */ | | */ | |
| EAPI void eina_simple_xml_node_cdata_free(Eina_Simple_XML_Node_Data *node); | | EAPI void eina_simple_xml_node_cdata_free(Eina_Simple_XML_Node_Data *node); | |
| | | | |
| /** | | /** | |
| * Create new processing. If parent is provided, it is automatically append
ed. | | * Create new processing. If parent is provided, it is automatically append
ed. | |
| * | | * | |
| * @param parent if provided, will be set in the resulting structure | | * @param parent if provided, will be set in the resulting structure | |
| * as well as the processing will be appended to children list. | | * as well as the processing will be appended to children list. | |
|
| * @param content string to be used. Must not be NULL. | | * @param contents string to be used. Must not be NULL. | |
| * @param length size in bytes of @a content. | | * @param length size in bytes of @a contents. | |
| * | | * | |
| * @return newly allocated memory or NULL on error. This memory should be | | * @return newly allocated memory or NULL on error. This memory should be | |
| * released with eina_simple_xml_node_processing_free() or indirect
ly | | * released with eina_simple_xml_node_processing_free() or indirect
ly | |
| * with eina_simple_xml_node_tag_free() of the parent. | | * with eina_simple_xml_node_tag_free() of the parent. | |
| */ | | */ | |
| EAPI Eina_Simple_XML_Node_Processing * eina_simple_xml_node_processing_new(
Eina_Simple_XML_Node_Tag *parent, const char *contents, size_t length); | | EAPI Eina_Simple_XML_Node_Processing * eina_simple_xml_node_processing_new(
Eina_Simple_XML_Node_Tag *parent, const char *contents, size_t length); | |
| | | | |
| /** | | /** | |
| * Remove processing from parent and delete it. | | * Remove processing from parent and delete it. | |
| * | | * | |
|
| * @param processing to release memory. | | * @param node processing to release memory. | |
| */ | | */ | |
| EAPI void eina_simple_xml_node_processing_free(Eina_Simple_XML_Node_Data *n
ode); | | EAPI void eina_simple_xml_node_processing_free(Eina_Simple_XML_Node_Data *n
ode); | |
| | | | |
| /** | | /** | |
| * Create new doctype. If parent is provided, it is automatically appended. | | * Create new doctype. If parent is provided, it is automatically appended. | |
| * | | * | |
| * @param parent if provided, will be set in the resulting structure | | * @param parent if provided, will be set in the resulting structure | |
| * as well as the doctype will be appended to children list. | | * as well as the doctype will be appended to children list. | |
|
| * @param content string to be used. Must not be NULL. | | * @param contents string to be used. Must not be NULL. | |
| * @param length size in bytes of @a content. | | * @param length size in bytes of @a contents. | |
| * | | * | |
| * @return newly allocated memory or NULL on error. This memory should be | | * @return newly allocated memory or NULL on error. This memory should be | |
| * released with eina_simple_xml_node_doctype_free() or indirectly | | * released with eina_simple_xml_node_doctype_free() or indirectly | |
| * with eina_simple_xml_node_tag_free() of the parent. | | * with eina_simple_xml_node_tag_free() of the parent. | |
| */ | | */ | |
| EAPI Eina_Simple_XML_Node_Doctype * eina_simple_xml_node_doctype_new(Eina_S
imple_XML_Node_Tag *parent, const char *contents, size_t length); | | EAPI Eina_Simple_XML_Node_Doctype * eina_simple_xml_node_doctype_new(Eina_S
imple_XML_Node_Tag *parent, const char *contents, size_t length); | |
| | | | |
| /** | | /** | |
| * Remove doctype from parent and delete it. | | * Remove doctype from parent and delete it. | |
| * | | * | |
|
| * @param doctype to release memory. | | * @param node doctype to release memory. | |
| */ | | */ | |
| EAPI void eina_simple_xml_node_doctype_free(Eina_Simple_XML_Node_Data *node
); | | EAPI void eina_simple_xml_node_doctype_free(Eina_Simple_XML_Node_Data *node
); | |
| | | | |
| /** | | /** | |
| * Create new comment. If parent is provided, it is automatically appended. | | * Create new comment. If parent is provided, it is automatically appended. | |
| * | | * | |
| * @param parent if provided, will be set in the resulting structure | | * @param parent if provided, will be set in the resulting structure | |
| * as well as the comment will be appended to children list. | | * as well as the comment will be appended to children list. | |
|
| * @param content string to be used. Must not be NULL. | | * @param contents string to be used. Must not be NULL. | |
| * @param length size in bytes of @a content. | | * @param length size in bytes of @a contents. | |
| * | | * | |
| * @return newly allocated memory or NULL on error. This memory should be | | * @return newly allocated memory or NULL on error. This memory should be | |
| * released with eina_simple_xml_node_comment_free() or indirectly | | * released with eina_simple_xml_node_comment_free() or indirectly | |
| * with eina_simple_xml_node_tag_free() of the parent. | | * with eina_simple_xml_node_tag_free() of the parent. | |
| */ | | */ | |
| EAPI Eina_Simple_XML_Node_Comment * eina_simple_xml_node_comment_new(Eina_S
imple_XML_Node_Tag *parent, const char *contents, size_t length); | | EAPI Eina_Simple_XML_Node_Comment * eina_simple_xml_node_comment_new(Eina_S
imple_XML_Node_Tag *parent, const char *contents, size_t length); | |
| | | | |
| /** | | /** | |
| * Remove comment from parent and delete it. | | * Remove comment from parent and delete it. | |
| * | | * | |
|
| * @param comment to release memory. | | * @param node comment to release memory. | |
| */ | | */ | |
| EAPI void eina_simple_xml_node_comment_free(Eina_Simple_XML_Node_Data *node
); | | EAPI void eina_simple_xml_node_comment_free(Eina_Simple_XML_Node_Data *node
); | |
| | | | |
| /** | | /** | |
| * Load a XML node tree based on the given string. | | * Load a XML node tree based on the given string. | |
| * | | * | |
| * @param buf the input string. May not contain \0 terminator. | | * @param buf the input string. May not contain \0 terminator. | |
| * @param buflen the input string size. | | * @param buflen the input string size. | |
| * @param strip whenever this parser should strip leading and trailing | | * @param strip whenever this parser should strip leading and trailing | |
| * whitespace. | | * whitespace. | |
| | | | |
| skipping to change at line 364 | | skipping to change at line 368 | |
| * @param root memory returned by eina_simple_xml_node_load() | | * @param root memory returned by eina_simple_xml_node_load() | |
| */ | | */ | |
| EAPI void eina_simple_xml_node_root_free(Eina_Simple_XML_Node_Root *root); | | EAPI void eina_simple_xml_node_root_free(Eina_Simple_XML_Node_Root *root); | |
| | | | |
| /** | | /** | |
| * Converts the node tree under the given element to a XML string. | | * Converts the node tree under the given element to a XML string. | |
| * | | * | |
| * @param node the base node to convert. | | * @param node the base node to convert. | |
| * @param indent indentation string, or NULL to disable it. | | * @param indent indentation string, or NULL to disable it. | |
| * | | * | |
|
| * @param NULL on errors or a newly allocated string on success. | | * @return NULL on errors or a newly allocated string on success. | |
| */ | | */ | |
| EAPI char * eina_simple_xml_node_dump(Eina_Simple_XML_Node *node, const cha
r *indent); | | EAPI char * eina_simple_xml_node_dump(Eina_Simple_XML_Node *node, const cha
r *indent); | |
| | | | |
| /** | | /** | |
| * @} | | * @} | |
| */ | | */ | |
| | | | |
| /** | | /** | |
| * @} | | * @} | |
| */ | | */ | |
| | | | |
End of changes. 14 change blocks. |
| 18 lines changed or deleted | | 22 lines changed or added | |
|
| eina_str.h | | eina_str.h | |
| | | | |
| skipping to change at line 163 | | skipping to change at line 163 | |
| * @return #EINA_TRUE if the string has the given extension, #EINA_FALSE ot
herwise. | | * @return #EINA_TRUE if the string has the given extension, #EINA_FALSE ot
herwise. | |
| * | | * | |
| * This function does the same as eina_str_has_suffix(), except it's case | | * This function does the same as eina_str_has_suffix(), except it's case | |
| * insensitive. | | * insensitive. | |
| */ | | */ | |
| EAPI Eina_Bool eina_str_has_extension(const char *str, const char *ex
t) EINA_PURE EINA_ARG_NONNULL(1, 2) EINA_WARN_UNUSED_RESULT; | | EAPI Eina_Bool eina_str_has_extension(const char *str, const char *ex
t) EINA_PURE EINA_ARG_NONNULL(1, 2) EINA_WARN_UNUSED_RESULT; | |
| | | | |
| /** | | /** | |
| * @brief Split a string using a delimiter. | | * @brief Split a string using a delimiter. | |
| * | | * | |
|
| * @param str The string to split. | | * @param string The string to split. | |
| * @param delim The string which specifies the places at which to split the | | * @param delimiter The string which specifies the places at which to split | |
| string. | | the string. | |
| * @param max_tokens The maximum number of strings to split string into. | | * @param max_tokens The maximum number of strings to split string into. | |
| * @return A newly-allocated NULL-terminated array of strings or NULL if it | | * @return A newly-allocated NULL-terminated array of strings or NULL if it | |
| * fails to allocate the array. | | * fails to allocate the array. | |
| * | | * | |
|
| * This functin splits @p str into a maximum of @p max_tokens pieces, | | * This functin splits @p string into a maximum of @p max_tokens pieces, | |
| * using the given delimiter @p delim. @p delim is not included in any | | * using the given delimiter @p delimiter. @p delimiter is not included in | |
| | | any | |
| * of the resulting strings, unless @p max_tokens is reached. If | | * of the resulting strings, unless @p max_tokens is reached. If | |
| * @p max_tokens is less than @c 1, the string is splitted completely. If | | * @p max_tokens is less than @c 1, the string is splitted completely. If | |
| * @p max_tokens is reached, the last string in the returned string | | * @p max_tokens is reached, the last string in the returned string | |
| * array contains the remainder of string. The returned value is a | | * array contains the remainder of string. The returned value is a | |
| * newly allocated NULL-terminated array of strings or NULL if it fails to | | * newly allocated NULL-terminated array of strings or NULL if it fails to | |
| * allocate the array. To free it, free the first element of the array and
the | | * allocate the array. To free it, free the first element of the array and
the | |
| * array itself. | | * array itself. | |
| * | | * | |
| * @note If you need the number of elements in the returned array see | | * @note If you need the number of elements in the returned array see | |
| * eina_str_split_full(). | | * eina_str_split_full(). | |
| */ | | */ | |
| EAPI char **eina_str_split(const char *string, const char *delimit
er, int max_tokens) EINA_ARG_NONNULL(1, 2) EINA_MALLOC EINA_WARN_UNUSED_RES
ULT; | | EAPI char **eina_str_split(const char *string, const char *delimit
er, int max_tokens) EINA_ARG_NONNULL(1, 2) EINA_MALLOC EINA_WARN_UNUSED_RES
ULT; | |
| | | | |
| /** | | /** | |
| * @brief Split a string using a delimiter and returns number of elements. | | * @brief Split a string using a delimiter and returns number of elements. | |
| * | | * | |
|
| * @param str The string to split. | | * @param string The string to split. | |
| * @param delim The string which specifies the places at which to split the | | * @param delimiter The string which specifies the places at which to split | |
| string. | | the string. | |
| * @param max_tokens The maximum number of strings to split string into. | | * @param max_tokens The maximum number of strings to split string into. | |
| * @param elements Where to return the number of elements in returned | | * @param elements Where to return the number of elements in returned | |
| * array (not counting the terminating @c NULL). May be @c NULL. | | * array (not counting the terminating @c NULL). May be @c NULL. | |
| * @return A newly-allocated NULL-terminated array of strings or NULL if it | | * @return A newly-allocated NULL-terminated array of strings or NULL if it | |
| * fails to allocate the array. | | * fails to allocate the array. | |
| * | | * | |
|
| * This function splits @p str into a maximum of @p max_tokens pieces, | | * This function splits @p string into a maximum of @p max_tokens pieces, | |
| * using the given delimiter @p delim. @p delim is not included in any | | * using the given delimiter @p delimiter. @p delimiter is not included in | |
| | | any | |
| * of the resulting strings, unless @p max_tokens is reached. If | | * of the resulting strings, unless @p max_tokens is reached. If | |
| * @p max_tokens is less than @c 1, the string is splitted completely. If | | * @p max_tokens is less than @c 1, the string is splitted completely. If | |
| * @p max_tokens is reached, the last string in the returned string | | * @p max_tokens is reached, the last string in the returned string | |
| * array contains the remainder of string. The returned value is a | | * array contains the remainder of string. The returned value is a | |
| * newly allocated NULL-terminated array of strings or NULL if it fails to | | * newly allocated NULL-terminated array of strings or NULL if it fails to | |
| * allocate the array. To free it, free the first element of the array and
the | | * allocate the array. To free it, free the first element of the array and
the | |
| * array itself. | | * array itself. | |
| * | | * | |
| * @see eina_str_split() | | * @see eina_str_split() | |
| */ | | */ | |
| | | | |
End of changes. 4 change blocks. |
| 10 lines changed or deleted | | 12 lines changed or added | |
|
| eina_unicode.h | | eina_unicode.h | |
| | | | |
| skipping to change at line 68 | | skipping to change at line 68 | |
| * @return Number of characters or n. | | * @return Number of characters or n. | |
| */ | | */ | |
| EAPI size_t eina_unicode_strnlen(const Eina_Unicode *ustr, int n) EI
NA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT EINA_PURE; | | EAPI size_t eina_unicode_strnlen(const Eina_Unicode *ustr, int n) EI
NA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT EINA_PURE; | |
| | | | |
| /** | | /** | |
| * @brief Same as the standard strdup just with Eina_Unicode instead of cha
r. | | * @brief Same as the standard strdup just with Eina_Unicode instead of cha
r. | |
| */ | | */ | |
| 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; | |
| | | | |
| /** | | /** | |
|
| * @brief Same as strdup but cuts on n. Assumes n < len | | * @brief Same as strdup but cuts on the given size. Assumes n < len | |
| | | * | |
| | | * @param text The text to duplicate. | |
| | | * @param n The maximum size of the text to duplicate. | |
| | | * @return The duplicated string. | |
| | | * | |
| | | * This function duplicates @p text. The resuting string is cut on @p | |
| | | * n. @p n is assumed to be lesser (<) than the length of @t | |
| | | * text. When not needed anymore, the returned string must be freed. | |
| | | * | |
| * @since 1.1.0 | | * @since 1.1.0 | |
| */ | | */ | |
| EAPI Eina_Unicode *eina_unicode_strndup(const Eina_Unicode *text, size_t n)
EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC; | | EAPI Eina_Unicode *eina_unicode_strndup(const Eina_Unicode *text, size_t n)
EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC; | |
| | | | |
| /** | | /** | |
| * @brief Same as the standard strcmp just with Eina_Unicode instead of cha
r. | | * @brief Same as the standard strcmp just with Eina_Unicode instead of cha
r. | |
| */ | | */ | |
| EAPI int eina_unicode_strcmp(const Eina_Unicode *a, const Eina_Un
icode *b) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2) EINA_PURE; | | EAPI int eina_unicode_strcmp(const Eina_Unicode *a, const Eina_Un
icode *b) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2) EINA_PURE; | |
| | | | |
| /** | | /** | |
| | | | |
| skipping to change at line 101 | | skipping to change at line 110 | |
| EAPI Eina_Unicode *eina_unicode_strncpy(Eina_Unicode *dest, const Eina_Unic
ode *source, size_t n) EINA_ARG_NONNULL(1, 2); | | EAPI Eina_Unicode *eina_unicode_strncpy(Eina_Unicode *dest, const Eina_Unic
ode *source, size_t n) EINA_ARG_NONNULL(1, 2); | |
| | | | |
| /** | | /** | |
| * @see eina_str_escape() | | * @see eina_str_escape() | |
| */ | | */ | |
| EAPI Eina_Unicode *eina_unicode_escape(const Eina_Unicode *str) EINA_ARG_NO
NNULL(1) EINA_MALLOC EINA_WARN_UNUSED_RESULT; | | EAPI Eina_Unicode *eina_unicode_escape(const Eina_Unicode *str) EINA_ARG_NO
NNULL(1) EINA_MALLOC EINA_WARN_UNUSED_RESULT; | |
| | | | |
| /* UTF-8 Handling */ | | /* UTF-8 Handling */ | |
| | | | |
| /** | | /** | |
|
| * Reads UTF8 bytes from @buf, starting at *@index and returns | | * Reads UTF8 bytes from @p buf, starting at @p iindex and returns | |
| * the decoded code point at iindex offset, and advances iindex | | * the decoded code point at @p iindex offset, and advances @p iindex | |
| * to the next code point after this. iindex is always advanced, | | * to the next code point after this. @p iindex is always advanced, | |
| * unless if the advancement is after the NULL. | | * unless if the advancement is after the NULL. | |
| * On error: return a codepoint between DC80 to DCFF where the low 8 bits | | * On error: return a codepoint between DC80 to DCFF where the low 8 bits | |
| * are the byte's value. | | * are the byte's value. | |
| * | | * | |
| * @param buf the string | | * @param buf the string | |
| * @param iindex the index to look at and return by. | | * @param iindex the index to look at and return by. | |
| * @return the codepoint found. | | * @return the codepoint found. | |
| * @since 1.1.0 | | * @since 1.1.0 | |
| */ | | */ | |
| EAPI Eina_Unicode eina_unicode_utf8_get_next(const char *buf, int *iindex)
EINA_ARG_NONNULL(1, 2); | | EAPI Eina_Unicode eina_unicode_utf8_get_next(const char *buf, int *iindex)
EINA_ARG_NONNULL(1, 2); | |
| | | | |
| /** | | /** | |
|
| * Reads UTF8 bytes from @buf, starting at *@iindex and returns | | * Reads UTF8 bytes from @p buf, starting at @p iindex and returns | |
| * the decoded code point at iindex offset, and moves iindex | | * the decoded code point at @p iindex offset, and moves àp iindex | |
| * to the previous code point. iindex is always moved, as long | | * to the previous code point. @p iindex is always moved, as long | |
| * as it's not past the start of the string. | | * as it's not past the start of the string. | |
| * On error: return a codepoint between DC80 to DCFF where the low 8 bits | | * On error: return a codepoint between DC80 to DCFF where the low 8 bits | |
| * are the byte's value. | | * are the byte's value. | |
| * | | * | |
| * @param buf the string | | * @param buf the string | |
| * @param iindex the index to look at and return by. | | * @param iindex the index to look at and return by. | |
| * @return the codepoint found. | | * @return the codepoint found. | |
| * @since 1.1.0 | | * @since 1.1.0 | |
| */ | | */ | |
| EAPI Eina_Unicode eina_unicode_utf8_get_prev(const char *buf, int *iindex)
EINA_ARG_NONNULL(1, 2); | | EAPI Eina_Unicode eina_unicode_utf8_get_prev(const char *buf, int *iindex)
EINA_ARG_NONNULL(1, 2); | |
| | | | |
End of changes. 3 change blocks. |
| 7 lines changed or deleted | | 16 lines changed or added | |
|
| eina_xattr.h | | eina_xattr.h | |
| | | | |
| skipping to change at line 59 | | skipping to change at line 59 | |
| * if you need. | | * if you need. | |
| * | | * | |
| * @since 1.1 | | * @since 1.1 | |
| */ | | */ | |
| EAPI Eina_Iterator *eina_xattr_ls(const char *file); | | EAPI Eina_Iterator *eina_xattr_ls(const char *file); | |
| | | | |
| /** | | /** | |
| * @brief Retrieve an extended attribute from a file. | | * @brief Retrieve an extended attribute from a file. | |
| * | | * | |
| * @param file The file to retrieve the extended attribute from. | | * @param file The file to retrieve the extended attribute from. | |
|
| * @param atttribute The extended attribute name to retrieve. | | * @param attribute The extended attribute name to retrieve. | |
| * @param size The size of the retrieved extended attribute. | | * @param size The size of the retrieved extended attribute. | |
| * @return the allocated data that hold the extended attribute value. | | * @return the allocated data that hold the extended attribute value. | |
| * | | * | |
| * It will return NULL and *size will be @c 0 if it fails. | | * It will return NULL and *size will be @c 0 if it fails. | |
| * | | * | |
| * @since 1.1 | | * @since 1.1 | |
| */ | | */ | |
| EAPI void *eina_xattr_get(const char *file, const char *attribute, ssize_t
*size); | | EAPI void *eina_xattr_get(const char *file, const char *attribute, ssize_t
*size); | |
| | | | |
| /** | | /** | |
| | | | |
| skipping to change at line 114 | | skipping to change at line 114 | |
| * | | * | |
| * @since 1.1 | | * @since 1.1 | |
| */ | | */ | |
| EAPI char *eina_xattr_string_get(const char *file, const char *attribute); | | EAPI char *eina_xattr_string_get(const char *file, const char *attribute); | |
| | | | |
| /** | | /** | |
| * @brief Set a double as a extended attribute properties. | | * @brief Set a double as a extended attribute properties. | |
| * | | * | |
| * @param file The file to set the double to. | | * @param file The file to set the double to. | |
| * @param attribute The attribute to set. | | * @param attribute The attribute to set. | |
|
| * @param data The NULL terminated double to set. | | * @param value The NULL terminated double to set. | |
| * @param flags Define the set policy. | | * @param flags Define the set policy. | |
| * @return EINA_TRUE on success, EINA_FALSE otherwise. | | * @return EINA_TRUE on success, EINA_FALSE otherwise. | |
| * | | * | |
| * @since 1.1 | | * @since 1.1 | |
| */ | | */ | |
| EAPI Eina_Bool eina_xattr_double_set(const char *file, const char *attribut
e, double value, Eina_Xattr_Flags flags); | | EAPI Eina_Bool eina_xattr_double_set(const char *file, const char *attribut
e, double value, Eina_Xattr_Flags flags); | |
| | | | |
| /** | | /** | |
| * @brief Get a double from an extended attribute properties. | | * @brief Get a double from an extended attribute properties. | |
| * | | * | |
| | | | |
| skipping to change at line 141 | | skipping to change at line 141 | |
| * | | * | |
| * @since 1.1 | | * @since 1.1 | |
| */ | | */ | |
| EAPI Eina_Bool eina_xattr_double_get(const char *file, const char *attribut
e, double *value); | | EAPI Eina_Bool eina_xattr_double_get(const char *file, const char *attribut
e, double *value); | |
| | | | |
| /** | | /** | |
| * @brief Set an int as a extended attribute properties. | | * @brief Set an int as a extended attribute properties. | |
| * | | * | |
| * @param file The file to set the int to. | | * @param file The file to set the int to. | |
| * @param attribute The attribute to set. | | * @param attribute The attribute to set. | |
|
| * @param data The NULL terminated int to set. | | * @param value The NULL terminated int to set. | |
| * @param flags Define the set policy. | | * @param flags Define the set policy. | |
| * @return EINA_TRUE on success, EINA_FALSE otherwise. | | * @return EINA_TRUE on success, EINA_FALSE otherwise. | |
| * | | * | |
| * @since 1.1 | | * @since 1.1 | |
| */ | | */ | |
| EAPI Eina_Bool eina_xattr_int_set(const char *file, const char *attribute,
int value, Eina_Xattr_Flags flags); | | EAPI Eina_Bool eina_xattr_int_set(const char *file, const char *attribute,
int value, Eina_Xattr_Flags flags); | |
| | | | |
| /** | | /** | |
| * @brief Get a int from an extended attribute properties. | | * @brief Get a int from an extended attribute properties. | |
| * | | * | |
| | | | |
End of changes. 3 change blocks. |
| 3 lines changed or deleted | | 3 lines changed or added | |
|