| eina_array.h | | eina_array.h | |
| | | | |
| skipping to change at line 254 | | skipping to change at line 254 | |
| * @brief Create a new array. | | * @brief Create a new array. | |
| * | | * | |
| * @param step The count of pointers to add when increasing the array size. | | * @param step The count of pointers to add when increasing the array size. | |
| * @return @c NULL on failure, non @c NULL otherwise. | | * @return @c NULL on failure, non @c NULL otherwise. | |
| * | | * | |
| * This function creates a new array. When adding an element, the array | | * This function creates a new array. When adding an element, the array | |
| * allocates @p step elements. When that buffer is full, then adding | | * allocates @p step elements. When that buffer is full, then adding | |
| * another element will increase the buffer by @p step elements again. | | * another element will increase the buffer by @p step elements again. | |
| * | | * | |
| * This function return a valid array on success, or @c NULL if memory | | * This function return a valid array on success, or @c NULL if memory | |
|
| * allocation fails. In that case, the error is set to | | * allocation fails. In that case, the error is set | |
| * #EINA_ERROR_OUT_OF_MEMORY. | | * to #EINA_ERROR_OUT_OF_MEMORY. | |
| */ | | */ | |
| EAPI Eina_Array *eina_array_new(unsigned int step) EINA_WARN_UNUSED_RESULT
EINA_MALLOC EINA_WARN_UNUSED_RESULT; | | EAPI Eina_Array *eina_array_new(unsigned int step) EINA_WARN_UNUSED_RESULT
EINA_MALLOC EINA_WARN_UNUSED_RESULT; | |
| | | | |
| /** | | /** | |
| * @brief Free an array. | | * @brief Free an array. | |
| * | | * | |
| * @param array The array to free. | | * @param array The array to free. | |
| * | | * | |
| * This function frees @p array. It calls first eina_array_flush() then | | * This function frees @p array. It calls first eina_array_flush() then | |
| * free the memory of the pointer. It does not free the memory | | * free the memory of the pointer. It does not free the memory | |
|
| * allocated for the elements of @p array. To free them, use | | * allocated for the elements of @p array. To free them, | |
| * #EINA_ARRAY_ITER_NEXT. For performance reasons, there is no check | | * use #EINA_ARRAY_ITER_NEXT. For performance reasons, there is no check | |
| * of @p array. | | * of @p array. | |
| */ | | */ | |
| EAPI void eina_array_free(Eina_Array *array) EINA_ARG_NONNULL(1); | | EAPI void eina_array_free(Eina_Array *array) EINA_ARG_NONNULL(1); | |
| | | | |
| /** | | /** | |
| * @brief Set the step of an array. | | * @brief Set the step of an array. | |
| * | | * | |
| * @param array The array. | | * @param array The array. | |
| * @param sizeof_eina_array Should be the value returned by sizeof(Eina_Arr
ay). | | * @param sizeof_eina_array Should be the value returned by sizeof(Eina_Arr
ay). | |
| * @param step The count of pointers to add when increasing the array size. | | * @param step The count of pointers to add when increasing the array size. | |
| | | | |
| skipping to change at line 318 | | skipping to change at line 318 | |
| * program may crash. | | * program may crash. | |
| */ | | */ | |
| EAPI void eina_array_flush(Eina_Array *array) EINA_ARG_NONNULL(1); | | EAPI void eina_array_flush(Eina_Array *array) EINA_ARG_NONNULL(1); | |
| | | | |
| /** | | /** | |
| * @brief Rebuild an array by specifying the data to keep. | | * @brief Rebuild an array by specifying the data to keep. | |
| * | | * | |
| * @param array The array. | | * @param array The array. | |
| * @param keep The functions which selects the data to keep. | | * @param keep The functions which selects the data to keep. | |
| * @param gdata The data to pass to the function keep. | | * @param gdata The data to pass to the function keep. | |
|
| * @return #EINA_TRUE on success, #EINA_FALSE oterwise. | | * @return #EINA_TRUE on success, #EINA_FALSE otherwise. | |
| * | | * | |
| * This function rebuilds @p array be specifying the elements to keep with
the | | * This function rebuilds @p array be specifying the elements to keep with
the | |
| * function @p keep. No empty/invalid fields are left in the array. @p gdat
a is | | * function @p keep. No empty/invalid fields are left in the array. @p gdat
a is | |
| * an additional data to pass to @p keep. For performance reasons, there is
no | | * an additional data to pass to @p keep. For performance reasons, there is
no | |
| * check of @p array. If it is @c NULL or invalid, the program may crash. | | * check of @p array. If it is @c NULL or invalid, the program may crash. | |
| * | | * | |
| * If it wasn't able to remove items due to an allocation failure, it will | | * If it wasn't able to remove items due to an allocation failure, it will | |
| * return #EINA_FALSE and the error is set to #EINA_ERROR_OUT_OF_MEMORY. | | * return #EINA_FALSE and the error is set to #EINA_ERROR_OUT_OF_MEMORY. | |
| */ | | */ | |
| EAPI Eina_Bool eina_array_remove(Eina_Array * array, | | EAPI Eina_Bool eina_array_remove(Eina_Array * array, | |
| | | | |
| skipping to change at line 363 | | skipping to change at line 363 | |
| static inline unsigned int eina_array_count(const Eina_Array *array) EINA_A
RG_NONNULL(1) EINA_WARN_UNUSED_RESULT; | | static inline unsigned int eina_array_count(const Eina_Array *array) EINA_A
RG_NONNULL(1) EINA_WARN_UNUSED_RESULT; | |
| | | | |
| /** | | /** | |
| * @brief Returned a new iterator associated to an array. | | * @brief Returned a new iterator associated to an array. | |
| * | | * | |
| * @param array The array. | | * @param array The array. | |
| * @return A new iterator. | | * @return A new iterator. | |
| * | | * | |
| * This function returns a newly allocated iterator associated to | | * This function returns a newly allocated iterator associated to | |
| * @p array. If @p array is @c NULL or the count member of @p array is | | * @p array. If @p array is @c NULL or the count member of @p array is | |
|
| * less or equal than 0, this function returns NULL. If the memory can | | * less or equal than 0, this function returns @c NULL. If the memory can | |
| * not be allocated, NULL is returned and #EINA_ERROR_OUT_OF_MEMORY is | | * not be allocated, NULL is returned and #EINA_ERROR_OUT_OF_MEMORY is | |
| * set. Otherwise, a valid iterator is returned. | | * set. Otherwise, a valid iterator is returned. | |
| */ | | */ | |
| EAPI Eina_Iterator *eina_array_iterator_new(const Eina_Array *array)
EINA_MALLOC EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT; | | EAPI Eina_Iterator *eina_array_iterator_new(const Eina_Array *array)
EINA_MALLOC EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT; | |
| | | | |
| /** | | /** | |
| * @brief Returned a new accessor associated to an array. | | * @brief Returned a new accessor associated to an array. | |
| * | | * | |
| * @param array The array. | | * @param array The array. | |
| * @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 array. If @p array is @c NULL or the count member of @p array is | | * @p array. If @p array is @c NULL or the count member of @p array is | |
|
| * less or equal than 0, this function returns NULL. If the memory can | | * less or equal than 0, this function returns @c NULL. If the memory can | |
| * not be allocated, NULL is returned and #EINA_ERROR_OUT_OF_MEMORY is | | * 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_array_accessor_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; | |
| /** | | /** | |
| * @brief Provide a safe way to iterate over an array | | * @brief Provide a safe way to iterate over an array | |
| * | | * | |
| * @param array The array to iterate over. | | * @param array The array to iterate over. | |
| * @param cb The callback to call for each item. | | * @param cb The callback to call for each item. | |
| * @param fdata The user data to pass to the callback. | | * @param fdata The user data to pass to the callback. | |
|
| * @return EINA_TRUE if it successfully iterate all items of the array. | | * @return #EINA_TRUE if it successfully iterate all items of the array. | |
| * | | * | |
| * This function provide a safe way to iterate over an array. @p cb should | | * This function provide a safe way to iterate over an array. @p cb should | |
|
| * return EINA_TRUE as long as you want the function to continue iterating, | | * return #EINA_TRUE as long as you want the function to continue iterating | |
| * by returning EINA_FALSE it will stop and return EINA_FALSE as a result. | | , | |
| | | * by returning #EINA_FALSE it will stop and return #EINA_FALSE as a result | |
| | | . | |
| */ | | */ | |
| static inline Eina_Bool eina_array_foreach(Eina_Array *array, | | static inline Eina_Bool eina_array_foreach(Eina_Array *array, | |
| Eina_Each_Cb cb, | | Eina_Each_Cb cb, | |
| void *fdata); | | void *fdata); | |
| /** | | /** | |
| * @def EINA_ARRAY_ITER_NEXT | | * @def EINA_ARRAY_ITER_NEXT | |
| * @brief Macro to iterate over an array easily. | | * @brief Macro to iterate over an array easily. | |
| * | | * | |
| * @param array The array to iterate over. | | * @param array The array to iterate over. | |
| * @param index The integer number that is increased while itareting. | | * @param index The integer number that is increased while itareting. | |
| | | | |
End of changes. 7 change blocks. |
| 11 lines changed or deleted | | 13 lines changed or added | |
|
| eina_file.h | | eina_file.h | |
| | | | |
| skipping to change at line 210 | | skipping to change at line 210 | |
| /** | | /** | |
| * @brief List all files on the directory calling the function for every fi
le found. | | * @brief List all files on the directory calling the function for every fi
le found. | |
| * | | * | |
| * @param dir The directory name. | | * @param dir The directory name. | |
| * @param recursive Iterate recursively in the directory. | | * @param recursive Iterate recursively in the directory. | |
| * @param cb The callback to be called. | | * @param cb The callback to be called. | |
| * @param data The data to pass to the callback. | | * @param data The data to pass to the callback. | |
| * @return #EINA_TRUE on success, #EINA_FALSE otherwise. | | * @return #EINA_TRUE on success, #EINA_FALSE otherwise. | |
| * | | * | |
| * This function calls @p cb for each file that is in @p dir. To have @p cb | | * This function calls @p cb for each file that is in @p dir. To have @p cb | |
|
| * called on files that are in subdirectories of @p dir @p recursive should | | * called on files that are in subdirectories of @p dir @p recursive should | |
| be | | * be #EINA_TRUE. In other words if @p recursive is #EINA_FALSE, only direc | |
| * EINA_TRUE. In other words if @p recursive is EINA_FALSE, only direct chi | | t children | |
| ldren | | * of @p dir will be operated on, if @p recursive is #EINA_TRUE the entire | |
| * of @p dir will be operated on, if @p recursive is EINA_TRUE the entire t | | tree | |
| ree | | | |
| * of files that is below @p dir will be operated on. | | * of files that is below @p dir will be operated on. | |
| * | | * | |
| * If @p cb or @p dir are @c NULL, or if @p dir is a string of size 0, | | * If @p cb or @p dir are @c NULL, or if @p dir is a string of size 0, | |
| * or if @p dir can not be opened, this function returns #EINA_FALSE | | * or if @p dir can not be opened, this function returns #EINA_FALSE | |
| * immediately. otherwise, it returns #EINA_TRUE. | | * immediately. otherwise, it returns #EINA_TRUE. | |
| */ | | */ | |
| EAPI Eina_Bool eina_file_dir_list(const char *dir, | | EAPI Eina_Bool eina_file_dir_list(const char *dir, | |
| Eina_Bool recursive, | | Eina_Bool recursive, | |
| Eina_File_Dir_List_Cb cb, | | Eina_File_Dir_List_Cb cb, | |
| void *data) EINA_ARG_NONN
ULL(1, 3); | | void *data) EINA_ARG_NONN
ULL(1, 3); | |
| | | | |
| skipping to change at line 242 | | skipping to change at line 242 | |
| * created, @c NULL is returned, otherwise, an array with each part of @p p
ath | | * created, @c NULL is returned, otherwise, an array with each part of @p p
ath | |
| * is returned. | | * is returned. | |
| */ | | */ | |
| EAPI Eina_Array *eina_file_split(char *path) EINA_WARN_UNUSED_RESULT EIN
A_ARG_NONNULL(1) EINA_MALLOC; | | EAPI Eina_Array *eina_file_split(char *path) EINA_WARN_UNUSED_RESULT EIN
A_ARG_NONNULL(1) EINA_MALLOC; | |
| | | | |
| /** | | /** | |
| * @brief Get an iterator to list the content of a directory. | | * @brief Get an iterator to list the content of a directory. | |
| * | | * | |
| * @param dir The name of the directory to list | | * @param dir The name of the directory to list | |
| * @return Return an Eina_Iterator that will walk over the files and direct
ories | | * @return Return an Eina_Iterator that will walk over the files and direct
ories | |
|
| * in @p dir. On failure it will return NULL. | | * in @p dir. On failure it will return @c NULL. | |
| * | | * | |
| * Returns an iterator for shared strings, the name of each file in @p dir
will | | * Returns an iterator for shared strings, the name of each file in @p dir
will | |
| * only be fetched when advancing the iterator, which means there is very l
ittle | | * only be fetched when advancing the iterator, which means there is very l
ittle | |
| * cost associated with creating the list and stopping halfway through it. | | * cost associated with creating the list and stopping halfway through it. | |
| * | | * | |
| * @warning The iterator will hand the user a stringshared value with the f
ull | | * @warning The iterator will hand the user a stringshared value with the f
ull | |
| * path. The user must free the string using eina_stringshare_del() on it. | | * path. The user must free the string using eina_stringshare_del() on it. | |
| * | | * | |
| * @note The container for the iterator is of type DIR*. | | * @note The container for the iterator is of type DIR*. | |
| * @note The iterator will walk over '.' and '..' without returning them. | | * @note The iterator will walk over '.' and '..' without returning them. | |
| | | | |
| skipping to change at line 294 | | skipping to change at line 294 | |
| */ | | */ | |
| EAPI Eina_Iterator *eina_file_stat_ls(const char *dir) EINA_WARN_UNUSED_RES
ULT EINA_ARG_NONNULL(1) EINA_MALLOC; | | EAPI Eina_Iterator *eina_file_stat_ls(const char *dir) EINA_WARN_UNUSED_RES
ULT EINA_ARG_NONNULL(1) EINA_MALLOC; | |
| | | | |
| /** | | /** | |
| * @brief Use information provided by Eina_Iterator of eina_file_stat_ls or
eina_file_direct_ls | | * @brief Use information provided by Eina_Iterator of eina_file_stat_ls or
eina_file_direct_ls | |
| * to call stat in the most efficient way on your system. | | * to call stat in the most efficient way on your system. | |
| * | | * | |
| * @param container The container returned by the Eina_Iterator using eina_
iterator_container_get(). | | * @param container The container returned by the Eina_Iterator using eina_
iterator_container_get(). | |
| * @param info The content of the current Eina_File_Direct_Info provided by
the Eina_Iterator | | * @param info The content of the current Eina_File_Direct_Info provided by
the Eina_Iterator | |
| * @param buf Where to put the result of the stat | | * @param buf Where to put the result of the stat | |
|
| * @return On success 0 is returned, On error -1 is returned and errno is s
et appropriately. | | * @return On success @c 0 is returned, On error @c -1 is returned and errn
o is set appropriately. | |
| * | | * | |
| * This function calls fstatat or stat depending on what your system suppor
ts. This makes it efficient and simple | | * This function calls fstatat or stat depending on what your system suppor
ts. This makes it efficient and simple | |
| * to use on your side without complex detection already done inside Eina o
n what the system can do. | | * to use on your side without complex detection already done inside Eina o
n what the system can do. | |
| * | | * | |
| * @see eina_file_direct_ls() | | * @see eina_file_direct_ls() | |
| * @see eina_file_stat_ls() | | * @see eina_file_stat_ls() | |
| * @since 1.2 | | * @since 1.2 | |
| */ | | */ | |
| EAPI int eina_file_statat(void *container, Eina_File_Direct_Info *info, Ein
a_Stat *buf) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2, 3); | | EAPI int eina_file_statat(void *container, Eina_File_Direct_Info *info, Ein
a_Stat *buf) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2, 3); | |
| | | | |
| /** | | /** | |
| * @brief Get an iterator to list the content of a directory, with direct | | * @brief Get an iterator to list the content of a directory, with direct | |
| * information. | | * information. | |
| * | | * | |
| * @param dir The name of the directory to list | | * @param dir The name of the directory to list | |
| * | | * | |
| * @return Return an Eina_Iterator that will walk over the files and | | * @return Return an Eina_Iterator that will walk over the files and | |
| * directory in the pointed directory. On failure it will | | * directory in the pointed directory. On failure it will | |
|
| * return NULL. | | * return @c NULL. | |
| * | | * | |
| * Returns an iterator for Eina_File_Direct_Info, the name of each file in
@p | | * Returns an iterator for Eina_File_Direct_Info, the name of each file in
@p | |
| * dir will only be fetched when advancing the iterator, which means there
is | | * dir will only be fetched when advancing the iterator, which means there
is | |
| * cost associated with creating the list and stopping halfway through it. | | * cost associated with creating the list and stopping halfway through it. | |
| * | | * | |
| * @warning If readdir_r doesn't contain file type information file type wi
ll | | * @warning If readdir_r doesn't contain file type information file type wi
ll | |
| * be DT_UNKNOW. | | * be DT_UNKNOW. | |
| * @warning The Eina_File_Direct_Info returned by the iterator <b>must not<
/b> | | * @warning The Eina_File_Direct_Info returned by the iterator <b>must not<
/b> | |
| * be modified in any way. | | * be modified in any way. | |
| * @warning When the iterator is advanced or deleted the Eina_File_Direct_I
nfo | | * @warning When the iterator is advanced or deleted the Eina_File_Direct_I
nfo | |
| | | | |
| skipping to change at line 359 | | skipping to change at line 359 | |
| EAPI char *eina_file_path_sanitize(const char *path); | | EAPI char *eina_file_path_sanitize(const char *path); | |
| | | | |
| /** | | /** | |
| * @brief Get a read-only handler to a file. | | * @brief Get a read-only handler to a file. | |
| * | | * | |
| * @param name Filename to open | | * @param name Filename to open | |
| * @param shared Requested a shm | | * @param shared Requested a shm | |
| * @return Eina_File handle to the file | | * @return Eina_File handle to the file | |
| * | | * | |
| * Opens a file in read-only mode. @p name should be an absolute path. An | | * Opens a file in read-only mode. @p name should be an absolute path. An | |
|
| * Eina_File handle can be shared among multiple instances if @p shared is | | * Eina_File handle can be shared among multiple instances if @p shared | |
| * EINA_TRUE. | | * is #EINA_TRUE. | |
| * | | * | |
| * @since 1.1 | | * @since 1.1 | |
| */ | | */ | |
| EAPI Eina_File *eina_file_open(const char *name, Eina_Bool shared) EINA_WAR
N_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC; | | EAPI Eina_File *eina_file_open(const char *name, Eina_Bool shared) EINA_WAR
N_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC; | |
| | | | |
| /** | | /** | |
| * @brief Unref file handler. | | * @brief Unref file handler. | |
| * | | * | |
| * @param file File handler to unref. | | * @param file File handler to unref. | |
| * | | * | |
| | | | |
End of changes. 5 change blocks. |
| 11 lines changed or deleted | | 10 lines changed or added | |
|
| eina_hash.h | | eina_hash.h | |
| | | | |
| skipping to change at line 331 | | skipping to change at line 331 | |
| * @param key_length_cb The function called when getting the size of the ke
y. | | * @param key_length_cb The function called when getting the size of the ke
y. | |
| * @param key_cmp_cb The function called when comparing the keys. | | * @param key_cmp_cb The function called when comparing the keys. | |
| * @param key_hash_cb The function called when getting the values. | | * @param key_hash_cb The function called when getting the values. | |
| * @param data_free_cb The function called on each value when the hash tabl
e is | | * @param data_free_cb The function called on each value when the hash tabl
e is | |
| * freed, or when an item is deleted from it. @c NULL can be passed as | | * freed, or when an item is deleted from it. @c NULL can be passed as | |
| * callback. | | * callback. | |
| * @param buckets_power_size The size of the buckets. | | * @param buckets_power_size The size of the buckets. | |
| * @return The new hash table. | | * @return The new hash table. | |
| * | | * | |
| * This function creates a new hash table using user-defined callbacks | | * This function creates a new hash table using user-defined callbacks | |
|
| * to manage the hash table. On failure, @c NULL is returned and | | * to manage the hash table. On failure, @c NULL is returned | |
| * #EINA_ERROR_OUT_OF_MEMORY is set. If @p key_cmp_cb or @p key_hash_cb | | * and #EINA_ERROR_OUT_OF_MEMORY is set. If @p key_cmp_cb or @p key_hash_cb | |
| * are @c NULL, @c NULL is returned. If @p buckets_power_size is | | * are @c NULL, @c NULL is returned. If @p buckets_power_size is | |
| * smaller or equal than 2, or if it is greater or equal than 17, | | * smaller or equal than 2, or if it is greater or equal than 17, | |
| * @c NULL is returned. | | * @c NULL is returned. | |
| * | | * | |
| * The number of buckets created will be 2 ^ @p buckets_power_size. This me
ans | | * The number of buckets created will be 2 ^ @p buckets_power_size. This me
ans | |
| * that if @p buckets_power_size is 5, there will be created 32 buckets. fo
r a | | * that if @p buckets_power_size is 5, there will be created 32 buckets. fo
r a | |
| * @p buckets_power_size of 8, there will be 256 buckets. | | * @p buckets_power_size of 8, there will be 256 buckets. | |
| * | | * | |
| * Pre-defined functions are available to create a hash table. See | | * Pre-defined functions are available to create a hash table. See | |
| * eina_hash_string_djb2_new(), eina_hash_string_superfast_new(), | | * eina_hash_string_djb2_new(), eina_hash_string_superfast_new(), | |
| | | | |
| skipping to change at line 563 | | skipping to change at line 563 | |
| * hash table. | | * hash table. | |
| * | | * | |
| * @param hash The given hash table. | | * @param hash The given hash table. | |
| * @param key The key. | | * @param key The key. | |
| * @param data The data pointer to remove if the key is @c NULL. | | * @param data The data pointer to remove if the key is @c NULL. | |
| * @return #EINA_FALSE if an error occurred, #EINA_TRUE otherwise. | | * @return #EINA_FALSE if an error occurred, #EINA_TRUE otherwise. | |
| * | | * | |
| * This function removes the entry identified by @p key or @p data | | * This function removes the entry identified by @p key or @p data | |
| * from @p hash. If a free function was given to the | | * from @p hash. If a free function was given to the | |
| * callback on creation, it will be called for the data being | | * callback on creation, it will be called for the data being | |
|
| * deleted. If @p hash is @c NULL, the functions returns immediately | | * deleted. If @p hash is @c NULL, the functions returns immediately #EINA_ | |
| * #EINA_FALSE. If @p key is @c NULL, then @p data is used to find the a | | FALSE. | |
| | | * If @p key is @c NULL, then @p data is used to find the a | |
| * match to remove, otherwise @p key is used and @p data is not | | * match to remove, otherwise @p key is used and @p data is not | |
| * required and can be @c NULL. This function returns #EINA_FALSE if | | * required and can be @c NULL. This function returns #EINA_FALSE if | |
| * an error occurred, #EINA_TRUE otherwise. | | * an error occurred, #EINA_TRUE otherwise. | |
| * | | * | |
| * @note if you know you already have the key, use | | * @note if you know you already have the key, use | |
| * eina_hash_del_by_key() or eina_hash_del_by_key_hash(). If you | | * eina_hash_del_by_key() or eina_hash_del_by_key_hash(). If you | |
| * know you don't have the key, use eina_hash_del_by_data() | | * know you don't have the key, use eina_hash_del_by_data() | |
| * directly. | | * directly. | |
| */ | | */ | |
| EAPI Eina_Bool eina_hash_del(Eina_Hash *hash, | | EAPI Eina_Bool eina_hash_del(Eina_Hash *hash, | |
| | | | |
| skipping to change at line 638 | | skipping to change at line 638 | |
| const void *key, | | const void *key, | |
| const void *data) EINA_ARG_NONNULL(1, 2); | | const void *data) EINA_ARG_NONNULL(1, 2); | |
| | | | |
| /** | | /** | |
| * @brief Change the key associated with a data without triggering the | | * @brief Change the key associated with a data without triggering the | |
| * free callback. | | * free callback. | |
| * | | * | |
| * @param hash The given hash table. | | * @param hash The given hash table. | |
| * @param old_key The current key associated with the data | | * @param old_key The current key associated with the data | |
| * @param new_key The new key to associate data with | | * @param new_key The new key to associate data with | |
|
| * @return EINA_FALSE in any case but success, EINA_TRUE on success. | | * @return #EINA_FALSE in any case but success, #EINA_TRUE on success. | |
| * | | * | |
| * This function allows for the move of data from one key to another, | | * This function allows for the move of data from one key to another, | |
| * but does not call the Eina_Free_Cb associated with the hash table | | * but does not call the Eina_Free_Cb associated with the hash table | |
| * when destroying the old key. | | * when destroying the old key. | |
| */ | | */ | |
| EAPI Eina_Bool eina_hash_move(Eina_Hash *hash, | | EAPI Eina_Bool eina_hash_move(Eina_Hash *hash, | |
| const void *old_key, | | const void *old_key, | |
| const void *new_key) EINA_ARG_NONNULL(1, 2, 3
); | | const void *new_key) EINA_ARG_NONNULL(1, 2, 3
); | |
| | | | |
| /** | | /** | |
| | | | |
| skipping to change at line 693 | | skipping to change at line 693 | |
| */ | | */ | |
| EAPI void eina_hash_free_buckets(Eina_Hash *hash) EINA_ARG_NONNULL(1); | | EAPI void eina_hash_free_buckets(Eina_Hash *hash) EINA_ARG_NONNULL(1); | |
| | | | |
| /** | | /** | |
| * @brief Returns the number of entries in the given hash table. | | * @brief Returns the number of entries in the given hash table. | |
| * | | * | |
| * @param hash The given hash table. | | * @param hash The given hash table. | |
| * @return The number of entries in the hash table. | | * @return The number of entries in the hash table. | |
| * | | * | |
| * This function returns the number of entries in @p hash, or 0 on | | * This function returns the number of entries in @p hash, or 0 on | |
|
| * error. If @p hash is @c NULL, 0 is returned. | | * error. If @p hash is @c NULL, @c 0 is returned. | |
| */ | | */ | |
| EAPI int eina_hash_population(const Eina_Hash *hash) EINA_ARG_NONNULL
(1); | | EAPI int eina_hash_population(const Eina_Hash *hash) EINA_ARG_NONNULL
(1); | |
| | | | |
| /** | | /** | |
| * @brief Add an entry to the given hash table. | | * @brief Add an entry to the given hash table. | |
| * | | * | |
| * @param hash The given hash table. Cannot be @c NULL. | | * @param hash The given hash table. Cannot be @c NULL. | |
| * @param key A unique key. Cannot be @c NULL. | | * @param key A unique key. Cannot be @c NULL. | |
| * @param key_length The length of the key. | | * @param key_length The length of the key. | |
| * @param key_hash The hash that will always match key. | | * @param key_hash The hash that will always match key. | |
| | | | |
| skipping to change at line 780 | | skipping to change at line 780 | |
| * @param key The key. Cannot be @c NULL. | | * @param key The key. Cannot be @c NULL. | |
| * @param key_length The length of the key. | | * @param key_length The length of the key. | |
| * @param key_hash The hash that always match the key. | | * @param key_hash The hash that always match the key. | |
| * @return #EINA_FALSE if an error occurred, #EINA_TRUE otherwise. | | * @return #EINA_FALSE if an error occurred, #EINA_TRUE otherwise. | |
| * | | * | |
| * This function removes the entry identified by @p key and | | * This function removes the entry identified by @p key and | |
| * @p key_hash from @p hash. If a free function was given to the | | * @p key_hash from @p hash. If a free function was given to the | |
| * callback on creation, it will be called for the data being | | * callback on creation, it will be called for the data being | |
| * deleted. Do not forget to count '\\0' for string when setting the | | * deleted. Do not forget to count '\\0' for string when setting the | |
| * value of @p key_length. If @p hash or @p key are @c NULL, the | | * value of @p key_length. If @p hash or @p key are @c NULL, the | |
|
| * functions returns immediately #EINA_FALSE. This function returns | | * functions returns immediately #EINA_FALSE. This function | |
| * #EINA_FALSE if an error occurred, #EINA_TRUE otherwise. | | * returns #EINA_FALSE if an error occurred, #EINA_TRUE otherwise. | |
| * | | * | |
| * @note if you don't have the key_hash, use eina_hash_del_by_key() instead
. | | * @note if you don't have the key_hash, use eina_hash_del_by_key() instead
. | |
| * @note if you don't have the key, use eina_hash_del_by_data() instead. | | * @note if you don't have the key, use eina_hash_del_by_data() instead. | |
| */ | | */ | |
| EAPI Eina_Bool eina_hash_del_by_key_hash(Eina_Hash *hash, | | EAPI Eina_Bool eina_hash_del_by_key_hash(Eina_Hash *hash, | |
| const void *key, | | const void *key, | |
| int key_length, | | int key_length, | |
| int key_hash) EINA_ARG_NON
NULL(1, 2); | | int key_hash) EINA_ARG_NON
NULL(1, 2); | |
| | | | |
| /** | | /** | |
| | | | |
| skipping to change at line 806 | | skipping to change at line 806 | |
| * | | * | |
| * @param hash The given hash table. Cannot be @c NULL. | | * @param hash The given hash table. Cannot be @c NULL. | |
| * @param key The key. Cannot be @c NULL. | | * @param key The key. Cannot be @c NULL. | |
| * @return #EINA_FALSE if an error occurred, #EINA_TRUE otherwise. | | * @return #EINA_FALSE if an error occurred, #EINA_TRUE otherwise. | |
| * | | * | |
| * This function removes the entry identified by @p key from @p | | * This function removes the entry identified by @p key from @p | |
| * hash. The key length and hash will be calculated automatically by | | * hash. The key length and hash will be calculated automatically by | |
| * using functiond provided to has creation function. If a free | | * using functiond provided to has creation function. If a free | |
| * function was given to the callback on creation, it will be called | | * function was given to the callback on creation, it will be called | |
| * for the data being deleted. If @p hash or @p key are @c NULL, the | | * for the data being deleted. If @p hash or @p key are @c NULL, the | |
|
| * functions returns immediately #EINA_FALSE. This function returns | | * functions returns immediately #EINA_FALSE. This function | |
| * #EINA_FALSE if an error occurred, #EINA_TRUE otherwise. | | * returns #EINA_FALSE if an error occurred, #EINA_TRUE otherwise. | |
| * | | * | |
| * @note if you already have the key_hash, use eina_hash_del_by_key_hash() | | * @note if you already have the key_hash, use eina_hash_del_by_key_hash() | |
| * instead. | | * instead. | |
| * @note if you don't have the key, use eina_hash_del_by_data() instead. | | * @note if you don't have the key, use eina_hash_del_by_data() instead. | |
| */ | | */ | |
| EAPI Eina_Bool eina_hash_del_by_key(Eina_Hash *hash, | | EAPI Eina_Bool eina_hash_del_by_key(Eina_Hash *hash, | |
| const void *key) EINA_ARG_NONNULL(1, 2)
; | | const void *key) EINA_ARG_NONNULL(1, 2)
; | |
| | | | |
| /** | | /** | |
| * @brief Remove the entry identified by a data from the given hash table. | | * @brief Remove the entry identified by a data from the given hash table. | |
| | | | |
| skipping to change at line 856 | | skipping to change at line 856 | |
| * @param hash The given hash table. Cannot be @c NULL. | | * @param hash The given hash table. Cannot be @c NULL. | |
| * @param key The key. | | * @param key The key. | |
| * @param key_length The length of the key. | | * @param key_length The length of the key. | |
| * @param key_hash The hash that always match the key. | | * @param key_hash The hash that always match the key. | |
| * @param data The data pointer to remove if the key is @c NULL. | | * @param data The data pointer to remove if the key is @c NULL. | |
| * @return #EINA_FALSE if an error occurred, #EINA_TRUE otherwise. | | * @return #EINA_FALSE if an error occurred, #EINA_TRUE otherwise. | |
| * | | * | |
| * This function removes the entry identified by @p key and | | * This function removes the entry identified by @p key and | |
| * @p key_hash, or @p data, from @p hash. If a free function was given to | | * @p key_hash, or @p data, from @p hash. If a free function was given to | |
| * the callback on creation, it will be called for the data being | | * the callback on creation, it will be called for the data being | |
|
| * deleted. If @p hash is @c NULL, the functions returns immediately | | * deleted. If @p hash is @c NULL, the functions returns immediately #EINA_ | |
| * #EINA_FALSE. If @p key is @c NULL, then @p key_length and @p key_hash | | FALSE. | |
| | | * If @p key is @c NULL, then @p key_length and @p key_hash | |
| * are ignored and @p data is used to find a match to remove, | | * are ignored and @p data is used to find a match to remove, | |
| * otherwise @p key and @p key_hash are used and @p data is not | | * otherwise @p key and @p key_hash are used and @p data is not | |
| * required and can be @c NULL. Do not forget to count '\\0' for | | * required and can be @c NULL. Do not forget to count '\\0' for | |
| * string when setting the value of @p key_length. This function | | * string when setting the value of @p key_length. This function | |
| * returns #EINA_FALSE if an error occurred, #EINA_TRUE otherwise. | | * returns #EINA_FALSE if an error occurred, #EINA_TRUE otherwise. | |
| * | | * | |
| * @note if you know you already have the key, use eina_hash_del_by_key_has
h(), | | * @note if you know you already have the key, use eina_hash_del_by_key_has
h(), | |
| * if you know you don't have the key, use eina_hash_del_by_data() | | * if you know you don't have the key, use eina_hash_del_by_data() | |
| * directly. | | * directly. | |
| */ | | */ | |
| | | | |
| skipping to change at line 928 | | skipping to change at line 928 | |
| * @brief Returned a new iterator associated to hash keys. | | * @brief Returned a new iterator associated to hash keys. | |
| * | | * | |
| * @param hash The hash. | | * @param hash The hash. | |
| * @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 | |
| * hash. If @p hash is not populated, this function still returns a | | * hash. If @p hash is not populated, this function still returns a | |
| * valid iterator that will always return false on | | * valid iterator that will always return false on | |
| * eina_iterator_next(), thus keeping API sane. | | * eina_iterator_next(), thus keeping API sane. | |
| * | | * | |
|
| * If the memory can not be allocated, NULL is returned and | | * If the memory can not be allocated, NULL is returned | |
| * #EINA_ERROR_OUT_OF_MEMORY is set. Otherwise, a valid iterator is | | * and #EINA_ERROR_OUT_OF_MEMORY is set. Otherwise, a valid iterator is | |
| * returned. | | * returned. | |
| * | | * | |
| * @warning if the hash structure changes then the iterator becomes | | * @warning if the hash structure changes then the iterator becomes | |
| * invalid! That is, if you add or remove items this iterator | | * invalid! That is, if you add or remove items this iterator | |
| * behavior is undefined and your program may crash! | | * behavior is undefined and your program may crash! | |
| */ | | */ | |
| EAPI Eina_Iterator *eina_hash_iterator_key_new(const Eina_Hash *hash) EINA_
MALLOC EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT; | | EAPI Eina_Iterator *eina_hash_iterator_key_new(const Eina_Hash *hash) EINA_
MALLOC EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT; | |
| | | | |
| /** | | /** | |
| * @brief Returned a new iterator associated to hash data. | | * @brief Returned a new iterator associated to hash data. | |
| * | | * | |
| * @param hash The hash. | | * @param hash The hash. | |
| * @return A new iterator. | | * @return A new iterator. | |
| * | | * | |
| * This function returns a newly allocated iterator associated to | | * This function returns a newly allocated iterator associated to | |
| * @p hash. If @p hash is not populated, this function still returns a | | * @p hash. If @p hash is not populated, this function still returns a | |
| * valid iterator that will always return false on | | * valid iterator that will always return false on | |
| * eina_iterator_next(), thus keeping API sane. | | * eina_iterator_next(), thus keeping API sane. | |
| * | | * | |
|
| * If the memory can not be allocated, @c NULL is returned and | | * If the memory can not be allocated, @c NULL is returned | |
| * #EINA_ERROR_OUT_OF_MEMORY is set. Otherwise, a valid iterator is | | * and #EINA_ERROR_OUT_OF_MEMORY is set. Otherwise, a valid iterator is | |
| * returned. | | * returned. | |
| * | | * | |
| * @warning if the hash structure changes then the iterator becomes | | * @warning if the hash structure changes then the iterator becomes | |
| * invalid. That is, if you add or remove items this iterator behavior | | * invalid. That is, if you add or remove items this iterator behavior | |
| * is undefined and your program may crash. | | * is undefined and your program may crash. | |
| */ | | */ | |
| EAPI Eina_Iterator *eina_hash_iterator_data_new(const Eina_Hash *hash) EINA
_MALLOC EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT; | | EAPI Eina_Iterator *eina_hash_iterator_data_new(const Eina_Hash *hash) EINA
_MALLOC EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT; | |
| | | | |
| /** | | /** | |
| * @brief Returned a new iterator associated to hash keys and data. | | * @brief Returned a new iterator associated to hash keys and data. | |
| * | | * | |
| * @param hash The hash. | | * @param hash The hash. | |
| * @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 | |
| * hash. If @p hash is not populated, this function still returns a | | * hash. If @p hash is not populated, this function still returns a | |
| * valid iterator that will always return false on | | * valid iterator that will always return false on | |
| * eina_iterator_next(), thus keeping API sane. | | * eina_iterator_next(), thus keeping API sane. | |
| * | | * | |
|
| * If the memory can not be allocated, NULL is returned and | | * If the memory can not be allocated, @c NULL is returned | |
| * #EINA_ERROR_OUT_OF_MEMORY is set. Otherwise, a valid iterator is | | * and #EINA_ERROR_OUT_OF_MEMORY is set. Otherwise, a valid iterator is | |
| * returned. | | * returned. | |
| * | | * | |
| * @note iterator data will provide values as Eina_Hash_Tuple that should n
ot | | * @note iterator data will provide values as Eina_Hash_Tuple that should n
ot | |
| * be modified! | | * be modified! | |
| * | | * | |
| * @warning if the hash structure changes then the iterator becomes | | * @warning if the hash structure changes then the iterator becomes | |
| * invalid! That is, if you add or remove items this iterator | | * invalid! That is, if you add or remove items this iterator | |
| * behavior is undefined and your program may crash! | | * behavior is undefined and your program may crash! | |
| */ | | */ | |
| EAPI Eina_Iterator *eina_hash_iterator_tuple_new(const Eina_Hash *hash) EIN
A_MALLOC EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT; | | EAPI Eina_Iterator *eina_hash_iterator_tuple_new(const Eina_Hash *hash) EIN
A_MALLOC EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT; | |
| | | | |
| /** | | /** | |
| * @brief Call a function on every member stored in the hash table | | * @brief Call a function on every member stored in the hash table | |
| * | | * | |
| * @param hash The hash table whose members will be walked | | * @param hash The hash table whose members will be walked | |
| * @param func The function to call on each parameter | | * @param func The function to call on each parameter | |
| * @param fdata The data pointer to pass to the function being called | | * @param fdata The data pointer to pass to the function being called | |
| * | | * | |
| * This function goes through every entry in the hash table @p hash and cal
ls | | * This function goes through every entry in the hash table @p hash and cal
ls | |
| * the function @p func on each member. The function should @b not modify t
he | | * the function @p func on each member. The function should @b not modify t
he | |
|
| * hash table contents if it returns 1. @b If the hash table contents are | | * hash table contents if it returns @c 1. @b If the hash table contents ar
e | |
| * modified by this function or the function wishes to stop processing it m
ust | | * modified by this function or the function wishes to stop processing it m
ust | |
|
| * return 0, otherwise return 1 to keep processing. | | * return @c 0, otherwise return @c 1 to keep processing. | |
| * | | * | |
| * Example: | | * Example: | |
| * @code | | * @code | |
| * extern Eina_Hash *hash; | | * extern Eina_Hash *hash; | |
| * | | * | |
| * Eina_Bool hash_fn(const Eina_Hash *hash, const void *key, | | * Eina_Bool hash_fn(const Eina_Hash *hash, const void *key, | |
| * void *data, void *fdata) | | * void *data, void *fdata) | |
| * { | | * { | |
| * printf("Func data: %s, Hash entry: %s / %p\n", | | * printf("Func data: %s, Hash entry: %s / %p\n", | |
| * fdata, (const char *)key, data); | | * fdata, (const char *)key, data); | |
| | | | |
End of changes. 12 change blocks. |
| 20 lines changed or deleted | | 22 lines changed or added | |
|
| eina_inarray.h | | eina_inarray.h | |
| | | | |
| skipping to change at line 253 | | skipping to change at line 253 | |
| */ | | */ | |
| EAPI void eina_inarray_free(Eina_Inarray *array) EINA_ARG_NONNULL(1); | | EAPI void eina_inarray_free(Eina_Inarray *array) EINA_ARG_NONNULL(1); | |
| | | | |
| /** | | /** | |
| * @brief Initialize inline array. | | * @brief Initialize inline array. | |
| * @param array array object to initialize. | | * @param array array object to initialize. | |
| * @param member_size size of each member in the array. | | * @param member_size size of each member in the array. | |
| * @param step when resizing the array, do this using the following | | * @param step when resizing the array, do this using the following | |
| * extra amount. | | * extra amount. | |
| * | | * | |
|
| * Initialize array. If the @a step is 0, then a safe default is | | * Initialize array. If the @a step is @c 0, then a safe default is | |
| * chosen. | | * chosen. | |
| * | | * | |
| * This is useful for arrays inlined into other structures or | | * This is useful for arrays inlined into other structures or | |
| * allocated at stack. | | * allocated at stack. | |
| * | | * | |
| * @see eina_inarray_flush() | | * @see eina_inarray_flush() | |
| * | | * | |
| * @since 1.2 | | * @since 1.2 | |
| */ | | */ | |
| EAPI void eina_inarray_step_set(Eina_Inarray *array, | | EAPI void eina_inarray_step_set(Eina_Inarray *array, | |
| | | | |
| skipping to change at line 298 | | skipping to change at line 298 | |
| * @since 1.2 | | * @since 1.2 | |
| */ | | */ | |
| EAPI int eina_inarray_push(Eina_Inarray *array, | | EAPI int eina_inarray_push(Eina_Inarray *array, | |
| const void *data) EINA_ARG_NONNULL(1, 2); | | const void *data) EINA_ARG_NONNULL(1, 2); | |
| | | | |
| /** | | /** | |
| * @brief Copy the data to array at position found by comparison function | | * @brief Copy the data to array at position found by comparison function | |
| * @param array array object | | * @param array array object | |
| * @param data data to be copied | | * @param data data to be copied | |
| * @param compare compare function | | * @param compare compare function | |
|
| * @return the index of the new member or -1 on errors. | | * @return the index of the new member or @c -1 on errors. | |
| * | | * | |
| * Copies the given pointer contents at the array position defined by | | * Copies the given pointer contents at the array position defined by | |
| * given @a compare function. The pointer is not referenced, instead | | * given @a compare function. The pointer is not referenced, instead | |
| * it's contents is copied to the members array using the previously | | * it's contents is copied to the members array using the previously | |
| * defined @c member_size. | | * defined @c member_size. | |
| * | | * | |
| * The data given to @a compare function are the pointer to member | | * The data given to @a compare function are the pointer to member | |
| * memory itself, do no change it. | | * memory itself, do no change it. | |
| * | | * | |
| * @see eina_inarray_insert_sorted() | | * @see eina_inarray_insert_sorted() | |
| | | | |
| skipping to change at line 323 | | skipping to change at line 323 | |
| */ | | */ | |
| EAPI int eina_inarray_insert(Eina_Inarray *array, | | EAPI int eina_inarray_insert(Eina_Inarray *array, | |
| const void *data, | | const void *data, | |
| Eina_Compare_Cb compare) EINA_ARG_NONNULL(1, 2
, 3); | | Eina_Compare_Cb compare) EINA_ARG_NONNULL(1, 2
, 3); | |
| | | | |
| /** | | /** | |
| * @brief Copy the data to array at position found by comparison function | | * @brief Copy the data to array at position found by comparison function | |
| * @param array array object | | * @param array array object | |
| * @param data data to be copied | | * @param data data to be copied | |
| * @param compare compare function | | * @param compare compare function | |
|
| * @return the index of the new member or -1 on errors. | | * @return the index of the new member or @c -1 on errors. | |
| * | | * | |
| * Copies the given pointer contents at the array position defined by | | * Copies the given pointer contents at the array position defined by | |
| * given @a compare function. The pointer is not referenced, instead | | * given @a compare function. The pointer is not referenced, instead | |
| * it's contents is copied to the members array using the previously | | * it's contents is copied to the members array using the previously | |
| * defined @c member_size. | | * defined @c member_size. | |
| * | | * | |
| * The data given to @a compare function are the pointer to member | | * The data given to @a compare function are the pointer to member | |
| * memory itself, do no change it. | | * memory itself, do no change it. | |
| * | | * | |
| * This variation will optimize insertion position assuming the array | | * This variation will optimize insertion position assuming the array | |
| | | | |
| skipping to change at line 348 | | skipping to change at line 348 | |
| * @since 1.2 | | * @since 1.2 | |
| */ | | */ | |
| EAPI int eina_inarray_insert_sorted(Eina_Inarray *array, | | EAPI int eina_inarray_insert_sorted(Eina_Inarray *array, | |
| const void *data, | | const void *data, | |
| Eina_Compare_Cb compare) EINA_ARG_NONNU
LL(1, 2, 3); | | Eina_Compare_Cb compare) EINA_ARG_NONNU
LL(1, 2, 3); | |
| | | | |
| /** | | /** | |
| * @brief Find data and remove matching member | | * @brief Find data and remove matching member | |
| * @param array array object | | * @param array array object | |
| * @param data data to be found and removed | | * @param data data to be found and removed | |
|
| * @return the index of the removed member or -1 on errors. | | * @return the index of the removed member or @c -1 on errors. | |
| * | | * | |
| * Find data in the array and remove it. Data may be an existing | | * Find data in the array and remove it. Data may be an existing | |
| * member of array (then optimized) or the contents will be matched | | * member of array (then optimized) or the contents will be matched | |
| * using memcmp(). | | * using memcmp(). | |
| * | | * | |
| * @see eina_inarray_pop() | | * @see eina_inarray_pop() | |
| * @see eina_inarray_remove_at() | | * @see eina_inarray_remove_at() | |
| * | | * | |
| * @since 1.2 | | * @since 1.2 | |
| */ | | */ | |
| | | | |
| skipping to change at line 538 | | skipping to change at line 538 | |
| */ | | */ | |
| EAPI int eina_inarray_search(const Eina_Inarray *array, | | EAPI int eina_inarray_search(const Eina_Inarray *array, | |
| const void *data, | | const void *data, | |
| Eina_Compare_Cb compare) EINA_ARG_NONNULL(1, 2
, 3); | | Eina_Compare_Cb compare) EINA_ARG_NONNULL(1, 2
, 3); | |
| | | | |
| /** | | /** | |
| * @brief Search member (binary search walk) | | * @brief Search member (binary search walk) | |
| * @param array array object | | * @param array array object | |
| * @param data member to search using @a compare function. | | * @param data member to search using @a compare function. | |
| * @param compare compare function | | * @param compare compare function | |
|
| * @return the member index or -1 if not found. | | * @return the member index or @c -1 if not found. | |
| * | | * | |
| * Uses binary search for given data as compared by @a compare function. | | * Uses binary search for given data as compared by @a compare function. | |
| * | | * | |
| * The data given to @a compare function are the pointer to member | | * The data given to @a compare function are the pointer to member | |
| * memory itself, do no change it. | | * memory itself, do no change it. | |
| * | | * | |
| * @since 1.2 | | * @since 1.2 | |
| */ | | */ | |
| EAPI int eina_inarray_search_sorted(const Eina_Inarray *array, | | EAPI int eina_inarray_search_sorted(const Eina_Inarray *array, | |
| const void *data, | | const void *data, | |
| | | | |
| skipping to change at line 560 | | skipping to change at line 560 | |
| | | | |
| /** | | /** | |
| * @brief Call function for each array member | | * @brief Call function for each array member | |
| * @param array array object | | * @param array array object | |
| * @param function callback function | | * @param function callback function | |
| * @param user_data user data given to callback @a function | | * @param user_data user data given to callback @a function | |
| * @return #EINA_TRUE if it successfully iterate all items of the array. | | * @return #EINA_TRUE if it successfully iterate all items of the array. | |
| * | | * | |
| * Call @a function for every given data in @a array. | | * Call @a function for every given data in @a array. | |
| * | | * | |
|
| * Safe way to iterate over an array. @p function should return | | * Safe way to iterate over an array. @p function should return #EINA_TRUE | |
| * #EINA_TRUE as long as you want the function to continue iterating, | | * as long as you want the function to continue iterating, by | |
| * by returning #EINA_FALSE it will stop and return #EINA_FALSE as a | | * returning #EINA_FALSE it will stop and return #EINA_FALSE as a result. | |
| * result. | | | |
| * | | * | |
| * The data given to @a function are the pointer to member memory | | * The data given to @a function are the pointer to member memory | |
| * itself. | | * itself. | |
| * | | * | |
| * @see EINA_INARRAY_FOREACH() | | * @see EINA_INARRAY_FOREACH() | |
| * | | * | |
| * @since 1.2 | | * @since 1.2 | |
| */ | | */ | |
| EAPI Eina_Bool eina_inarray_foreach(const Eina_Inarray *array, | | EAPI Eina_Bool eina_inarray_foreach(const Eina_Inarray *array, | |
| Eina_Each_Cb function, | | Eina_Each_Cb function, | |
| | | | |
| skipping to change at line 609 | | skipping to change at line 608 | |
| EAPI unsigned int eina_inarray_count(const Eina_Inarray *array) EINA_ARG_NO
NNULL(1) EINA_WARN_UNUSED_RESULT; | | EAPI unsigned int eina_inarray_count(const Eina_Inarray *array) EINA_ARG_NO
NNULL(1) EINA_WARN_UNUSED_RESULT; | |
| | | | |
| /** | | /** | |
| * @brief Returned a new iterator associated to an array. | | * @brief Returned a new iterator associated to an array. | |
| * @param array array object | | * @param array array object | |
| * @return A new iterator. | | * @return A new iterator. | |
| * | | * | |
| * This function returns a newly allocated iterator associated to | | * This function returns a newly allocated iterator associated to | |
| * @p array. | | * @p array. | |
| * | | * | |
|
| * If the memory can not be allocated, NULL is returned and | | * If the memory can not be allocated, @c NULL is returned | |
| * #EINA_ERROR_OUT_OF_MEMORY is set. Otherwise, a valid iterator is | | * and #EINA_ERROR_OUT_OF_MEMORY is set. Otherwise, a valid iterator is | |
| * returned. | | * returned. | |
| * | | * | |
| * @warning if the array structure changes then the iterator becomes | | * @warning if the array structure changes then the iterator becomes | |
| * invalid! That is, if you add or remove members this | | * invalid! That is, if you add or remove members this | |
| * iterator behavior is undefined and your program may crash! | | * iterator behavior is undefined and your program may crash! | |
| * | | * | |
| * @since 1.2 | | * @since 1.2 | |
| */ | | */ | |
| EAPI Eina_Iterator *eina_inarray_iterator_new(const Eina_Inarray *array) EI
NA_MALLOC EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); | | EAPI Eina_Iterator *eina_inarray_iterator_new(const Eina_Inarray *array) EI
NA_MALLOC EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); | |
| | | | |
| /** | | /** | |
| * @brief Returned a new reversed iterator associated to an array. | | * @brief Returned a new reversed iterator associated to an array. | |
| * @param array array object | | * @param array array object | |
| * @return A new iterator. | | * @return A new iterator. | |
| * | | * | |
| * This function returns a newly allocated iterator associated to | | * This function returns a newly allocated iterator associated to | |
| * @p array. | | * @p array. | |
| * | | * | |
| * Unlike eina_inarray_iterator_new(), this will walk the array backwards. | | * Unlike eina_inarray_iterator_new(), this will walk the array backwards. | |
| * | | * | |
|
| * If the memory can not be allocated, NULL is returned and | | * If the memory can not be allocated, @c NULL is returned | |
| * #EINA_ERROR_OUT_OF_MEMORY is set. Otherwise, a valid iterator is | | * and #EINA_ERROR_OUT_OF_MEMORY is set. Otherwise, a valid iterator is | |
| * returned. | | * returned. | |
| * | | * | |
| * @warning if the array structure changes then the iterator becomes | | * @warning if the array structure changes then the iterator becomes | |
| * invalid! That is, if you add or remove nodes this iterator | | * invalid! That is, if you add or remove nodes this iterator | |
| * behavior is undefined and your program may crash! | | * behavior is undefined and your program may crash! | |
| * | | * | |
| * @since 1.2 | | * @since 1.2 | |
| */ | | */ | |
| EAPI Eina_Iterator *eina_inarray_iterator_reversed_new(const Eina_Inarray *
array) EINA_MALLOC EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); | | EAPI Eina_Iterator *eina_inarray_iterator_reversed_new(const Eina_Inarray *
array) EINA_MALLOC EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); | |
| | | | |
| /** | | /** | |
| * @brief Returned a new accessor associated to an array. | | * @brief Returned a new accessor associated to an array. | |
| * @param array array object | | * @param array array object | |
| * @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 array. | | * @p array. | |
| * | | * | |
|
| * If the memory can not be allocated, NULL is returned and | | * If the memory can not be allocated, @c NULL is returned | |
| * #EINA_ERROR_OUT_OF_MEMORY is set. Otherwise, a valid accessor is | | * and #EINA_ERROR_OUT_OF_MEMORY is set. Otherwise, a valid accessor is | |
| * returned. | | * returned. | |
| * | | * | |
| * @since 1.2 | | * @since 1.2 | |
| */ | | */ | |
| EAPI Eina_Accessor *eina_inarray_accessor_new(const Eina_Inarray *array) EI
NA_MALLOC EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); | | EAPI Eina_Accessor *eina_inarray_accessor_new(const Eina_Inarray *array) EI
NA_MALLOC EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); | |
| | | | |
| /** | | /** | |
| * @def EINA_INARRAY_FOREACH | | * @def EINA_INARRAY_FOREACH | |
| * @brief walks array linearly from head to tail | | * @brief walks array linearly from head to tail | |
| * @param array array object | | * @param array array object | |
| | | | |
End of changes. 9 change blocks. |
| 15 lines changed or deleted | | 14 lines changed or added | |
|
| eina_inlist.h | | eina_inlist.h | |
| | | | |
| skipping to change at line 437 | | skipping to change at line 437 | |
| * 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 in_list. | | * walk @a in_list. | |
| * | | * | |
| * @note @a in_item 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 in_list existing list head or NULL to create a new list. | | * @param in_list existing list head or @c NULL to create a new list. | |
| * @param in_item new list node, must not be NULL. | | * @param in_item new list node, must not be @c NULL. | |
| * | | * | |
| * @return the new list head. Use it and not @a in_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 in_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 in_list existing list head or NULL to create a new list. | | * @param in_list existing list head or @c NULL to create a new list. | |
| * @param in_item new list node, must not be NULL. | | * @param in_item new list node, must not be @c NULL. | |
| * | | * | |
| * @return the new list head. Use it and not @a in_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 | |
| | | | |
| skipping to change at line 480 | | skipping to change at line 480 | |
| * @note @a in_item_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 in_item 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 in_relative is considered to be inside @a in_list, no checks ar
e | | * @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 in_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 in_list existing list head or NULL to create a new list. | | * @param in_list existing list head or @c NULL to create a new list. | |
| * @param in_item new list node, must not be NULL. | | * @param in_item new list node, must not be @c NULL. | |
| * @param in_relative reference node, @a in_item 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. | |
| | | | |
| skipping to change at line 506 | | skipping to change at line 506 | |
| * @note @a in_item 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 in_item 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 in_relative is considered to be inside @a in_list, no checks ar
e | | * @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 in_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 in_list existing list head or NULL to create a new list. | | * @param in_list existing list head or @c NULL to create a new list. | |
| * @param in_item new list node, must not be NULL. | | * @param in_item new list node, must not be @c NULL. | |
| * @param in_relative reference node, @a in_item 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 in_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 in_item is considered to be inside @a in_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 in_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 in_list existing list head, must not be NULL. | | * @param in_list existing list head, must not be @c NULL. | |
| * @param in_item existing list node, must not be NULL. | | * @param in_item existing list node, must not be @c 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 in_list existing list to search @a in_item in, must not be NULL. | | * @param in_list existing list to search @a in_item in, must not be @c NUL | |
| * @param in_item what to search for, must not be NULL. | | L. | |
| | | * @param in_item what to search for, must not be @c NULL. | |
| * | | * | |
|
| * @return @a in_item if found, NULL if not. | | * @return @a in_item if found, @c 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. | |
| * | | * | |
| * @note @a item is considered to be inside @a list. No checks are | | * @note @a item is considered to be inside @a list. No checks are | |
| * done to confirm this, and giving nodes from different lists | | * done to confirm this, and giving nodes from different lists | |
| * will lead to problems. | | * will lead to problems. | |
| * | | * | |
|
| * @param list existing list head or NULL to create a new list. | | * @param list existing list head or @c NULL to create a new list. | |
| * @param item list node to move to beginning (head), must not be NULL. | | * @param item list node to move to beginning (head), must not be @c 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_promote(Eina_Inlist *list, | | EAPI Eina_Inlist *eina_inlist_promote(Eina_Inlist *list, | |
| Eina_Inlist *item) EINA_ARG_NONNULL
(1, 2) EINA_WARN_UNUSED_RESULT; | | Eina_Inlist *item) EINA_ARG_NONNULL
(1, 2) EINA_WARN_UNUSED_RESULT; | |
| | | | |
| /** | | /** | |
| * Move existing node to end of list. | | * Move existing node to end 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. | |
| * | | * | |
| * @note @a item is considered to be inside @a list. No checks are | | * @note @a item is considered to be inside @a list. No checks are | |
| * done to confirm this, and giving nodes from different lists | | * done to confirm this, and giving nodes from different lists | |
| * will lead to problems. | | * will lead to problems. | |
| * | | * | |
|
| * @param list existing list head or NULL to create a new list. | | * @param list existing list head or @c NULL to create a new list. | |
| * @param item list node to move to end (tail), must not be NULL. | | * @param item list node to move to end (tail), must not be @c 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_demote(Eina_Inlist *list, | | EAPI Eina_Inlist *eina_inlist_demote(Eina_Inlist *list, | |
| Eina_Inlist *item) EINA_ARG_NONNULL(
1, 2) EINA_WARN_UNUSED_RESULT; | | Eina_Inlist *item) EINA_ARG_NONNULL(
1, 2) EINA_WARN_UNUSED_RESULT; | |
| | | | |
| /** | | /** | |
| * @brief Get the count of the number of items in a list. | | * @brief Get the count of the number of items in a list. | |
| * | | * | |
| * @param list The list whose count to return. | | * @param list The list whose count to return. | |
| * @return The number of members in the list. | | * @return The number of members in the list. | |
| * | | * | |
| * This function returns how many members @p list contains. If the | | * This function returns how many members @p list contains. If the | |
|
| * list is @c NULL, 0 is returned. | | * list is @c NULL, @c 0 is returned. | |
| * | | * | |
| * @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 in_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 | |
| * in_list. If @p in_list is @c NULL or the count member of @p in_list is l
ess | | * 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, @c NULL is returned | |
| * #EINA_ERROR_OUT_OF_MEMORY is set. Otherwise, a valid iterator is | | * and #EINA_ERROR_OUT_OF_MEMORY is set. Otherwise, a valid iterator | |
| * returned. | | * is 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 in_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 in_list. If @p in_list is @c NULL or the count member of @p in_list i
s | | * @p in_list. If @p in_list is @c NULL or the count member of @p in_list i
s | |
|
| * less or equal than 0, this function returns @c NULL. If the memory can | | * less or equal than @c 0, this function returns @c NULL. If the memory ca
n | |
| * not be allocated, @c NULL is returned and #EINA_ERROR_OUT_OF_MEMORY is | | * 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 @c NULL. | |
| * @param func The function called for the sort. | | * @param func The function called for the sort. | |
| * @return A list pointer. | | * @return A list pointer. | |
| * @since 1.1.0 | | * @since 1.1.0 | |
| * | | * | |
| * This function inserts item into a linked list assuming it was | | * This function inserts item into a linked list assuming it was | |
| * sorted and the result will be sorted. If @p list is @c NULLL, item | | * sorted and the result will be sorted. If @p list is @c NULLL, item | |
| * is returned. On success, a new list pointer that should be | | * is returned. On success, a new list pointer that should be | |
| * used in place of the one given to this function is | | * used in place of the one given to this function is | |
| * returned. Otherwise, the old pointer is returned. See eina_error_get(). | | * returned. Otherwise, the old pointer is returned. See eina_error_get(). | |
| * | | * | |
| | | | |
| skipping to change at line 698 | | skipping to change at line 698 | |
| * @since 1.1.0 | | * @since 1.1.0 | |
| * | | * | |
| * See eina_inlist_sorted_state_insert() for more information. | | * See eina_inlist_sorted_state_insert() for more information. | |
| */ | | */ | |
| EAPI void eina_inlist_sorted_state_free(Eina_Inlist_Sorted_State *state); | | EAPI void eina_inlist_sorted_state_free(Eina_Inlist_Sorted_State *state); | |
| | | | |
| /** | | /** | |
| * @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 @c NULL. | |
| * @param func The function called for the sort. | | * @param func The function called for the sort. | |
| * @param state The current array for initial dichotomic search | | * @param state The current array for initial dichotomic search | |
| * @return A list pointer. | | * @return A list pointer. | |
| * @since 1.1.0 | | * @since 1.1.0 | |
| * | | * | |
| * This function inserts item into a linked list assuming @p state match | | * This function inserts item into a linked list assuming @p state match | |
| * the exact content order of the list. It use @p state to do a fast | | * the exact content order of the list. It use @p state to do a fast | |
| * first step dichotomic search before starting to walk the inlist itself. | | * first step dichotomic search before starting to walk the inlist itself. | |
| * This make this code much faster than eina_inlist_sorted_insert() as it | | * This make this code much faster than eina_inlist_sorted_insert() as it | |
| * doesn't need to walk the list at all. The result is of course a sorted | | * doesn't need to walk the list at all. The result is of course a sorted | |
| | | | |
End of changes. 14 change blocks. |
| 24 lines changed or deleted | | 25 lines changed or added | |
|
| eina_list.h | | eina_list.h | |
| | | | |
| skipping to change at line 687 | | skipping to change at line 687 | |
| | | | |
| /** | | /** | |
| * @brief Find a member of a list and return the member. | | * @brief Find a member of a list and return the member. | |
| * | | * | |
| * @param list The list to search for a data. | | * @param list The list to search for a data. | |
| * @param data The data pointer to find in the list. | | * @param data The data pointer to find in the list. | |
| * @return The found member data pointer if found, @c NULL otherwise. | | * @return The found member data pointer if found, @c NULL otherwise. | |
| * | | * | |
| * This function searches in @p list from beginning to end for the | | * This function searches in @p list from beginning to end for the | |
| * first member whose data pointer is @p data. If it is found, @p data | | * first member whose data pointer is @p data. If it is found, @p data | |
|
| * will be returned, otherwise NULL will be returned. | | * will be returned, otherwise @c NULL will be returned. | |
| * | | * | |
| * Example: | | * Example: | |
| * @code | | * @code | |
| * extern Eina_List *list; | | * extern Eina_List *list; | |
| * extern void *my_data; | | * extern void *my_data; | |
| * | | * | |
| * if (eina_list_data_find(list, my_data) == my_data) | | * if (eina_list_data_find(list, my_data) == my_data) | |
| * { | | * { | |
| * printf("Found member %p\n", my_data); | | * printf("Found member %p\n", my_data); | |
| * } | | * } | |
| | | | |
| skipping to change at line 756 | | skipping to change at line 756 | |
| * from = eina_list_remove_list(from, data); | | * from = eina_list_remove_list(from, data); | |
| * | | * | |
| * @warning @p list must be a pointer to the first element of the list. | | * @warning @p list must be a pointer to the first element of the list. | |
| */ | | */ | |
| EAPI Eina_Bool eina_list_move_list(Eina_List **to, Eina_List **
from, Eina_List *data); | | EAPI Eina_Bool eina_list_move_list(Eina_List **to, Eina_List **
from, Eina_List *data); | |
| | | | |
| /** | | /** | |
| * @brief Free an entire list and all the nodes, ignoring the data containe
d. | | * @brief Free an entire list and all the nodes, ignoring the data containe
d. | |
| | | | |
| * @param list The list to free | | * @param list The list to free | |
|
| * @return A NULL pointer | | * @return A @c NULL pointer | |
| * | | * | |
| * This function frees all the nodes of @p list. It does not free the | | * This function frees all the nodes of @p list. It does not free the | |
| * data of the nodes. To free them, use #EINA_LIST_FREE. | | * data of the nodes. To free them, use #EINA_LIST_FREE. | |
| */ | | */ | |
| EAPI Eina_List *eina_list_free(Eina_List *list); | | EAPI Eina_List *eina_list_free(Eina_List *list); | |
| | | | |
| /** | | /** | |
| * @brief Get the nth member's data pointer in a list. | | * @brief Get the nth member's data pointer in a list. | |
| * | | * | |
| * @param list The list to get the specified member number from. | | * @param list The list to get the specified member number from. | |
| | | | |
| skipping to change at line 938 | | skipping to change at line 938 | |
| * @param right Second list to merge. | | * @param right Second list to merge. | |
| * @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 A new sorted list. | | * @return A new sorted list. | |
| * | | * | |
| * This function compares the head of @p left and @p right, and choose the | | * This function compares the head of @p left and @p right, and choose the | |
| * smallest one to be head of the returned list. It will continue this proc
ess | | * smallest one to be head of the returned list. It will continue this proc
ess | |
| * for all entry of both list. | | * for all entry of both list. | |
| * | | * | |
| * Both left and right do not exist anymore after the merge. | | * Both left and right do not exist anymore after the merge. | |
|
| * If @p func is NULL, it will return NULL. | | * If @p func is @c NULL, it will return @c NULL. | |
| * | | * | |
| * Example: | | * Example: | |
| * @code | | * @code | |
| * int | | * int | |
| * sort_cb(void *d1, void *d2) | | * sort_cb(void *d1, void *d2) | |
| * { | | * { | |
| * const char *txt = NULL; | | * const char *txt = NULL; | |
| * const char *txt2 = NULL; | | * const char *txt2 = NULL; | |
| * | | * | |
| * if(!d1) return(1); | | * if(!d1) return(1); | |
| | | | |
| skipping to change at line 972 | | skipping to change at line 972 | |
| | | | |
| /** | | /** | |
| * @brief Split a list into 2 lists. | | * @brief Split a list into 2 lists. | |
| * | | * | |
| * @param list List to split. | | * @param list List to split. | |
| * @param relative The list will be split after @p relative. | | * @param relative The list will be split after @p relative. | |
| * @param right The head of the new right list. | | * @param right The head of the new right list. | |
| * @return The new left list | | * @return The new left list | |
| * | | * | |
| * This function splits @p list into two lists ( left and right ) after the
node @p relative. @p Relative | | * This function splits @p list into two lists ( left and right ) after the
node @p relative. @p Relative | |
|
| * will become the last node of the left list. If @p list or @p right are N | | * will become the last node of the left list. If @p list or @p right are @ | |
| ULL list is returns. | | c NULL list is returns. | |
| * If @p relative is NULL right is set to @p list and NULL is returns. | | * If @p relative is NULL right is set to @p list and @c NULL is returns. | |
| * If @p relative is the last node of @p list list is returns and @p right | | * If @p relative is the last node of @p list list is returns and @p right | |
| is set to NULL. | | is set to @c NULL. | |
| * | | * | |
| * list does not exist anymore after the split. | | * list does not exist anymore after the split. | |
| * | | * | |
| * @warning @p list must be a pointer to the first element of the list. | | * @warning @p list must be a pointer to the first element of the list. | |
| */ | | */ | |
| 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_split_list(Eina_List *list, Eina_List
*relative, Eina_List **right) EINA_WARN_UNUSED_RESULT; | |
| | | | |
| /** | | /** | |
| * @brief Returns node nearest to data is in the sorted list. | | * @brief Returns node nearest to data is in the sorted list. | |
| * | | * | |
| * @param list The list to search for data, @b must be sorted. | | * @param list The list to search for data, @b must be sorted. | |
| * @param func A function pointer that can handle comparing the list data n
odes. | | * @param func A function pointer that can handle comparing the list data n
odes. | |
| * @param data reference value to search. | | * @param data reference value to search. | |
| * @param result_cmp if provided returns the result of | | * @param result_cmp if provided returns the result of | |
| * func(node->data, data) node being the last (returned) node. If node | | * func(node->data, data) node being the last (returned) node. If node | |
| * was found (exact match), then it is 0. If returned node is smaller | | * was found (exact match), then it is 0. If returned node is smaller | |
| * than requested data, it is less than 0 and if it's bigger it's | | * than requested data, it is less than 0 and if it's bigger it's | |
| * greater than 0. It is the last value returned by func(). | | * greater than 0. It is the last value returned by func(). | |
|
| * @return the nearest node, NULL if not found. | | * @return the nearest node, @c NULL if not found. | |
| * | | * | |
| * This function searches for a node containing @p data as it's data in @p
list, | | * This function searches for a node containing @p data as it's data in @p
list, | |
| * if such a node exists it will be returned and @p result_cmp will be @p 0
. If | | * if such a node exists it will be returned and @p result_cmp will be @p 0
. If | |
| * the data of no node in @p list is equal to @p data, the node with the ne
arest | | * the data of no node in @p list is equal to @p data, the node with the ne
arest | |
| * value to that will be returned and @p result_cmp will be the return valu
e of | | * value to that will be returned and @p result_cmp will be the return valu
e of | |
| * @p func with @p data and the returned node's data as arguments. | | * @p func with @p data and the returned node's data as arguments. | |
| * | | * | |
| * This function is useful for inserting an element in the list only in cas
e it | | * This function is useful for inserting an element in the list only in cas
e it | |
| * isn't already present in the list, the naive way of doing this would be: | | * isn't already present in the list, the naive way of doing this would be: | |
| * @code | | * @code | |
| | | | |
| skipping to change at line 1049 | | skipping to change at line 1049 | |
| * @see eina_list_sorted_merge() | | * @see eina_list_sorted_merge() | |
| */ | | */ | |
| EAPI Eina_List *eina_list_search_sorted_near_list(const Eina_Lis
t *list, Eina_Compare_Cb func, const void *data, int *result_cmp); | | EAPI Eina_List *eina_list_search_sorted_near_list(const Eina_Lis
t *list, Eina_Compare_Cb func, const void *data, int *result_cmp); | |
| | | | |
| /** | | /** | |
| * @brief Returns node if data is in the sorted list. | | * @brief Returns node if data is in the sorted list. | |
| * | | * | |
| * @param list The list to search for data, @b must be sorted. | | * @param list The list to search for data, @b must be sorted. | |
| * @param func A function pointer that can handle comparing the list data n
odes. | | * @param func A function pointer that can handle comparing the list data n
odes. | |
| * @param data reference value to search. | | * @param data reference value to search. | |
|
| * @return the node if func(node->data, data) == 0, NULL if not found. | | * @return the node if func(node->data, data) == 0, @c NULL if not found. | |
| * | | * | |
| * This can be used to check if some value is inside the list and get | | * This can be used to check if some value is inside the list and get | |
| * the container node in this case. It should be used when list is | | * the container node in this case. It should be used when list is | |
| * known to be sorted as it will do binary search for results. | | * known to be sorted as it will do binary search for results. | |
| * | | * | |
| * Example: imagine user gives a string, you check if it's in the list | | * Example: imagine user gives a string, you check if it's in the list | |
| * before duplicating its contents. | | * before duplicating its contents. | |
| * | | * | |
| * @note O(log2(n)) average/worst case performance, for 1,000,000 | | * @note O(log2(n)) average/worst case performance, for 1,000,000 | |
| * elements it will do a maximum of 20 comparisons. This is much | | * elements it will do a maximum of 20 comparisons. This is much | |
| | | | |
| skipping to change at line 1119 | | skipping to change at line 1119 | |
| * @see eina_list_search_unsorted_list() | | * @see eina_list_search_unsorted_list() | |
| */ | | */ | |
| EAPI void *eina_list_search_sorted(const Eina_List *list, E
ina_Compare_Cb func, const void *data); | | EAPI void *eina_list_search_sorted(const Eina_List *list, E
ina_Compare_Cb func, const void *data); | |
| | | | |
| /** | | /** | |
| * @brief Returns node if data is in the unsorted list. | | * @brief Returns node if data is in the unsorted list. | |
| * | | * | |
| * @param list The list to search for data, may be unsorted. | | * @param list The list to search for data, may be unsorted. | |
| * @param func A function pointer that can handle comparing the list data n
odes. | | * @param func A function pointer that can handle comparing the list data n
odes. | |
| * @param data reference value to search. | | * @param data reference value to search. | |
|
| * @return the node if func(node->data, data) == 0, NULL if not found. | | * @return the node if func(node->data, data) == 0, @c NULL if not found. | |
| * | | * | |
| * This can be used to check if some value is inside the list and get | | * This can be used to check if some value is inside the list and get | |
| * the container node in this case. | | * the container node in this case. | |
| * | | * | |
| * Example: imagine user gives a string, you check if it's in the list | | * Example: imagine user gives a string, you check if it's in the list | |
| * before duplicating its contents. | | * before duplicating its contents. | |
| * | | * | |
| * @note this is expensive and may walk the whole list, it's order-N, | | * @note this is expensive and may walk the whole list, it's order-N, | |
| * that is for 1,000,000 elements list it may walk and compare | | * that is for 1,000,000 elements list it may walk and compare | |
| * 1,000,000 nodes. | | * 1,000,000 nodes. | |
| | | | |
| skipping to change at line 1145 | | skipping to change at line 1145 | |
| */ | | */ | |
| EAPI Eina_List *eina_list_search_unsorted_list(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); | |
| | | | |
| /** | | /** | |
| * @brief Returns node data if it is in the unsorted list. | | * @brief Returns node data if it is in the unsorted list. | |
| * | | * | |
| * @param list The list to search for data, may be unsorted. | | * @param list The list to search for data, may be unsorted. | |
| * @param func A function pointer that can handle comparing the list data n
odes. | | * @param func A function pointer that can handle comparing the list data n
odes. | |
| * @param data reference value to search. | | * @param data reference value to search. | |
| * @return the node value (@c node->data) if func(node->data, data) == 0, | | * @return the node value (@c node->data) if func(node->data, data) == 0, | |
|
| * NULL if not found. | | * @c NULL if not found. | |
| * | | * | |
| * This can be used to check if some value is inside the list and get | | * This can be used to check if some value is inside the list and get | |
| * the existing instance in this case. | | * the existing instance in this case. | |
| * | | * | |
| * Example: imagine user gives a string, you check if it's in the list | | * Example: imagine user gives a string, you check if it's in the list | |
| * before duplicating its contents. | | * before duplicating its contents. | |
| * | | * | |
| * @note this is expensive and may walk the whole list, it's order-N, | | * @note this is expensive and may walk the whole list, it's order-N, | |
| * that is for 1,000,000 elements list it may walk and compare | | * that is for 1,000,000 elements list it may walk and compare | |
| * 1,000,000 nodes. | | * 1,000,000 nodes. | |
| | | | |
| skipping to change at line 1245 | | skipping to change at line 1245 | |
| */ | | */ | |
| static inline void *eina_list_data_set(Eina_List *list, const void *
data); | | static inline void *eina_list_data_set(Eina_List *list, const void *
data); | |
| | | | |
| /** | | /** | |
| * @brief Get the count of the number of items in a list. | | * @brief Get the count of the number of items in a list. | |
| * | | * | |
| * @param list The list whose count to return. | | * @param list The list whose count to return. | |
| * @return The number of members in the list. | | * @return The number of members in the list. | |
| * | | * | |
| * This function returns how many members @p list contains. If the | | * This function returns how many members @p list contains. If the | |
|
| * list is @c NULL, 0 is returned. | | * list is @c NULL, @c 0 is returned. | |
| * | | * | |
| * NB: This is an order-1 operation and takes the same time regardless | | * NB: This is an order-1 operation and takes the same time regardless | |
| * of the length of the list. | | * of the length of the list. | |
| * | | * | |
| * @warning @p list must be a pointer to the first element of the list. | | * @warning @p list must be a pointer to the first element of the list. | |
| */ | | */ | |
| static inline unsigned int eina_list_count(const Eina_List *list) EINA_PURE
; | | static inline unsigned int eina_list_count(const Eina_List *list) EINA_PURE
; | |
| | | | |
| /** | | /** | |
| * @brief Returned a new iterator associated to a list. | | * @brief Returned a new iterator associated to a list. | |
| * | | * | |
| * @param list The list. | | * @param 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 | | * list. If @p list is @c NULL or the count member of @p list is less | |
| * 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 | |
| * #EINA_ERROR_OUT_OF_MEMORY is set. Otherwise, a valid iterator is | | * and #EINA_ERROR_OUT_OF_MEMORY is set. Otherwise, a valid iterator | |
| * returned. | | * is returned. | |
| * | | * | |
| * @warning @p list must be a pointer to the first element of the list. | | * @warning @p list must be a pointer to the first element of the list. | |
| * | | * | |
| * @warning if the list structure changes then the iterator becomes | | * @warning if the list structure changes then the iterator becomes | |
| * invalid! That is, if you add or remove nodes this iterator | | * invalid! That is, if you add or remove nodes this iterator | |
| * behavior is undefined and your program may crash! | | * behavior is undefined and your program may crash! | |
| */ | | */ | |
| EAPI Eina_Iterator *eina_list_iterator_new(const Eina_List *list) EI
NA_MALLOC EINA_WARN_UNUSED_RESULT; | | EAPI Eina_Iterator *eina_list_iterator_new(const Eina_List *list) EI
NA_MALLOC EINA_WARN_UNUSED_RESULT; | |
| | | | |
| /** | | /** | |
| | | | |
| skipping to change at line 1292 | | skipping to change at line 1292 | |
| * @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 | | * list. If @p list is @c NULL or the count member of @p list is less | |
| * 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. | |
| * | | * | |
| * Unlike eina_list_iterator_new(), this will walk the list backwards. | | * Unlike eina_list_iterator_new(), this will walk the list backwards. | |
| * | | * | |
|
| * If the memory can not be allocated, NULL is returned and | | * If the memory can not be allocated, NULL is returned | |
| * #EINA_ERROR_OUT_OF_MEMORY is set. Otherwise, a valid iterator is | | * and #EINA_ERROR_OUT_OF_MEMORY is set. Otherwise, a valid iterator | |
| * returned. | | * is returned. | |
| * | | * | |
| * @warning @p list must be a pointer to the first element of the list. | | * @warning @p list must be a pointer to the first element of the list. | |
| * | | * | |
| * @warning if the list structure changes then the iterator becomes | | * @warning if the list structure changes then the iterator becomes | |
| * invalid! That is, if you add or remove nodes this iterator | | * invalid! That is, if you add or remove nodes this iterator | |
| * behavior is undefined and your program may crash! | | * behavior is undefined and your program may crash! | |
| */ | | */ | |
| EAPI Eina_Iterator *eina_list_iterator_reversed_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; | |
| | | | |
| /** | | /** | |
| * @brief Returned a new accessor associated to a list. | | * @brief Returned a new accessor associated to a list. | |
| * | | * | |
| * @param list The list. | | * @param 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 list. If @p list is @c NULL or the count member of @p list is | |
|
| * less or equal than 0, this function returns NULL. If the memory can | | * less or equal than 0, this function returns @c NULL. If the memory can | |
| * not be allocated, NULL is returned and #EINA_ERROR_OUT_OF_MEMORY is | | * 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. | |
| * | | * | |
| * @warning @p list must be a pointer to the first element of the list. | | * @warning @p list must be a pointer to the first element of the list. | |
| */ | | */ | |
| EAPI Eina_Accessor *eina_list_accessor_new(const Eina_List *list) EI
NA_MALLOC EINA_WARN_UNUSED_RESULT; | | EAPI Eina_Accessor *eina_list_accessor_new(const Eina_List *list) EI
NA_MALLOC EINA_WARN_UNUSED_RESULT; | |
| | | | |
| /** | | /** | |
| * @def EINA_LIST_FOREACH | | * @def EINA_LIST_FOREACH | |
| * @brief Macro to iterate over a list. | | * @brief Macro to iterate over a list. | |
| * | | * | |
| | | | |
End of changes. 12 change blocks. |
| 21 lines changed or deleted | | 21 lines changed or added | |
|
| eina_matrixsparse.h | | eina_matrixsparse.h | |
| | | | |
| skipping to change at line 90 | | skipping to change at line 90 | |
| * value will fail. | | * value will fail. | |
| * @param cols number of columns in matrix. Operations with columns greater | | * @param cols number of columns in matrix. Operations with columns greater | |
| * than this value will fail. | | * than this value will fail. | |
| * @param free_func used to delete cell data contents, used by | | * @param free_func used to delete cell data contents, used by | |
| * eina_matrixsparse_free(), eina_matrixsparse_size_set(), | | * eina_matrixsparse_free(), eina_matrixsparse_size_set(), | |
| * eina_matrixsparse_row_idx_clear(), | | * eina_matrixsparse_row_idx_clear(), | |
| * eina_matrixsparse_column_idx_clear(), | | * eina_matrixsparse_column_idx_clear(), | |
| * eina_matrixsparse_cell_idx_clear() and possible others. | | * eina_matrixsparse_cell_idx_clear() and possible others. | |
| * @param user_data given to @a free_func as first parameter. | | * @param user_data given to @a free_func as first parameter. | |
| * | | * | |
|
| * @return newly allocated matrix or NULL if allocation failed and eina_err
or | | * @return Newly allocated matrix or @c NULL if allocation failed and eina_
error | |
| * is set. | | * is set. | |
| */ | | */ | |
| EAPI Eina_Matrixsparse *eina_matrixsparse_new(unsigned long rows, | | EAPI Eina_Matrixsparse *eina_matrixsparse_new(unsigned long rows, | |
| unsigned long cols, | | unsigned long cols, | |
| void (*free_func)(void *user_
data, | | void (*free_func)(void *user_
data, | |
| void *cell_
data), | | void *cell_
data), | |
| const void *user_data); | | const void *user_data); | |
| | | | |
| /** | | /** | |
| * @brief Free resources allocated to Sparse Matrix. | | * @brief Free resources allocated to Sparse Matrix. | |
| * | | * | |
| * @param m The Sparse Matrix instance to free, must @b not be @c NULL. | | * @param m The Sparse Matrix instance to free, must @b not be @c NULL. | |
| */ | | */ | |
| EAPI void eina_matrixsparse_free(Eina_Matrixsparse *m); | | EAPI void eina_matrixsparse_free(Eina_Matrixsparse *m); | |
| | | | |
| /* size manipulation */ | | /* size manipulation */ | |
| | | | |
| /** | | /** | |
| * @brief Get the current size of Sparse Matrix. | | * @brief Get the current size of Sparse Matrix. | |
| * | | * | |
|
| * The given parameters are guaranteed to be set if they're not NULL, | | * The given parameters are guaranteed to be set if they're not @c NULL, | |
| * even if this function fails (ie: @a m is not a valid matrix instance). | | * even if this function fails (ie: @a m is not a valid matrix instance). | |
| * | | * | |
| * @param m the sparse matrix to operate on. | | * @param m the sparse matrix to operate on. | |
|
| * @param rows returns the number of rows, may be NULL. If @a m is invalid, | | * @param rows returns the number of rows, may be @c NULL. If @a m is inval
id, | |
| * returned value is zero, otherwise it's a positive integer. | | * returned value is zero, otherwise it's a positive integer. | |
|
| * @param cols returns the number of columns, may be NULL. If @a m is | | * @param cols returns the number of columns, may be @c NULL. If @a m is | |
| * invalid, returned value is zero, otherwise it's a positive intege
r. | | * invalid, returned value is zero, otherwise it's a positive intege
r. | |
| */ | | */ | |
| EAPI void eina_matrixsparse_size_get(const Eina_Matrixsparse *m, | | EAPI void eina_matrixsparse_size_get(const Eina_Matrixsparse *m, | |
| unsigned long *rows, | | unsigned long *rows, | |
| unsigned long *cols); | | unsigned long *cols); | |
| | | | |
| /** | | /** | |
| * @brief Resize the Sparse Matrix. | | * @brief Resize the Sparse Matrix. | |
| * | | * | |
| * This will resize the sparse matrix, possibly freeing cells on rows | | * This will resize the sparse matrix, possibly freeing cells on rows | |
| * and columns that will cease to exist. | | * and columns that will cease to exist. | |
| * | | * | |
| * @param m the sparse matrix to operate on. | | * @param m the sparse matrix to operate on. | |
| * @param rows the new number of rows, must be greater than zero. | | * @param rows the new number of rows, must be greater than zero. | |
| * @param cols the new number of columns, must be greater than zero. | | * @param cols the new number of columns, must be greater than zero. | |
|
| * @return 1 on success, 0 on failure. | | * @return #EINA_TRUE on success, #EINA_FALSE on failure. | |
| * | | * | |
| * @warning cells, rows or columns are not reference counted and thus | | * @warning cells, rows or columns are not reference counted and thus | |
| * after this call any reference might be invalid if instance were | | * after this call any reference might be invalid if instance were | |
| * freed. | | * freed. | |
| */ | | */ | |
| EAPI Eina_Bool eina_matrixsparse_size_set(Eina_Matrixsparse *m, | | EAPI Eina_Bool eina_matrixsparse_size_set(Eina_Matrixsparse *m, | |
| unsigned long rows, | | unsigned long rows, | |
| unsigned long cols); | | unsigned long cols); | |
| | | | |
| /* data getting */ | | /* data getting */ | |
| | | | |
| /** | | /** | |
| * Get the cell reference inside Sparse Matrix. | | * Get the cell reference inside Sparse Matrix. | |
| * | | * | |
| * @param m the sparse matrix to operate on. | | * @param m the sparse matrix to operate on. | |
| * @param row the new number of row to clear. | | * @param row the new number of row to clear. | |
| * @param col the new number of column to clear. | | * @param col the new number of column to clear. | |
| * @param cell pointer to return cell reference, if any exists. | | * @param cell pointer to return cell reference, if any exists. | |
| * | | * | |
|
| * @return 1 on success, 0 on failure. It is considered success if did not | | * @return @c 1 on success, @c 0 on failure. It is considered success if di
d not | |
| * exist but index is inside matrix size, in this case @c *cell == NULL | | * exist but index is inside matrix size, in this case @c *cell == NULL | |
| * | | * | |
| * @see eina_matrixsparse_cell_data_get() | | * @see eina_matrixsparse_cell_data_get() | |
| * @see eina_matrixsparse_data_idx_get() | | * @see eina_matrixsparse_data_idx_get() | |
| */ | | */ | |
| EAPI Eina_Bool eina_matrixsparse_cell_idx_get(const Eina_Matrixsparse *m, u
nsigned long row, unsigned long col, Eina_Matrixsparse_Cell **cell); | | EAPI Eina_Bool eina_matrixsparse_cell_idx_get(const Eina_Matrixsparse *m, u
nsigned long row, unsigned long col, Eina_Matrixsparse_Cell **cell); | |
| | | | |
| /** | | /** | |
| * Get data associated with given cell reference. | | * Get data associated with given cell reference. | |
| * | | * | |
| | | | |
| skipping to change at line 180 | | skipping to change at line 180 | |
| */ | | */ | |
| EAPI void *eina_matrixsparse_cell_data_get(const Eina_Matrixsparse_Cell
*cell); | | EAPI void *eina_matrixsparse_cell_data_get(const Eina_Matrixsparse_Cell
*cell); | |
| | | | |
| /** | | /** | |
| * Get data associated with given cell given its indexes. | | * Get data associated with given cell given its indexes. | |
| * | | * | |
| * @param m the sparse matrix to operate on. | | * @param m the sparse matrix to operate on. | |
| * @param row the new number of row to clear. | | * @param row the new number of row to clear. | |
| * @param col the new number of column to clear. | | * @param col the new number of column to clear. | |
| * | | * | |
|
| * @return data associated with given cell or NULL if nothing is associated
. | | * @return Data associated with given cell or @c NULL if nothing is associa
ted. | |
| * | | * | |
| * @see eina_matrixsparse_cell_idx_get() | | * @see eina_matrixsparse_cell_idx_get() | |
| * @see eina_matrixsparse_cell_data_get() | | * @see eina_matrixsparse_cell_data_get() | |
| */ | | */ | |
| EAPI void *eina_matrixsparse_data_idx_get(const Eina_Matrixsparse *m, u
nsigned long row, unsigned long col); | | EAPI void *eina_matrixsparse_data_idx_get(const Eina_Matrixsparse *m, u
nsigned long row, unsigned long col); | |
| | | | |
| /** | | /** | |
| * Get position (indexes) of the given cell. | | * Get position (indexes) of the given cell. | |
| * | | * | |
| * @param cell the cell reference, must @b not be @c NULL. | | * @param cell the cell reference, must @b not be @c NULL. | |
| * @param row where to store cell row number, may be @c NULL. | | * @param row where to store cell row number, may be @c NULL. | |
| * @param col where to store cell column number, may be @c NULL. | | * @param col where to store cell column number, may be @c NULL. | |
| * | | * | |
|
| * @return 1 on success, 0 otherwise (@c cell is @c NULL). | | * @return #EINA_TRUE on success, #EINA_FALSE otherwise (@c cell is @c NULL
). | |
| */ | | */ | |
| EAPI Eina_Bool eina_matrixsparse_cell_position_get(const Eina_Matrixsparse_
Cell *cell, unsigned long *row, unsigned long *col); | | EAPI Eina_Bool eina_matrixsparse_cell_position_get(const Eina_Matrixsparse_
Cell *cell, unsigned long *row, unsigned long *col); | |
| | | | |
| /* data setting */ | | /* data setting */ | |
| | | | |
| /** | | /** | |
| * Change cell reference value without freeing the possibly existing old va
lue. | | * Change cell reference value without freeing the possibly existing old va
lue. | |
| * | | * | |
| * @param cell the cell reference, must @b not be @c NULL. | | * @param cell the cell reference, must @b not be @c NULL. | |
| * @param data new data to set. | | * @param data new data to set. | |
| * @param p_old returns the old value intact (not freed). | | * @param p_old returns the old value intact (not freed). | |
| * | | * | |
|
| * @return 1 on success, 0 otherwise (@a cell is @c NULL). | | * @return #EINA_TRUE on success, #EINA_FALSE otherwise (@a cell is @c NULL
). | |
| * | | * | |
| * @see eina_matrixsparse_cell_data_set() | | * @see eina_matrixsparse_cell_data_set() | |
| * @see eina_matrixsparse_data_idx_replace() | | * @see eina_matrixsparse_data_idx_replace() | |
| */ | | */ | |
| EAPI Eina_Bool eina_matrixsparse_cell_data_replace(Eina_Matrixsparse_Cell *
cell, const void *data, void **p_old); | | EAPI Eina_Bool eina_matrixsparse_cell_data_replace(Eina_Matrixsparse_Cell *
cell, const void *data, void **p_old); | |
| | | | |
| /** | | /** | |
| * Change cell value freeing the possibly existing old value. | | * Change cell value freeing the possibly existing old value. | |
| * | | * | |
| * In contrast to eina_matrixsparse_cell_data_replace(), this function will | | * In contrast to eina_matrixsparse_cell_data_replace(), this function will | |
| * call @c free_func() on existing value. | | * call @c free_func() on existing value. | |
| * | | * | |
| * @param cell the cell reference, must @b not be @c NULL. | | * @param cell the cell reference, must @b not be @c NULL. | |
| * @param data new data to set. | | * @param data new data to set. | |
| * | | * | |
|
| * @return 1 on success, 0 otherwise (@a cell is @c NULL). | | * @return #EINA_TRUE on success, #EINA_FALSE otherwise (@a cell is @c NULL
). | |
| * | | * | |
| * @see eina_matrixsparse_cell_data_replace() | | * @see eina_matrixsparse_cell_data_replace() | |
| * @see eina_matrixsparse_data_idx_set() | | * @see eina_matrixsparse_data_idx_set() | |
| */ | | */ | |
| EAPI Eina_Bool eina_matrixsparse_cell_data_set(Eina_Matrixsparse_Cell *cell
, const void *data); | | EAPI Eina_Bool eina_matrixsparse_cell_data_set(Eina_Matrixsparse_Cell *cell
, const void *data); | |
| | | | |
| /** | | /** | |
| * Change cell value without freeing the possibly existing old value, using | | * Change cell value without freeing the possibly existing old value, using | |
| * indexes. | | * indexes. | |
| * | | * | |
| * @param m the sparse matrix, must @b not be @c NULL. | | * @param m the sparse matrix, must @b not be @c NULL. | |
| * @param row the row number to set the value. | | * @param row the row number to set the value. | |
| * @param col the column number to set the value. | | * @param col the column number to set the value. | |
| * @param data new data to set. | | * @param data new data to set. | |
| * @param p_old returns the old value intact (not freed). | | * @param p_old returns the old value intact (not freed). | |
| * | | * | |
|
| * @return 1 on success, 0 otherwise (@a m is @c NULL, indexes are not vali
d). | | * @return #EINA_TRUE on success, #EINA_FALSE otherwise (@a m is @c NULL, i
ndexes are not valid). | |
| * | | * | |
| * @see eina_matrixsparse_cell_data_replace() | | * @see eina_matrixsparse_cell_data_replace() | |
| * @see eina_matrixsparse_data_idx_set() | | * @see eina_matrixsparse_data_idx_set() | |
| */ | | */ | |
| EAPI Eina_Bool eina_matrixsparse_data_idx_replace(Eina_Matrixsparse *m, uns
igned long row, unsigned long col, const void *data, void **p_old); | | EAPI Eina_Bool eina_matrixsparse_data_idx_replace(Eina_Matrixsparse *m, uns
igned long row, unsigned long col, const void *data, void **p_old); | |
| | | | |
| /** | | /** | |
| * Change cell value freeing the possibly existing old value, using | | * Change cell value freeing the possibly existing old value, using | |
| * indexes. | | * indexes. | |
| * | | * | |
| * In contrast to eina_matrixsparse_data_idx_replace(), this function will | | * In contrast to eina_matrixsparse_data_idx_replace(), this function will | |
| * call @c free_func() on existing value. | | * call @c free_func() on existing value. | |
| * | | * | |
| * @param m the sparse matrix, must @b not be @c NULL. | | * @param m the sparse matrix, must @b not be @c NULL. | |
| * @param row the row number to set the value. | | * @param row the row number to set the value. | |
| * @param col the column number to set the value. | | * @param col the column number to set the value. | |
| * @param data new data to set. | | * @param data new data to set. | |
| * | | * | |
|
| * @return 1 on success, 0 otherwise (@a m is @c NULL, indexes are not vali
d). | | * @return #EINA_TRUE on success, #EINA_FALSE otherwise (@a m is @c NULL, i
ndexes are not valid). | |
| * | | * | |
| * @see eina_matrixsparse_cell_data_replace() | | * @see eina_matrixsparse_cell_data_replace() | |
| */ | | */ | |
| EAPI Eina_Bool eina_matrixsparse_data_idx_set(Eina_Matrixsparse *m, unsigne
d long row, unsigned long col, const void *data); | | EAPI Eina_Bool eina_matrixsparse_data_idx_set(Eina_Matrixsparse *m, unsigne
d long row, unsigned long col, const void *data); | |
| | | | |
| /* data deleting */ | | /* data deleting */ | |
| | | | |
| /** | | /** | |
| * Clear (erase all cells) of row given its index. | | * Clear (erase all cells) of row given its index. | |
| * | | * | |
| * Existing cells will be cleared with @c free_func() given to | | * Existing cells will be cleared with @c free_func() given to | |
| * eina_matrixsparse_new(). | | * eina_matrixsparse_new(). | |
| * | | * | |
| * @param m the sparse matrix to operate on. | | * @param m the sparse matrix to operate on. | |
| * @param row the new number of row to clear. | | * @param row the new number of row to clear. | |
| * | | * | |
|
| * @return 1 on success, 0 on failure. It is considered success if row | | * @return #EINA_TRUE on success, #EINA_FALSE on failure. It is considered
success if row | |
| * had no cells filled. Failure is asking for clear row outside | | * had no cells filled. Failure is asking for clear row outside | |
| * matrix size. | | * matrix size. | |
| * | | * | |
| * @warning cells, rows or columns are not reference counted and thus | | * @warning cells, rows or columns are not reference counted and thus | |
| * after this call any reference might be invalid if instance were | | * after this call any reference might be invalid if instance were | |
| * freed. | | * freed. | |
| */ | | */ | |
| EAPI Eina_Bool eina_matrixsparse_row_idx_clear(Eina_Matrixsparse *m, unsign
ed long row); | | EAPI Eina_Bool eina_matrixsparse_row_idx_clear(Eina_Matrixsparse *m, unsign
ed long row); | |
| | | | |
| /** | | /** | |
| * Clear (erase all cells) of column given its index. | | * Clear (erase all cells) of column given its index. | |
| * | | * | |
| * Existing cells will be cleared with @c free_func() given to | | * Existing cells will be cleared with @c free_func() given to | |
| * eina_matrixsparse_new(). | | * eina_matrixsparse_new(). | |
| * | | * | |
| * @param m the sparse matrix to operate on. | | * @param m the sparse matrix to operate on. | |
| * @param col the new number of column to clear. | | * @param col the new number of column to clear. | |
| * | | * | |
|
| * @return 1 on success, 0 on failure. It is considered success if column | | * @return #EINA_TRUE on success, #EINA_FALSE on failure. It is considered
success if column | |
| * had no cells filled. Failure is asking for clear column outside | | * had no cells filled. Failure is asking for clear column outside | |
| * matrix size. | | * matrix size. | |
| * | | * | |
| * @warning cells, rows or columns are not reference counted and thus | | * @warning cells, rows or columns are not reference counted and thus | |
| * after this call any reference might be invalid if instance were | | * after this call any reference might be invalid if instance were | |
| * freed. | | * freed. | |
| */ | | */ | |
| EAPI Eina_Bool eina_matrixsparse_column_idx_clear(Eina_Matrixsparse *m, uns
igned long col); | | EAPI Eina_Bool eina_matrixsparse_column_idx_clear(Eina_Matrixsparse *m, uns
igned long col); | |
| | | | |
| /** | | /** | |
| * Clear (erase) cell given its indexes. | | * Clear (erase) cell given its indexes. | |
| * | | * | |
| * Existing cell will be cleared with @c free_func() given to | | * Existing cell will be cleared with @c free_func() given to | |
| * eina_matrixsparse_new(). | | * eina_matrixsparse_new(). | |
| * | | * | |
| * @param m the sparse matrix to operate on. | | * @param m the sparse matrix to operate on. | |
| * @param row the new number of row to clear. | | * @param row the new number of row to clear. | |
| * @param col the new number of column to clear. | | * @param col the new number of column to clear. | |
| * | | * | |
|
| * @return 1 on success, 0 on failure. It is considered success if did not | | * @return #EINA_TRUE on success, #EINA_FALSE on failure. It is considered
success if did not | |
| * exist but index is inside matrix size. | | * exist but index is inside matrix size. | |
| * | | * | |
| * @warning cells, rows or columns are not reference counted and thus | | * @warning cells, rows or columns are not reference counted and thus | |
| * after this call any reference might be invalid if instance were | | * after this call any reference might be invalid if instance were | |
| * freed. Note that this call might delete container column and | | * freed. Note that this call might delete container column and | |
| * row if this cell was the last remainder. | | * row if this cell was the last remainder. | |
| */ | | */ | |
| EAPI Eina_Bool eina_matrixsparse_cell_idx_clear(Eina_Matrixsparse *m, unsig
ned long row, unsigned long col); | | EAPI Eina_Bool eina_matrixsparse_cell_idx_clear(Eina_Matrixsparse *m, unsig
ned long row, unsigned long col); | |
| | | | |
| /** | | /** | |
| * Clear (erase) cell given its reference. | | * Clear (erase) cell given its reference. | |
| * | | * | |
| * @param cell the cell reference, must @b not be @c NULL. | | * @param cell the cell reference, must @b not be @c NULL. | |
| * | | * | |
|
| * @return 1 on success, 0 on failure. | | * @return #EINA_TRUE on success, #EINA_FALSE on failure. | |
| * | | * | |
| * @warning cells, rows or columns are not reference counted and thus | | * @warning cells, rows or columns are not reference counted and thus | |
| * after this call any reference might be invalid if instance were | | * after this call any reference might be invalid if instance were | |
| * freed. Note that this call might delete container column and | | * freed. Note that this call might delete container column and | |
| * row if this cell was the last remainder. | | * row if this cell was the last remainder. | |
| */ | | */ | |
| EAPI Eina_Bool eina_matrixsparse_cell_clear(Eina_Matrixsparse_Cell *cell); | | EAPI Eina_Bool eina_matrixsparse_cell_clear(Eina_Matrixsparse_Cell *cell); | |
| | | | |
| /* iterators */ | | /* iterators */ | |
| | | | |
| | | | |
End of changes. 16 change blocks. |
| 16 lines changed or deleted | | 16 lines changed or added | |
|
| eina_module.h | | eina_module.h | |
| | | | |
| skipping to change at line 104 | | skipping to change at line 104 | |
| /** | | /** | |
| * @def EINA_MODULE_INIT | | * @def EINA_MODULE_INIT | |
| * declares the given function as the module initializer (__eina_module_ini
t). | | * declares the given function as the module initializer (__eina_module_ini
t). | |
| * It must be of signature #Eina_Module_Init | | * It must be of signature #Eina_Module_Init | |
| */ | | */ | |
| #define EINA_MODULE_INIT(f) EAPI Eina_Module_Init __eina_module_init = &f | | #define EINA_MODULE_INIT(f) EAPI Eina_Module_Init __eina_module_init = &f | |
| | | | |
| /** | | /** | |
| * @def EINA_MODULE_SHUTDOWN | | * @def EINA_MODULE_SHUTDOWN | |
| * declares the given function as the module shutdownializer | | * declares the given function as the module shutdownializer | |
|
| * (__eina_module_shutdown). It must be of signature | | * (__eina_module_shutdown). It must be of signature #Eina_Module_Shutdown | |
| * #Eina_Module_Shutdown | | | |
| */ | | */ | |
| #define EINA_MODULE_SHUTDOWN(f) EAPI Eina_Module_Shutdown __eina_module_shu
tdown = &f | | #define EINA_MODULE_SHUTDOWN(f) EAPI Eina_Module_Shutdown __eina_module_shu
tdown = &f | |
| | | | |
| /** | | /** | |
| * @var EINA_ERROR_WRONG_MODULE | | * @var EINA_ERROR_WRONG_MODULE | |
| * Error identifier corresponding to a wrong module. | | * Error identifier corresponding to a wrong module. | |
| */ | | */ | |
| extern EAPI Eina_Error EINA_ERROR_WRONG_MODULE; | | extern EAPI Eina_Error EINA_ERROR_WRONG_MODULE; | |
| | | | |
| /** | | /** | |
| | | | |
| skipping to change at line 142 | | skipping to change at line 141 | |
| * | | * | |
| * @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 module 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 module has been previousl
y | | * 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 module is @c NULL, the | | * returns #EINA_TRUE and #EINA_FALSE otherwise. If @p module is @c NULL, t
he | |
| * function returns immediately. | | * function returns immediately. | |
| */ | | */ | |
| EAPI Eina_Bool | | EAPI Eina_Bool | |
| eina_module_free(Eina_Module *module) EINA_ARG_NONNULL(1); | | eina_module_free(Eina_Module *module) EINA_ARG_NONNULL(1); | |
| | | | |
| /** | | /** | |
| * @brief Load a module. | | * @brief Load a module. | |
| * | | * | |
| * @param module 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 | | * and #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 | |
| * #EINA_ERROR_MODULE_INIT_FAILED is set and #EINA_FALSE is | | * is set and #EINA_FALSE is returned. If the module has already been loade | |
| * returned. If the module has already been loaded, it's reference | | d, | |
| * counter is increased by one and #EINA_TRUE is returned. If @p module is | | * it's reference counter is increased by one and #EINA_TRUE is returned. | |
| * @c NULL, the function returns immediately #EINA_FALSE. | | * If @p module is @c NULL, the function returns immediately #EINA_FALSE. | |
| * | | * | |
| * When the symbols of the shared file objects are not needed | | * When the symbols of the shared file objects 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 module 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 module 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 module 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 module | | * 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 | |
| | | | |
| skipping to change at line 284 | | skipping to change at line 282 | |
| * @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. | | * @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 @c 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. | |
| */ | | */ | |
| EAPI Eina_Array * | | EAPI Eina_Array * | |
| eina_module_list_get(Eina_Array *array, const char *path, Eina_Bool recurs
ive, Eina_Module_Cb cb, void *data) EINA_MALLOC EINA_WARN_UNUSED_RESULT; | | eina_module_list_get(Eina_Array *array, const char *path, Eina_Bool recurs
ive, Eina_Module_Cb cb, void *data) EINA_MALLOC EINA_WARN_UNUSED_RESULT; | |
| | | | |
| /** | | /** | |
| * @brief Load every module on the list of modules. | | * @brief Load every module on the list of modules. | |
| * | | * | |
| | | | |
End of changes. 7 change blocks. |
| 13 lines changed or deleted | | 12 lines changed or added | |
|
| eina_prefix.h | | eina_prefix.h | |
| | | | |
| skipping to change at line 29 | | skipping to change at line 29 | |
| * data files such as images, sound files, other executable utilities, | | * data files such as images, sound files, other executable utilities, | |
| * libraries, modules and locale files can be found. | | * libraries, modules and locale files can be found. | |
| * | | * | |
| * @since 1.1.0 | | * @since 1.1.0 | |
| */ | | */ | |
| typedef struct _Eina_Prefix Eina_Prefix; | | typedef struct _Eina_Prefix Eina_Prefix; | |
| | | | |
| /** | | /** | |
| * @brief Create a new prefix handle given some input information | | * @brief Create a new prefix handle given some input information | |
| * | | * | |
|
| * @param argv0 If this is an executable this is argv[0] of the binary, or | | * @param argv0 If this is an executable this is argv[0] of the binary, or | |
| NULL if it is used from a shared library | | @c NULL if it is used from a shared library | |
| * @param symbol This is a symbol (function for example) inside the binary | | * @param symbol This is a symbol (function for example) inside the binary | |
| or library to find the source location of. Provide NULL if not used | | or library to find the source location of. Provide @c NULL if not used | |
| * @param envprefix This is the prefix to any environment variables that ma
y override prefix detection and give the exact location of the software | | * @param envprefix This is the prefix to any environment variables that ma
y override prefix detection and give the exact location of the software | |
| * @param sharedir This is the directory inside the standard share or data
dir where the software will store data files | | * @param sharedir This is the directory inside the standard share or data
dir where the software will store data files | |
|
| * @param magicsharefile This is a magic file to check existence of to dete | | * @param magicsharefile This is a magic file to check existence of to dete | |
| rmine the prefix find was correct, and it must be located in the data dir u | | rmine the prefix find was correct, and it must be located in the data | |
| nder the share dir provided above, or NULL if the check is not to be done | | * dir under the share dir provided above, or @c NULL if the check is not t | |
| | | o be done. | |
| * @param pkg_bin This is the compile-time binary install dir | | * @param pkg_bin This is the compile-time binary install dir | |
| * @param pkg_lib This is the compile-time library install dir | | * @param pkg_lib This is the compile-time library install dir | |
| * @param pkg_data This is the compile-time share/data install dir | | * @param pkg_data This is the compile-time share/data install dir | |
| * @param pkg_locale This is the compile-time locale install dir | | * @param pkg_locale This is the compile-time locale install dir | |
|
| * @return The prefix handle, or NULL on failure | | * @return The prefix handle, or @c NULL on failure. | |
| * | | * | |
| * Applications and libraries are most often not just single executables no
r | | * Applications and libraries are most often not just single executables no
r | |
| * single shared library binaries, but also come with extra modules they | | * single shared library binaries, but also come with extra modules they | |
| * have to load, extra binary utilities they need to run, or have data file
s | | * have to load, extra binary utilities they need to run, or have data file
s | |
| * they need to load. A very primitive application ASSUMES a fixed install | | * they need to load. A very primitive application ASSUMES a fixed install | |
| * location at compile-time, but this disallows the ability to re-locate | | * location at compile-time, but this disallows the ability to re-locate | |
| * the application (or library) somewhere else after compilation (if you ru
n | | * the application (or library) somewhere else after compilation (if you ru
n | |
| * out of space on a given disk, partition etc. for example), or necessitat
e | | * out of space on a given disk, partition etc. for example), or necessitat
e | |
| * the need for having to maintain environment variables for every piece of | | * the need for having to maintain environment variables for every piece of | |
| * software to let it know its location, or have to use large sets of | | * software to let it know its location, or have to use large sets of | |
| | | | |
| skipping to change at line 70 | | skipping to change at line 71 | |
| * | | * | |
| * To do this some information needs to be provided to eina_prefix_new(). I
f | | * To do this some information needs to be provided to eina_prefix_new(). I
f | |
| * you have developed a binary executable, then provide argv[0] as the @p a
rgv0 | | * you have developed a binary executable, then provide argv[0] as the @p a
rgv0 | |
| * argument. This plus the PATH environment variable help the prefix system | | * argument. This plus the PATH environment variable help the prefix system | |
| * to determine its location. Call eina_prefix_new() early on before you | | * to determine its location. Call eina_prefix_new() early on before you | |
| * change working directory or anything about argv[0] so it gets accurate | | * change working directory or anything about argv[0] so it gets accurate | |
| * information. It will use the first argument, being the executable itself
, | | * information. It will use the first argument, being the executable itself
, | |
| * to look in absolute directories, relative paths and PATH to see if it | | * to look in absolute directories, relative paths and PATH to see if it | |
| * finds the right executable to determine just where the actual binary is | | * finds the right executable to determine just where the actual binary is | |
| * installed and being run from. If you develop a share library, just pass | | * installed and being run from. If you develop a share library, just pass | |
|
| * NULL as argv0 | | * @c NULL as argv0 | |
| * | | * | |
| * It would prefer to use the @p symbol function to determine location as | | * It would prefer to use the @p symbol function to determine location as | |
| * that function will be unique inside the application and try and trace | | * that function will be unique inside the application and try and trace | |
| * back which file this function comes from (be it a binary or shared libra
ry) | | * back which file this function comes from (be it a binary or shared libra
ry) | |
| * as this avoids more expensive searches via @p argv0. It will use this | | * as this avoids more expensive searches via @p argv0. It will use this | |
| * symbol if given in preference to argv0. | | * symbol if given in preference to argv0. | |
| * | | * | |
| * The @p envprefix parameter, provides a string prefix to prepend before | | * The @p envprefix parameter, provides a string prefix to prepend before | |
| * environment variables to allow a fallback to specific environment variab
les | | * environment variables to allow a fallback to specific environment variab
les | |
| * to locate the software. For example if "MYAPP" is provided a the prefix, | | * to locate the software. For example if "MYAPP" is provided a the prefix, | |
| | | | |
End of changes. 4 change blocks. |
| 9 lines changed or deleted | | 10 lines changed or added | |
|
| eina_rbtree.h | | eina_rbtree.h | |
| | | | |
| skipping to change at line 159 | | skipping to change at line 159 | |
| | | | |
| /** | | /** | |
| * @brief Insert a new node inside an existing red black tree. | | * @brief Insert a new node inside an existing red black tree. | |
| * | | * | |
| * @param root The root of an exisiting valid red black tree. | | * @param root The root of an exisiting valid red black tree. | |
| * @param node The new node to insert. | | * @param node The new node to insert. | |
| * @param cmp The callback that is able to compare two nodes. | | * @param cmp The callback that is able to compare two nodes. | |
| * @param data Private data to help the compare function. | | * @param data Private data to help the compare function. | |
| * @return The new root of the red black tree. | | * @return The new root of the red black tree. | |
| * | | * | |
|
| * This function insert a new node in a valid red black tree. NULL is | | * This function insert a new node in a valid red black tree. @c NULL is | |
| * an empty valid red black tree. The resulting new tree is a valid red | | * an empty valid red black tree. The resulting new tree is a valid red | |
| * black tree. This function doesn't allocate any data. | | * black tree. This function doesn't allocate any data. | |
| */ | | */ | |
| EAPI Eina_Rbtree *eina_rbtree_inline_insert(Eina_Rbtree *root, Ein
a_Rbtree *node, Eina_Rbtree_Cmp_Node_Cb cmp, const void *data) EINA_ARG_NON
NULL(2, 3) EINA_WARN_UNUSED_RESULT; | | EAPI Eina_Rbtree *eina_rbtree_inline_insert(Eina_Rbtree *root, Ein
a_Rbtree *node, Eina_Rbtree_Cmp_Node_Cb cmp, const void *data) EINA_ARG_NON
NULL(2, 3) EINA_WARN_UNUSED_RESULT; | |
| | | | |
| /** | | /** | |
| * @brief Remove a node from an existing red black tree. | | * @brief Remove a node from an existing red black tree. | |
| * | | * | |
| * @param root The root of a valid red black tree. | | * @param root The root of a valid red black tree. | |
| * @param node The node to remove from the tree. | | * @param node The node to remove from the tree. | |
| * @param cmp The callback that is able to compare two nodes. | | * @param cmp The callback that is able to compare two nodes. | |
| * @param data Private data to help the compare function. | | * @param data Private data to help the compare function. | |
| * @return The new root of the red black tree. | | * @return The new root of the red black tree. | |
| * | | * | |
| * This function remove a new node in a valid red black tree that should | | * This function remove a new node in a valid red black tree that should | |
|
| * contain the node that you are removing. This function will return NULL | | * contain the node that you are removing. This function will return @c NUL
L | |
| * when the red black tree got empty. This function doesn't free any data. | | * when the red black tree got empty. This function doesn't free any data. | |
| */ | | */ | |
| EAPI Eina_Rbtree *eina_rbtree_inline_remove(Eina_Rbtree *root, Ein
a_Rbtree *node, Eina_Rbtree_Cmp_Node_Cb cmp, const void *data) EINA_ARG_NON
NULL(2, 3) EINA_WARN_UNUSED_RESULT; | | EAPI Eina_Rbtree *eina_rbtree_inline_remove(Eina_Rbtree *root, Ein
a_Rbtree *node, Eina_Rbtree_Cmp_Node_Cb cmp, const void *data) EINA_ARG_NON
NULL(2, 3) EINA_WARN_UNUSED_RESULT; | |
| | | | |
| /** | | /** | |
| * @brief Delete all nodes from a valid red black tree. | | * @brief Delete all nodes from a valid red black tree. | |
| * | | * | |
| * @param root The root of a valid red black tree. | | * @param root The root of a valid red black tree. | |
| * @param func The callback that will free each node. | | * @param func The callback that will free each node. | |
| * @param data Private data to help the compare function. | | * @param data Private data to help the compare function. | |
| | | | |
| skipping to change at line 203 | | skipping to change at line 203 | |
| * @brief Returned a new prefix iterator associated to a rbtree. | | * @brief Returned a new prefix iterator associated to a rbtree. | |
| * | | * | |
| * @param root The root of rbtree. | | * @param root The root of rbtree. | |
| * @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 | |
| * root. It will iterate the tree using prefix walk. If @p root is @c | | * root. It will iterate the tree using prefix walk. If @p root is @c | |
| * NULL, this function still returns a valid iterator that will always | | * NULL, this function still returns a valid iterator that will always | |
| * return false on eina_iterator_next(), thus keeping API sane. | | * return false on eina_iterator_next(), thus keeping API sane. | |
| * | | * | |
|
| * If the memory can not be allocated, NULL is returned and | | * If the memory can not be allocated, @c NULL is returned | |
| * #EINA_ERROR_OUT_OF_MEMORY is set. Otherwise, a valid iterator is | | * and #EINA_ERROR_OUT_OF_MEMORY is set. Otherwise, a valid iterator is | |
| * returned. | | * returned. | |
| * | | * | |
| * @warning if the rbtree structure changes then the iterator becomes | | * @warning if the rbtree structure changes then the iterator becomes | |
| * invalid! That is, if you add or remove nodes this iterator | | * invalid! That is, if you add or remove nodes this iterator | |
| * behavior is undefined and your program may crash! | | * behavior is undefined and your program may crash! | |
| */ | | */ | |
| EAPI Eina_Iterator *eina_rbtree_iterator_prefix(const Eina_Rbtree *r
oot) EINA_MALLOC EINA_WARN_UNUSED_RESULT; | | EAPI Eina_Iterator *eina_rbtree_iterator_prefix(const Eina_Rbtree *r
oot) EINA_MALLOC EINA_WARN_UNUSED_RESULT; | |
| | | | |
| /** | | /** | |
| * @brief Returned a new prefix iterator associated to a rbtree. | | * @brief Returned a new prefix iterator associated to a rbtree. | |
| * | | * | |
| * @param root The root of rbtree. | | * @param root The root of rbtree. | |
| * @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 | |
| * root. It will iterate the tree using infix walk. If @p root is @c | | * root. It will iterate the tree using infix walk. If @p root is @c | |
| * NULL, this function still returns a valid iterator that will always | | * NULL, this function still returns a valid iterator that will always | |
| * return false on eina_iterator_next(), thus keeping API sane. | | * return false on eina_iterator_next(), thus keeping API sane. | |
| * | | * | |
|
| * If the memory can not be allocated, NULL is returned and | | * If the memory can not be allocated, @c NULL is returned | |
| * #EINA_ERROR_OUT_OF_MEMORY is set. Otherwise, a valid iterator is | | * and #EINA_ERROR_OUT_OF_MEMORY is set. Otherwise, a valid iterator is | |
| * returned. | | * returned. | |
| * | | * | |
| * @warning if the rbtree structure changes then the iterator becomes | | * @warning if the rbtree structure changes then the iterator becomes | |
| * invalid! That is, if you add or remove nodes this iterator | | * invalid! That is, if you add or remove nodes this iterator | |
| * behavior is undefined and your program may crash! | | * behavior is undefined and your program may crash! | |
| */ | | */ | |
| EAPI Eina_Iterator *eina_rbtree_iterator_infix(const Eina_Rbtree *ro
ot) EINA_MALLOC EINA_WARN_UNUSED_RESULT; | | EAPI Eina_Iterator *eina_rbtree_iterator_infix(const Eina_Rbtree *ro
ot) EINA_MALLOC EINA_WARN_UNUSED_RESULT; | |
| | | | |
| /** | | /** | |
| * @brief Returned a new prefix iterator associated to a rbtree. | | * @brief Returned a new prefix iterator associated to a rbtree. | |
| * | | * | |
| * @param root The root of rbtree. | | * @param root The root of rbtree. | |
| * @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 | |
| * root. It will iterate the tree using postfix walk. If @p root is @c | | * root. It will iterate the tree using postfix walk. If @p root is @c | |
| * NULL, this function still returns a valid iterator that will always | | * NULL, this function still returns a valid iterator that will always | |
| * return false on eina_iterator_next(), thus keeping API sane. | | * return false on eina_iterator_next(), thus keeping API sane. | |
| * | | * | |
|
| * If the memory can not be allocated, NULL is returned and | | * If the memory can not be allocated, @c NULL is returned | |
| * #EINA_ERROR_OUT_OF_MEMORY is set. Otherwise, a valid iterator is | | * and #EINA_ERROR_OUT_OF_MEMORY is set. Otherwise, a valid iterator is | |
| * returned. | | * returned. | |
| * | | * | |
| * @warning if the rbtree structure changes then the iterator becomes | | * @warning if the rbtree structure changes then the iterator becomes | |
| * invalid! That is, if you add or remove nodes this iterator | | * invalid! That is, if you add or remove nodes this iterator | |
| * behavior is undefined and your program may crash! | | * behavior is undefined and your program may crash! | |
| */ | | */ | |
| EAPI Eina_Iterator *eina_rbtree_iterator_postfix(const Eina_Rbtree *
root) EINA_MALLOC EINA_WARN_UNUSED_RESULT; | | EAPI Eina_Iterator *eina_rbtree_iterator_postfix(const Eina_Rbtree *
root) EINA_MALLOC EINA_WARN_UNUSED_RESULT; | |
| | | | |
| #include "eina_inline_rbtree.x" | | #include "eina_inline_rbtree.x" | |
| | | | |
| | | | |
End of changes. 5 change blocks. |
| 8 lines changed or deleted | | 8 lines changed or added | |
|
| eina_simple_xml_parser.h | | eina_simple_xml_parser.h | |
| | | | |
| skipping to change at line 232 | | skipping to change at line 232 | |
| * @param strip whenever this parser should strip leading and trailing | | * @param strip whenever this parser should strip leading and trailing | |
| * whitespace. These whitespace will still be issued, but as type | | * whitespace. These whitespace will still be issued, but as type | |
| * #EINA_SIMPLE_XML_IGNORED. | | * #EINA_SIMPLE_XML_IGNORED. | |
| * @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 | |
| * token type, the third is the pointer to content start (it's | | * token type, the third is the pointer to content start (it's | |
| * not a NULL terminated string!), the forth is where this | | * not a NULL terminated string!), the forth is where this | |
| * content is located inside @a buf (does not include tag | | * content is located inside @a buf (does not include tag | |
| * start, for instance "<!DOCTYPE value>" the offset points at | | * start, for instance "<!DOCTYPE value>" the offset points at | |
| * "value"), the fifth is the size of the content. Whenever this | | * "value"), the fifth is the size of the content. Whenever this | |
|
| * function return EINA_FALSE the parser will abort. @param | | * function return #EINA_FALSE the parser will abort. @param | |
| * data what to give as context to @a func. | | * data what to give as context to @a func. | |
| * | | * | |
|
| * @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 o
r | |
| * 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. | |
| * | | * | |
| * @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. | |
| * @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(). @c NULL is returned | |
| * if no attributes were found. | | * if no attributes were found. | |
| * | | * | |
| * The tag contents is returned by eina_simple_xml_parse() when | | * The tag contents is returned by eina_simple_xml_parse() when | |
| * type is #EINA_SIMPLE_XML_OPEN or #EINA_SIMPLE_XML_OPEN_EMPTY. | | * 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. | | * @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 o
r | |
| * 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. | |
| * | | * | |
| * @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 attribute will be appended to attributes list. | | * as well as the attribute will be appended to attributes list. | |
|
| * @param key null-terminated string. Must not be NULL. | | * @param key Null-terminated string. Must not be @c NULL. | |
| * @param value null-terminated string. If NULL, the empty string will be u | | * @param value Null-terminated string. If @c NULL, the empty string will b | |
| sed. | | e used. | |
| * | | * | |
|
| * @return newly allocated memory or NULL on error. This memory should be | | * @return Newly allocated memory or @c NULL on error. This memory should b
e | |
| * released with eina_simple_xml_attribute_free() or indirectly | | * released with eina_simple_xml_attribute_free() or indirectly | |
| * with eina_simple_xml_node_tag_free(). | | * with eina_simple_xml_node_tag_free(). | |
| */ | | */ | |
| EAPI Eina_Simple_XML_Attribute * eina_simple_xml_attribute_new(Eina_Simple_
XML_Node_Tag *parent, const char *key, const char *value); | | EAPI Eina_Simple_XML_Attribute * eina_simple_xml_attribute_new(Eina_Simple_
XML_Node_Tag *parent, const char *key, const char *value); | |
| | | | |
| /** | | /** | |
| * Remove attribute from parent and delete it. | | * Remove attribute from parent and delete it. | |
| * | | * | |
| * @param attr attribute to release memory. | | * @param attr attribute to release memory. | |
| */ | | */ | |
| EAPI void eina_simple_xml_attribute_free(Eina_Simple_XML_Attribute *attr); | | EAPI void eina_simple_xml_attribute_free(Eina_Simple_XML_Attribute *attr); | |
| | | | |
| /** | | /** | |
| * Create new tag. If parent is provided, it is automatically appended. | | * Create new tag. 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 tag will be appended to children list. | | * as well as the tag will be appended to children list. | |
|
| * @param name null-terminated string. Must not be NULL. | | * @param name Null-terminated string. Must not be @c NULL. | |
| * | | * | |
|
| * @return newly allocated memory or NULL on error. This memory should be | | * @return Newly allocated memory or @c NULL on error. This memory should b
e | |
| * released with eina_simple_xml_node_tag_free() or indirectly | | * released with eina_simple_xml_node_tag_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_Tag * eina_simple_xml_node_tag_new(Eina_Simple_XM
L_Node_Tag *parent, const char *name); | | EAPI Eina_Simple_XML_Node_Tag * eina_simple_xml_node_tag_new(Eina_Simple_XM
L_Node_Tag *parent, const char *name); | |
| | | | |
| /** | | /** | |
| * Remove tag from parent and delete it. | | * Remove tag from parent and delete it. | |
| * | | * | |
| * @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 contents string to be used. Must not be NULL. | | * @param contents String to be used. Must not be @c NULL. | |
| * @param length size in bytes of @a contents. | | * @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 node 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 contents string to be used. Must not be NULL. | | * @param contents String to be used. Must not be @c 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 @c NULL on error. This memory should b
e | |
| * 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 node 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 contents string to be used. Must not be NULL. | | * @param contents String to be used. Must not be @c NULL. | |
| * @param length size in bytes of @a contents. | | * @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 @c NULL on error. This memory should b
e | |
| * 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 node 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 contents string to be used. Must not be NULL. | | * @param contents String to be used. Must not be @c NULL. | |
| * @param length size in bytes of @a contents. | | * @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 @c NULL on error. This memory should b
e | |
| * 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 node 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 contents string to be used. Must not be NULL. | | * @param contents String to be used. Must not be @c NULL. | |
| * @param length size in bytes of @a contents. | | * @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 @c NULL on error. This memory should b
e | |
| * 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 node 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. | |
| * | | * | |
|
| * @return document root with children tags, or NULL on errors. | | * @return Document root with children tags, or @c NULL on errors. | |
| * Document with errors may return partial tree instead of NULL, | | * Document with errors may return partial tree instead of @c NULL, | |
| * we'll do our best to avoid returning nothing. | | * we'll do our best to avoid returning nothing. | |
| */ | | */ | |
| EAPI Eina_Simple_XML_Node_Root * eina_simple_xml_node_load(const char *buf,
unsigned buflen, Eina_Bool strip); | | EAPI Eina_Simple_XML_Node_Root * eina_simple_xml_node_load(const char *buf,
unsigned buflen, Eina_Bool strip); | |
| | | | |
| /** | | /** | |
| * Free node tree build with eina_simple_xml_node_load() | | * Free node tree build with eina_simple_xml_node_load() | |
| * | | * | |
| * @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 @c NULL to disable it. | |
| * | | * | |
|
| * @return NULL on errors or a newly allocated string on success. | | * @return @c 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. 21 change blocks. |
| 24 lines changed or deleted | | 24 lines changed or added | |
|
| eina_str.h | | eina_str.h | |
| | | | |
| skipping to change at line 94 | | skipping to change at line 94 | |
| | | | |
| /** | | /** | |
| * @brief Copy a c-string to another. | | * @brief Copy a c-string to another. | |
| * | | * | |
| * @param dst The destination string. | | * @param dst The destination string. | |
| * @param src The source string. | | * @param src The source string. | |
| * @param siz The size of the destination string. | | * @param siz The size of the destination string. | |
| * @return The length of the source string. | | * @return The length of the source string. | |
| * | | * | |
| * This function copies up to @p siz - 1 characters from the | | * This function copies up to @p siz - 1 characters from the | |
|
| * NUL-terminated string @p src to @p dst, NUL-terminating the result | | * NULL-terminated string @p src to @p dst, NULL-terminating the result | |
| * (unless @p siz is equal to 0). The returned value is the length of | | * (unless @p siz is equal to 0). The returned value is the length of | |
| * @p src. If the returned value is greater than @p siz, truncation | | * @p src. If the returned value is greater than @p siz, truncation | |
| * occurred. | | * occurred. | |
| * | | * | |
| * @note The main difference between eina_strlcpy and strncpy is that this | | * @note The main difference between eina_strlcpy and strncpy is that this | |
|
| * ensures @p dst is NULL terminated even if no NULL byte is found in the f
irst | | * ensures @p dst is NULL-terminated even if no @c NULL byte is found in th
e first | |
| * @p siz bytes of src. | | * @p siz bytes of src. | |
| */ | | */ | |
| EAPI size_t eina_strlcpy(char *dst, const char *src, size_t siz) E
INA_ARG_NONNULL(1, 2); | | EAPI size_t eina_strlcpy(char *dst, const char *src, size_t siz) E
INA_ARG_NONNULL(1, 2); | |
| | | | |
| /** | | /** | |
| * @brief Append a c-string. | | * @brief Append a c-string. | |
| * | | * | |
| * @param dst The destination string. | | * @param dst The destination string. | |
| * @param src The source string. | | * @param src The source string. | |
| * @param siz The size of the destination string. | | * @param siz The size of the destination string. | |
| * @return The length of the source string plus MIN(siz, strlen(initial dst
)) | | * @return The length of the source string plus MIN(siz, strlen(initial dst
)) | |
| * | | * | |
| * This function appends @p src to @p dst of size @p siz (unlike | | * This function appends @p src to @p dst of size @p siz (unlike | |
| * strncat, @p siz is the full size of @p dst, not space left). At | | * strncat, @p siz is the full size of @p dst, not space left). At | |
|
| * most @p siz - 1 characters will be copied. Always NUL terminates | | * most @p siz - 1 characters will be copied. Always NULL-terminates | |
| * (unless @p siz <= strlen(dst)). This function returns strlen(src) + | | * (unless @p siz <= strlen(dst)). This function returns strlen(src) + | |
| * MIN(siz, strlen(initial dst)). If the returned value is greater or | | * MIN(siz, strlen(initial dst)). If the returned value is greater or | |
| * equal than @p siz, truncation occurred. | | * equal than @p siz, truncation occurred. | |
| */ | | */ | |
| EAPI size_t eina_strlcat(char *dst, const char *src, size_t siz) E
INA_ARG_NONNULL(1, 2); | | EAPI size_t eina_strlcat(char *dst, const char *src, size_t siz) E
INA_ARG_NONNULL(1, 2); | |
| | | | |
| /** | | /** | |
| * @brief Check if the given string has the given prefix. | | * @brief Check if the given string has the given prefix. | |
| * | | * | |
| * @param str The string to work with. | | * @param str The string to work with. | |
| | | | |
| skipping to change at line 166 | | skipping to change at line 166 | |
| * 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 string The string to split. | | * @param string The string to split. | |
| * @param delimiter The string which specifies the places at which to split
the string. | | * @param delimiter The string which specifies the places at which to split
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 @c NULL if
it | |
| * fails to allocate the array. | | * fails to allocate the array. | |
| * | | * | |
| * This functin splits @p string 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 delimiter. @p delimiter 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 @c 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 string The string to split. | | * @param string The string to split. | |
| * @param delimiter The string which specifies the places at which to split
the string. | | * @param delimiter The string which specifies the places at which to split
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 @c NULL if
it | |
| * fails to allocate the array. | | * fails to allocate the array. | |
| * | | * | |
| * This function splits @p string 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 delimiter. @p delimiter 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 @c 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() | |
| */ | | */ | |
| EAPI char **eina_str_split_full(const char *string, const char *de
limiter, int max_tokens, unsigned int *elements) EINA_ARG_NONNULL(1, 2, 4)
EINA_MALLOC EINA_WARN_UNUSED_RESULT; | | EAPI char **eina_str_split_full(const char *string, const char *de
limiter, int max_tokens, unsigned int *elements) EINA_ARG_NONNULL(1, 2, 4)
EINA_MALLOC EINA_WARN_UNUSED_RESULT; | |
| | | | |
| /** | | /** | |
| * @brief Join two strings of known length. | | * @brief Join two strings of known length. | |
| * | | * | |
| | | | |
End of changes. 7 change blocks. |
| 7 lines changed or deleted | | 7 lines changed or added | |
|
| eina_strbuf.h | | eina_strbuf.h | |
| | | | |
| skipping to change at line 148 | | skipping to change at line 148 | |
| /** | | /** | |
| * @brief Append a string to a buffer, reallocating as necessary. | | * @brief Append a string to a buffer, reallocating as necessary. | |
| * | | * | |
| * @param buf The string buffer to append to. | | * @param buf The string buffer to append to. | |
| * @param str The string to append. | | * @param str The string to append. | |
| * @return #EINA_TRUE on success, #EINA_FALSE on failure. | | * @return #EINA_TRUE on success, #EINA_FALSE on failure. | |
| * | | * | |
| * This function appends @p str to @p buf. It computes the length of | | * This function appends @p str to @p buf. It computes the length of | |
| * @p str, so is slightly slower than eina_strbuf_append_length(). If | | * @p str, so is slightly slower than eina_strbuf_append_length(). If | |
| * the length is known beforehand, consider using that variant. If | | * the length is known beforehand, consider using that variant. If | |
|
| * @p buf can't append it, #EINA_FALSE is returned, otherwise | | * @p buf can't append it, #EINA_FALSE is returned, otherwise #EINA_TRUE is | |
| * #EINA_TRUE is returned. | | * returned. | |
| * | | * | |
| * @see eina_strbuf_append() | | * @see eina_strbuf_append() | |
| * @see eina_strbuf_append_length() | | * @see eina_strbuf_append_length() | |
| */ | | */ | |
| EAPI Eina_Bool eina_strbuf_append(Eina_Strbuf *buf, const char *str) EINA_A
RG_NONNULL(1, 2); | | EAPI Eina_Bool eina_strbuf_append(Eina_Strbuf *buf, const char *str) EINA_A
RG_NONNULL(1, 2); | |
| | | | |
| /** | | /** | |
| * @brief Append an escaped string to a buffer, reallocating as necessary. | | * @brief Append an escaped string to a buffer, reallocating as necessary. | |
| * | | * | |
| * @param buf The string buffer to append to. | | * @param buf The string buffer to append to. | |
| | | | |
| skipping to change at line 221 | | skipping to change at line 221 | |
| EAPI Eina_Bool eina_strbuf_append_length(Eina_Strbuf *buf, const char *str,
size_t length) EINA_ARG_NONNULL(1, 2); | | EAPI Eina_Bool eina_strbuf_append_length(Eina_Strbuf *buf, const char *str,
size_t length) EINA_ARG_NONNULL(1, 2); | |
| | | | |
| /** | | /** | |
| * @brief Append a character to a string buffer, reallocating as | | * @brief Append a character to a string buffer, reallocating as | |
| * necessary. | | * necessary. | |
| * | | * | |
| * @param buf The string buffer to append to. | | * @param buf The string buffer to append to. | |
| * @param c The char to append. | | * @param c The char to append. | |
| * @return #EINA_TRUE on success, #EINA_FALSE on failure. | | * @return #EINA_TRUE on success, #EINA_FALSE on failure. | |
| * | | * | |
|
| * This function inserts @p c to @p buf. If it can not insert it, | | * This function inserts @p c to @p buf. If it can not insert it, #EINA_FAL | |
| * #EINA_FALSE is returned, otherwise #EINA_TRUE is returned. | | SE | |
| | | * is returned, otherwise #EINA_TRUE is returned. | |
| */ | | */ | |
| EAPI Eina_Bool eina_strbuf_append_char(Eina_Strbuf *buf, char c) EINA_ARG_N
ONNULL(1); | | EAPI Eina_Bool eina_strbuf_append_char(Eina_Strbuf *buf, char c) EINA_ARG_N
ONNULL(1); | |
| | | | |
| /** | | /** | |
| * @brief Append a string to a buffer, reallocating as necessary. | | * @brief Append a string to a buffer, reallocating as necessary. | |
| * | | * | |
| * @param buf The string buffer to append to. | | * @param buf The string buffer to append to. | |
| * @param fmt The string to append. | | * @param fmt The string to append. | |
| * @return #EINA_TRUE on success, #EINA_FALSE on failure. | | * @return #EINA_TRUE on success, #EINA_FALSE on failure. | |
| * | | * | |
| | | | |
| skipping to change at line 351 | | skipping to change at line 351 | |
| /** | | /** | |
| * @brief Insert a string to a buffer, reallocating as necessary. | | * @brief Insert a string to a buffer, reallocating as necessary. | |
| * | | * | |
| * @param buf The string buffer to insert. | | * @param buf The string buffer to insert. | |
| * @param fmt The string to insert. | | * @param fmt The string to insert. | |
| * @param pos The position to insert the string. | | * @param pos The position to insert the string. | |
| * @return #EINA_TRUE on success, #EINA_FALSE on failure. | | * @return #EINA_TRUE on success, #EINA_FALSE on failure. | |
| * | | * | |
| * This function insert a string as described by the format @p fmt to @p bu
f at | | * This function insert a string as described by the format @p fmt to @p bu
f at | |
| * the position @p pos. @p fmt must be of a valid format for printf family
of | | * the position @p pos. @p fmt must be of a valid format for printf family
of | |
|
| * functions. If it can't insert it, #EINA_FALSE is returned, otherwise | | * functions. If it can't insert it, #EINA_FALSE is returned, | |
| * #EINA_TRUE is returned. | | * otherwise #EINA_TRUE is returned. | |
| */ | | */ | |
| EAPI Eina_Bool eina_strbuf_insert_printf(Eina_Strbuf *buf, const char *fmt,
size_t pos, ...) EINA_ARG_NONNULL(1, 2) EINA_PRINTF(2, 4); | | EAPI Eina_Bool eina_strbuf_insert_printf(Eina_Strbuf *buf, const char *fmt,
size_t pos, ...) EINA_ARG_NONNULL(1, 2) EINA_PRINTF(2, 4); | |
| | | | |
| /** | | /** | |
| * @brief Insert a string to a buffer, reallocating as necessary. | | * @brief Insert a string to a buffer, reallocating as necessary. | |
| * | | * | |
| * @param buf The string buffer to insert. | | * @param buf The string buffer to insert. | |
| * @param fmt The string to insert. | | * @param fmt The string to insert. | |
| * @param pos The position to insert the string. | | * @param pos The position to insert the string. | |
| * @param args The variable arguments. | | * @param args The variable arguments. | |
| | | | |
| skipping to change at line 392 | | skipping to change at line 392 | |
| | | | |
| /** | | /** | |
| * @def eina_strbuf_prepend_escaped(buf, str) | | * @def eina_strbuf_prepend_escaped(buf, str) | |
| * @brief Prepend the given escaped string to the given buffer | | * @brief Prepend the given escaped string to the given buffer | |
| * | | * | |
| * @param buf The string buffer to prepend to. | | * @param buf The string buffer to prepend to. | |
| * @param str The string to prepend. | | * @param str The string to prepend. | |
| * @return #EINA_TRUE on success, #EINA_FALSE on failure. | | * @return #EINA_TRUE on success, #EINA_FALSE on failure. | |
| * | | * | |
| * This macro is calling eina_strbuf_insert_escaped() at position 0. If | | * This macro is calling eina_strbuf_insert_escaped() at position 0. If | |
|
| * @p buf can't prepend it, #EINA_FALSE is returned, otherwise | | * @p buf can't prepend it, #EINA_FALSE is returned, otherwise #EINA_TRUE i | |
| * #EINA_TRUE is returned. | | s | |
| | | * returned. | |
| */ | | */ | |
| #define eina_strbuf_prepend_escaped(buf, str) eina_strbuf_insert_esc
aped(buf, str, 0) | | #define eina_strbuf_prepend_escaped(buf, str) eina_strbuf_insert_esc
aped(buf, str, 0) | |
| | | | |
| /** | | /** | |
| * @def eina_strbuf_prepend_n(buf, str) | | * @def eina_strbuf_prepend_n(buf, str) | |
| * @brief Prepend the given escaped string to the given buffer | | * @brief Prepend the given escaped string to the given buffer | |
| * | | * | |
| * @param buf The string buffer to prepend to. | | * @param buf The string buffer to prepend to. | |
| * @param str The string to prepend. | | * @param str The string to prepend. | |
| * @param maxlen The maximum number of chars to prepend. | | * @param maxlen The maximum number of chars to prepend. | |
| * @return #EINA_TRUE on success, #EINA_FALSE on failure. | | * @return #EINA_TRUE on success, #EINA_FALSE on failure. | |
| * | | * | |
| * This macro is calling eina_strbuf_insert_n() at position 0. If | | * This macro is calling eina_strbuf_insert_n() at position 0. If | |
|
| * @p buf can't prepend it, #EINA_FALSE is returned, otherwise | | * @p buf can't prepend it, #EINA_FALSE is returned, otherwise #EINA_TRUE i | |
| * #EINA_TRUE is returned. | | s | |
| | | * returned. | |
| */ | | */ | |
| #define eina_strbuf_prepend_n(buf, str, maxlen) eina_strbuf_insert_n(b
uf, str, maxlen, 0) | | #define eina_strbuf_prepend_n(buf, str, maxlen) eina_strbuf_insert_n(b
uf, str, maxlen, 0) | |
| | | | |
| /** | | /** | |
| * @def eina_strbuf_prepend_length(buf, str) | | * @def eina_strbuf_prepend_length(buf, str) | |
| * @brief Prepend the given escaped string to the given buffer | | * @brief Prepend the given escaped string to the given buffer | |
| * | | * | |
| * @param buf The string buffer to prepend to. | | * @param buf The string buffer to prepend to. | |
| * @param str The string to prepend. | | * @param str The string to prepend. | |
| * @param length The exact length to use. | | * @param length The exact length to use. | |
| * @return #EINA_TRUE on success, #EINA_FALSE on failure. | | * @return #EINA_TRUE on success, #EINA_FALSE on failure. | |
| * | | * | |
| * This macro is calling eina_strbuf_insert_length() at position 0. If | | * This macro is calling eina_strbuf_insert_length() at position 0. If | |
|
| * @p buf can't prepend it, #EINA_FALSE is returned, otherwise | | * @p buf can't prepend it, #EINA_FALSE is returned, otherwise #EINA_TRUE i | |
| * #EINA_TRUE is returned. | | s | |
| | | * returned. | |
| */ | | */ | |
| #define eina_strbuf_prepend_length(buf, str, length) eina_strbuf_insert_len
gth(buf, str, length, 0) | | #define eina_strbuf_prepend_length(buf, str, length) eina_strbuf_insert_len
gth(buf, str, length, 0) | |
| | | | |
| /** | | /** | |
| * @def eina_strbuf_prepend_char(buf, str) | | * @def eina_strbuf_prepend_char(buf, str) | |
| * @brief Prepend the given character to the given buffer | | * @brief Prepend the given character to the given buffer | |
| * | | * | |
| * @param buf The string buffer to prepend to. | | * @param buf The string buffer to prepend to. | |
| * @param c The character to prepend. | | * @param c The character to prepend. | |
| * @return #EINA_TRUE on success, #EINA_FALSE on failure. | | * @return #EINA_TRUE on success, #EINA_FALSE on failure. | |
| * | | * | |
| * This macro is calling eina_strbuf_insert_char() at position 0. If | | * This macro is calling eina_strbuf_insert_char() at position 0. If | |
|
| * @p buf can't prepend it, #EINA_FALSE is returned, otherwise | | * @p buf can't prepend it, #EINA_FALSE is returned, otherwise #EINA_TRUE | |
| * #EINA_TRUE is returned. | | * is returned. | |
| */ | | */ | |
| #define eina_strbuf_prepend_char(buf, c) eina_strbuf_insert_cha
r(buf, c, 0) | | #define eina_strbuf_prepend_char(buf, c) eina_strbuf_insert_cha
r(buf, c, 0) | |
| | | | |
| /** | | /** | |
| * @def eina_strbuf_prepend_printf(buf, fmt, ...) | | * @def eina_strbuf_prepend_printf(buf, fmt, ...) | |
| * @brief Prepend the given string to the given buffer | | * @brief Prepend the given string to the given buffer | |
| * | | * | |
| * @param buf The string buffer to prepend to. | | * @param buf The string buffer to prepend to. | |
| * @param fmt The string to prepend. | | * @param fmt The string to prepend. | |
| * @return #EINA_TRUE on success, #EINA_FALSE on failure. | | * @return #EINA_TRUE on success, #EINA_FALSE on failure. | |
| * | | * | |
|
| * This macro is calling eina_strbuf_insert_printf() at position 0.If @p bu
f | | * This macro is calling eina_strbuf_insert_printf() at position 0. If @p b
uf | |
| * can't prepend it, #EINA_FALSE is returned, otherwise #EINA_TRUE is | | * can't prepend it, #EINA_FALSE is returned, otherwise #EINA_TRUE is | |
| * returned. | | * returned. | |
| */ | | */ | |
| #define eina_strbuf_prepend_printf(buf, fmt, ...) eina_strbuf_insert_pri
ntf(buf, fmt, 0, ## __VA_ARGS__) | | #define eina_strbuf_prepend_printf(buf, fmt, ...) eina_strbuf_insert_pri
ntf(buf, fmt, 0, ## __VA_ARGS__) | |
| | | | |
| /** | | /** | |
| * @def eina_strbuf_prepend_vprintf(buf, fmt, args) | | * @def eina_strbuf_prepend_vprintf(buf, fmt, args) | |
| * @brief Prepend the given string to the given buffer | | * @brief Prepend the given string to the given buffer | |
| * | | * | |
| * @param buf The string buffer to prepend to. | | * @param buf The string buffer to prepend to. | |
| | | | |
| skipping to change at line 577 | | skipping to change at line 577 | |
| /** | | /** | |
| * @brief Replace all strings with an other string. | | * @brief Replace all strings with an other string. | |
| | | | |
| * @param buf the string buffer to work with. | | * @param buf the string buffer to work with. | |
| * @param str The string to replace. | | * @param str The string to replace. | |
| * @param with The replaceing string. | | * @param with The replaceing string. | |
| * @return How often the string was replaced. | | * @return How often the string was replaced. | |
| * | | * | |
| * This function replaces all the occurrences of @p str in @p buf with | | * This function replaces all the occurrences of @p str in @p buf with | |
| * the string @p with. This function returns the number of times @p str | | * the string @p with. This function returns the number of times @p str | |
|
| * has been replaced. On failure, it returns 0. | | * has been replaced. On failure, it returns @c 0. | |
| */ | | */ | |
| EAPI int eina_strbuf_replace_all(Eina_Strbuf *buf, const char *str, const c
har *with) EINA_ARG_NONNULL(1, 2, 3); | | EAPI int eina_strbuf_replace_all(Eina_Strbuf *buf, const char *str, const c
har *with) EINA_ARG_NONNULL(1, 2, 3); | |
| | | | |
| /** | | /** | |
| * @brief Trim the string buffer | | * @brief Trim the string buffer | |
| | | | |
| * @param buf the string buffer to work with. | | * @param buf the string buffer to work with. | |
| * | | * | |
| * This function skips whitespaces in the beginning and the end of the buff
er. | | * This function skips whitespaces in the beginning and the end of the buff
er. | |
| */ | | */ | |
| | | | |
End of changes. 9 change blocks. |
| 16 lines changed or deleted | | 20 lines changed or added | |
|
| eina_stringshare.h | | eina_stringshare.h | |
| | | | |
| skipping to change at line 199 | | skipping to change at line 199 | |
| * exact given size. This can be used to share_common part of a larger | | * exact given size. This can be used to share_common part of a larger | |
| * buffer or substring. | | * buffer or substring. | |
| * | | * | |
| * @see eina_share_common_add() | | * @see eina_share_common_add() | |
| */ | | */ | |
| EAPI Eina_Stringshare *eina_stringshare_add_length(const char *str, unsign
ed int slen) EINA_WARN_UNUSED_RESULT; | | EAPI Eina_Stringshare *eina_stringshare_add_length(const char *str, unsign
ed int slen) EINA_WARN_UNUSED_RESULT; | |
| | | | |
| /** | | /** | |
| * @brief Retrieve an instance of a string for use in a program. | | * @brief Retrieve an instance of a string for use in a program. | |
| * | | * | |
|
| * @param str The NULL terminated string to retrieve an instance of. | | * @param str The NULL-terminated string to retrieve an instance of. | |
| * @return A pointer to an instance of the string on success. | | * @return A pointer to an instance of the string on success. | |
| * @c NULL on failure. | | * @c NULL on failure. | |
| * | | * | |
| * This function retrieves an instance of @p str. If @p str is | | * This function retrieves an instance of @p str. If @p str is | |
| * @c NULL, then @c NULL is returned. If @p str is already stored, it | | * @c NULL, then @c NULL is returned. If @p str is already stored, it | |
| * is just returned and its reference counter is increased. Otherwise | | * is just returned and its reference counter is increased. Otherwise | |
| * a duplicated string of @p str is returned. | | * a duplicated string of @p str is returned. | |
| * | | * | |
| * The string @p str must be NULL terminated ('@\0') and its full | | * The string @p str must be NULL terminated ('@\0') and its full | |
| * length will be used. To use part of the string or non-null | | * length will be used. To use part of the string or non-null | |
| * terminated, use eina_stringshare_add_length() instead. | | * terminated, use eina_stringshare_add_length() instead. | |
| * | | * | |
| * @see eina_stringshare_add_length() | | * @see eina_stringshare_add_length() | |
| */ | | */ | |
| EAPI Eina_Stringshare *eina_stringshare_add(const char *str) EINA_WARN_UNU
SED_RESULT; | | EAPI Eina_Stringshare *eina_stringshare_add(const char *str) EINA_WARN_UNU
SED_RESULT; | |
| | | | |
| /** | | /** | |
| * @brief Retrieve an instance of a string for use in a program | | * @brief Retrieve an instance of a string for use in a program | |
| * from a format string. | | * from a format string. | |
| * | | * | |
|
| * @param fmt The NULL terminated format string to retrieve an instance o
f. | | * @param fmt The NULL-terminated format string to retrieve an instance o
f. | |
| * @return A pointer to an instance of the string on success. | | * @return A pointer to an instance of the string on success. | |
| * @c NULL on failure. | | * @c NULL on failure. | |
| * | | * | |
| * This function retrieves an instance of @p fmt. If @p fmt is | | * This function retrieves an instance of @p fmt. If @p fmt is | |
| * @c NULL, then @c NULL is returned. If @p fmt is already stored, it | | * @c NULL, then @c NULL is returned. If @p fmt is already stored, it | |
| * is just returned and its reference counter is increased. Otherwise | | * is just returned and its reference counter is increased. Otherwise | |
| * a duplicated string is returned. | | * a duplicated string is returned. | |
| * | | * | |
|
| * The format string @p fmt must be NULL terminated ('@\0') and its full | | * The format string @p fmt must be NULL-terminated ('@\0') and its full | |
| * length will be used. To use part of the format string or non-null | | * length will be used. To use part of the format string or non-null | |
| * terminated, use eina_stringshare_nprintf() instead. | | * terminated, use eina_stringshare_nprintf() instead. | |
| * | | * | |
| * @see eina_stringshare_nprintf() | | * @see eina_stringshare_nprintf() | |
| */ | | */ | |
| EAPI Eina_Stringshare *eina_stringshare_printf(const char *fmt, ...) EINA_
WARN_UNUSED_RESULT EINA_PRINTF(1, 2); | | EAPI Eina_Stringshare *eina_stringshare_printf(const char *fmt, ...) EINA_
WARN_UNUSED_RESULT EINA_PRINTF(1, 2); | |
| | | | |
| /** | | /** | |
| * @brief Retrieve an instance of a string for use in a program | | * @brief Retrieve an instance of a string for use in a program | |
| * from a format string. | | * from a format string. | |
| * | | * | |
|
| * @param fmt The NULL terminated format string to retrieve an instance o
f. | | * @param fmt The NULL-terminated format string to retrieve an instance o
f. | |
| * @param args The va_args for @p fmt | | * @param args The va_args for @p fmt | |
| * @return A pointer to an instance of the string on success. | | * @return A pointer to an instance of the string on success. | |
| * @c NULL on failure. | | * @c NULL on failure. | |
| * | | * | |
| * This function retrieves an instance of @p fmt with @p args. If @p fmt is | | * This function retrieves an instance of @p fmt with @p args. If @p fmt is | |
| * @c NULL, then @c NULL is returned. If @p fmt with @p args is already sto
red, it | | * @c NULL, then @c NULL is returned. If @p fmt with @p args is already sto
red, it | |
| * is just returned and its reference counter is increased. Otherwise | | * is just returned and its reference counter is increased. Otherwise | |
| * a duplicated string is returned. | | * a duplicated string is returned. | |
| * | | * | |
|
| * The format string @p fmt must be NULL terminated ('@\0') and its full | | * The format string @p fmt must be NULL-terminated ('@\0') and its full | |
| * length will be used. To use part of the format string or non-null | | * length will be used. To use part of the format string or non-null | |
| * terminated, use eina_stringshare_nprintf() instead. | | * terminated, use eina_stringshare_nprintf() instead. | |
| * | | * | |
| * @see eina_stringshare_nprintf() | | * @see eina_stringshare_nprintf() | |
| */ | | */ | |
| EAPI Eina_Stringshare *eina_stringshare_vprintf(const char *fmt, va_list a
rgs) EINA_WARN_UNUSED_RESULT; | | EAPI Eina_Stringshare *eina_stringshare_vprintf(const char *fmt, va_list a
rgs) EINA_WARN_UNUSED_RESULT; | |
| | | | |
| /** | | /** | |
| * @brief Retrieve an instance of a string for use in a program | | * @brief Retrieve an instance of a string for use in a program | |
| * from a format string with size limitation. | | * from a format string with size limitation. | |
| | | | |
| skipping to change at line 302 | | skipping to change at line 302 | |
| */ | | */ | |
| EAPI Eina_Stringshare *eina_stringshare_ref(Eina_Stringshare *str); | | EAPI Eina_Stringshare *eina_stringshare_ref(Eina_Stringshare *str); | |
| | | | |
| /** | | /** | |
| * @brief Note that the given string has lost an instance. | | * @brief Note that the given string has lost an instance. | |
| * | | * | |
| * @param str string The given string. | | * @param str string The given string. | |
| * | | * | |
| * This function decreases the reference counter associated to @p str | | * This function decreases the reference counter associated to @p str | |
| * if it exists. If that counter reaches 0, the memory associated to | | * if it exists. If that counter reaches 0, the memory associated to | |
|
| * @p str is freed. If @p str is NULL, the function returns | | * @p str is freed. If @p str is @c NULL, the function returns | |
| * immediately. | | * immediately. | |
| * | | * | |
| * Note that if the given pointer is not shared or NULL, bad things | | * Note that if the given pointer is not shared or NULL, bad things | |
| * will happen, likely a segmentation fault. | | * will happen, likely a segmentation fault. | |
| */ | | */ | |
| EAPI void eina_stringshare_del(Eina_Stringshare *str); | | EAPI void eina_stringshare_del(Eina_Stringshare *str); | |
| | | | |
| /** | | /** | |
| * @brief Note that the given string @b must be shared. | | * @brief Note that the given string @b must be shared. | |
| * | | * | |
| * @param str the shared string to know the length. It is safe to | | * @param str the shared string to know the length. It is safe to | |
|
| * give NULL, in that case -1 is returned. | | * give @c NULL, in that case @c -1 is returned. | |
| * @return The length of a shared string. | | * @return The length of a shared string. | |
| * | | * | |
| * This function is a cheap way to known the length of a shared | | * This function is a cheap way to known the length of a shared | |
| * string. Note that if the given pointer is not shared, bad | | * string. Note that if the given pointer is not shared, bad | |
| * things will happen, likely a segmentation fault. If in doubt, try | | * things will happen, likely a segmentation fault. If in doubt, try | |
| * strlen(). | | * strlen(). | |
| */ | | */ | |
| EAPI int eina_stringshare_strlen(Eina_Stringshare *str) EINA
_PURE EINA_WARN_UNUSED_RESULT; | | EAPI int eina_stringshare_strlen(Eina_Stringshare *str) EINA
_PURE EINA_WARN_UNUSED_RESULT; | |
| | | | |
| /** | | /** | |
| | | | |
End of changes. 7 change blocks. |
| 7 lines changed or deleted | | 7 lines changed or added | |
|
| eina_ustrbuf.h | | eina_ustrbuf.h | |
| | | | |
| skipping to change at line 118 | | skipping to change at line 118 | |
| /** | | /** | |
| * @brief Append a string to a buffer, reallocating as necessary. | | * @brief Append a string to a buffer, reallocating as necessary. | |
| * | | * | |
| * @param buf The string buffer to append to. | | * @param buf The string buffer to append to. | |
| * @param str The string to append. | | * @param str The string to append. | |
| * @return #EINA_TRUE on success, #EINA_FALSE on failure. | | * @return #EINA_TRUE on success, #EINA_FALSE on failure. | |
| * | | * | |
| * This function appends @p str to @p buf. It computes the length of | | * This function appends @p str to @p buf. It computes the length of | |
| * @p str, so is slightly slower than eina_ustrbuf_append_length(). If | | * @p str, so is slightly slower than eina_ustrbuf_append_length(). If | |
| * the length is known beforehand, consider using that variant. If | | * the length is known beforehand, consider using that variant. If | |
|
| * @p buf can't append it, #EINA_FALSE is returned, otherwise | | * @p buf can't append it, #EINA_FALSE is returned, otherwise #EINA_TRUE is | |
| * #EINA_TRUE is returned. | | * returned. | |
| * | | * | |
| * @see eina_ustrbuf_append() | | * @see eina_ustrbuf_append() | |
| * @see eina_ustrbuf_append_length() | | * @see eina_ustrbuf_append_length() | |
| */ | | */ | |
| EAPI Eina_Bool eina_ustrbuf_append(Eina_UStrbuf *buf, const Eina_Unicode *s
tr) EINA_ARG_NONNULL(1, 2); | | EAPI Eina_Bool eina_ustrbuf_append(Eina_UStrbuf *buf, const Eina_Unicode *s
tr) EINA_ARG_NONNULL(1, 2); | |
| | | | |
| /** | | /** | |
| * @brief Append an escaped string to a buffer, reallocating as necessary. | | * @brief Append an escaped string to a buffer, reallocating as necessary. | |
| * | | * | |
| * @param buf The string buffer to append to. | | * @param buf The string buffer to append to. | |
| * @param str The string to append. | | * @param str The string to append. | |
| * @return #EINA_TRUE on success, #EINA_FALSE on failure. | | * @return #EINA_TRUE on success, #EINA_FALSE on failure. | |
| * | | * | |
| * This function appends the escaped string @p str to @p buf. If @p | | * This function appends the escaped string @p str to @p buf. If @p | |
|
| * str can not be appended, #EINA_FALSE is returned, otherwise, | | * str can not be appended, #EINA_FALSE is returned, otherwise, #EINA_TRUE | |
| * #EINA_TRUE is returned. | | is | |
| | | * returned. | |
| */ | | */ | |
| EAPI Eina_Bool eina_ustrbuf_append_escaped(Eina_UStrbuf *buf, const Eina_Un
icode *str) EINA_ARG_NONNULL(1, 2); | | EAPI Eina_Bool eina_ustrbuf_append_escaped(Eina_UStrbuf *buf, const Eina_Un
icode *str) EINA_ARG_NONNULL(1, 2); | |
| | | | |
| /** | | /** | |
| * @brief Append a string to a buffer, reallocating as necessary, | | * @brief Append a string to a buffer, reallocating as necessary, | |
| * limited by the given length. | | * limited by the given length. | |
| * | | * | |
| * @param buf The string buffer to append to. | | * @param buf The string buffer to append to. | |
| * @param str The string to append. | | * @param str The string to append. | |
| * @param maxlen The maximum number of characters to append. | | * @param maxlen The maximum number of characters to append. | |
| | | | |
| skipping to change at line 191 | | skipping to change at line 191 | |
| EAPI Eina_Bool eina_ustrbuf_append_length(Eina_UStrbuf *buf, const Eina_Uni
code *str, size_t length) EINA_ARG_NONNULL(1, 2); | | EAPI Eina_Bool eina_ustrbuf_append_length(Eina_UStrbuf *buf, const Eina_Uni
code *str, size_t length) EINA_ARG_NONNULL(1, 2); | |
| | | | |
| /** | | /** | |
| * @brief Append a character to a string buffer, reallocating as | | * @brief Append a character to a string buffer, reallocating as | |
| * necessary. | | * necessary. | |
| * | | * | |
| * @param buf The string buffer to append to. | | * @param buf The string buffer to append to. | |
| * @param c The char to append. | | * @param c The char to append. | |
| * @return #EINA_TRUE on success, #EINA_FALSE on failure. | | * @return #EINA_TRUE on success, #EINA_FALSE on failure. | |
| * | | * | |
|
| * This function inserts @p c to @p buf. If it can not insert it, | | * This function inserts @p c to @p buf. If it can not insert it, #EINA_FAL | |
| * #EINA_FALSE is returned, otherwise #EINA_TRUE is returned. | | SE | |
| | | * is returned, otherwise #EINA_TRUE is returned. | |
| */ | | */ | |
| EAPI Eina_Bool eina_ustrbuf_append_char(Eina_UStrbuf *buf, Eina_Unicode c)
EINA_ARG_NONNULL(1); | | EAPI Eina_Bool eina_ustrbuf_append_char(Eina_UStrbuf *buf, Eina_Unicode c)
EINA_ARG_NONNULL(1); | |
| | | | |
| /** | | /** | |
| * @brief Insert a string to a buffer, reallocating as necessary. | | * @brief Insert a string to a buffer, reallocating as necessary. | |
| * | | * | |
| * @param buf The string buffer to insert. | | * @param buf The string buffer to insert. | |
| * @param str The string to insert. | | * @param str The string to insert. | |
| * @param pos The position to insert the string. | | * @param pos The position to insert the string. | |
| * @return #EINA_TRUE on success, #EINA_FALSE on failure. | | * @return #EINA_TRUE on success, #EINA_FALSE on failure. | |
| | | | |
| skipping to change at line 307 | | skipping to change at line 307 | |
| | | | |
| /** | | /** | |
| * @def eina_ustrbuf_prepend_escaped(buf, str) | | * @def eina_ustrbuf_prepend_escaped(buf, str) | |
| * @brief Prepend the given escaped string to the given buffer | | * @brief Prepend the given escaped string to the given buffer | |
| * | | * | |
| * @param buf The string buffer to prepend to. | | * @param buf The string buffer to prepend to. | |
| * @param str The string to prepend. | | * @param str The string to prepend. | |
| * @return #EINA_TRUE on success, #EINA_FALSE on failure. | | * @return #EINA_TRUE on success, #EINA_FALSE on failure. | |
| * | | * | |
| * This macro is calling eina_ustrbuf_insert_escaped() at position 0. If | | * This macro is calling eina_ustrbuf_insert_escaped() at position 0. If | |
|
| * @p buf can't prepend it, #EINA_FALSE is returned, otherwise | | * @p buf can't prepend it, #EINA_FALSE is returned, otherwise #EINA_TRUE i | |
| * #EINA_TRUE is returned. | | s | |
| | | * returned. | |
| */ | | */ | |
| #define eina_ustrbuf_prepend_escaped(buf, str) eina_ustrbuf_insert_e
scaped(buf, str, 0) | | #define eina_ustrbuf_prepend_escaped(buf, str) eina_ustrbuf_insert_e
scaped(buf, str, 0) | |
| | | | |
| /** | | /** | |
| * @def eina_ustrbuf_prepend_n(buf, str) | | * @def eina_ustrbuf_prepend_n(buf, str) | |
| * @brief Prepend the given escaped string to the given buffer | | * @brief Prepend the given escaped string to the given buffer | |
| * | | * | |
| * @param buf The string buffer to prepend to. | | * @param buf The string buffer to prepend to. | |
| * @param str The string to prepend. | | * @param str The string to prepend. | |
| * @param maxlen The maximum number of Eina_Unicode *s to prepend. | | * @param maxlen The maximum number of Eina_Unicode *s to prepend. | |
| * @return #EINA_TRUE on success, #EINA_FALSE on failure. | | * @return #EINA_TRUE on success, #EINA_FALSE on failure. | |
| * | | * | |
| * This macro is calling eina_ustrbuf_insert_n() at position 0. If | | * This macro is calling eina_ustrbuf_insert_n() at position 0. If | |
|
| * @p buf can't prepend it, #EINA_FALSE is returned, otherwise | | * @p buf can't prepend it, #EINA_FALSE is returned, otherwise #EINA_TRUE i | |
| * #EINA_TRUE is returned. | | s | |
| | | * returned. | |
| */ | | */ | |
| #define eina_ustrbuf_prepend_n(buf, str, maxlen) eina_ustrbuf_insert_n
(buf, str, maxlen, 0) | | #define eina_ustrbuf_prepend_n(buf, str, maxlen) eina_ustrbuf_insert_n
(buf, str, maxlen, 0) | |
| | | | |
| /** | | /** | |
| * @def eina_ustrbuf_prepend_length(buf, str) | | * @def eina_ustrbuf_prepend_length(buf, str) | |
| * @brief Prepend the given escaped string to the given buffer | | * @brief Prepend the given escaped string to the given buffer | |
| * | | * | |
| * @param buf The string buffer to prepend to. | | * @param buf The string buffer to prepend to. | |
| * @param str The string to prepend. | | * @param str The string to prepend. | |
| * @param length The exact length to use. | | * @param length The exact length to use. | |
| * @return #EINA_TRUE on success, #EINA_FALSE on failure. | | * @return #EINA_TRUE on success, #EINA_FALSE on failure. | |
| * | | * | |
| * This macro is calling eina_ustrbuf_insert_length() at position 0. If | | * This macro is calling eina_ustrbuf_insert_length() at position 0. If | |
|
| * @p buf can't prepend it, #EINA_FALSE is returned, otherwise | | * @p buf can't prepend it, #EINA_FALSE is returned, otherwise #EINA_TRUE i | |
| * #EINA_TRUE is returned. | | s | |
| | | * returned. | |
| */ | | */ | |
| #define eina_ustrbuf_prepend_length(buf, str, length) eina_ustrbuf_insert_l
ength(buf, str, length, 0) | | #define eina_ustrbuf_prepend_length(buf, str, length) eina_ustrbuf_insert_l
ength(buf, str, length, 0) | |
| | | | |
| /** | | /** | |
| * @def eina_ustrbuf_prepend_char(buf, c) | | * @def eina_ustrbuf_prepend_char(buf, c) | |
| * @brief Prepend the given unicode character to the given buffer | | * @brief Prepend the given unicode character to the given buffer | |
| * | | * | |
| * @param buf The string buffer to prepend to. | | * @param buf The string buffer to prepend to. | |
| * @param c The Eina_Unicode character to prepend. | | * @param c The Eina_Unicode character to prepend. | |
| * @return #EINA_TRUE on success, #EINA_FALSE on failure. | | * @return #EINA_TRUE on success, #EINA_FALSE on failure. | |
| * | | * | |
| * This macro is calling eina_ustrbuf_insert_Eina_Unicode *() at position 0
. If | | * This macro is calling eina_ustrbuf_insert_Eina_Unicode *() at position 0
. If | |
|
| * @p buf can't prepend it, #EINA_FALSE is returned, otherwise | | * @p buf can't prepend it, #EINA_FALSE is returned, otherwise #EINA_TRUE i | |
| * #EINA_TRUE is returned. | | s | |
| | | * returned. | |
| */ | | */ | |
| #define eina_ustrbuf_prepend_char(buf, c) eina_ustrbuf_insert_char(buf, c,
0) | | #define eina_ustrbuf_prepend_char(buf, c) eina_ustrbuf_insert_char(buf, c,
0) | |
| | | | |
| /** | | /** | |
| * @def eina_ustrbuf_prepend_printf(buf, fmt, ...) | | * @def eina_ustrbuf_prepend_printf(buf, fmt, ...) | |
| * @brief Prepend the given string to the given buffer | | * @brief Prepend the given string to the given buffer | |
| * | | * | |
| * @param buf The string buffer to prepend to. | | * @param buf The string buffer to prepend to. | |
| * @param fmt The string to prepend. | | * @param fmt The string to prepend. | |
| * @return #EINA_TRUE on success, #EINA_FALSE on failure. | | * @return #EINA_TRUE on success, #EINA_FALSE on failure. | |
| | | | |
End of changes. 7 change blocks. |
| 14 lines changed or deleted | | 20 lines changed or added | |
|
| eina_value.h | | eina_value.h | |
| | | | |
| skipping to change at line 477 | | skipping to change at line 477 | |
| * @li eina_value_array_vget() and eina_value_array_vset() | | * @li eina_value_array_vget() and eina_value_array_vset() | |
| * @li eina_value_array_pget() and eina_value_array_pset() | | * @li eina_value_array_pget() and eina_value_array_pset() | |
| * | | * | |
| * eina_value_set() takes an #Eina_Value_Array where just @c subtype | | * eina_value_set() takes an #Eina_Value_Array where just @c subtype | |
| * and @c step are used. If there is an @c array, it will be copied | | * and @c step are used. If there is an @c array, it will be copied | |
| * (including each item) and its contents must be properly | | * (including each item) and its contents must be properly | |
| * configurable as @c subtype expects. eina_value_pset() takes a | | * configurable as @c subtype expects. eina_value_pset() takes a | |
| * pointer to an #Eina_Value_Array. For your convenience, use | | * pointer to an #Eina_Value_Array. For your convenience, use | |
| * eina_value_array_setup(). | | * eina_value_array_setup(). | |
| * | | * | |
|
| * eina_value_get() and eina_value_pget() takes a pointer to | | * eina_value_get() and eina_value_pget() takes a pointer | |
| * #Eina_Value_Array, it's an exact copy of the current structure in | | * to #Eina_Value_Array, it's an exact copy of the current structure in | |
| * use by value, no copies are done. | | * use by value, no copies are done. | |
| * | | * | |
| * @since 1.2 | | * @since 1.2 | |
| */ | | */ | |
| EAPI extern const Eina_Value_Type *EINA_VALUE_TYPE_ARRAY; | | EAPI extern const Eina_Value_Type *EINA_VALUE_TYPE_ARRAY; | |
| | | | |
| /** | | /** | |
| * @var EINA_VALUE_TYPE_LIST | | * @var EINA_VALUE_TYPE_LIST | |
| * | | * | |
| * manages list type. Use the value get/set for lists: | | * manages list type. Use the value get/set for lists: | |
| * @li eina_value_list_get() and eina_value_list_set() | | * @li eina_value_list_get() and eina_value_list_set() | |
| * @li eina_value_list_vget() and eina_value_list_vset() | | * @li eina_value_list_vget() and eina_value_list_vset() | |
| * @li eina_value_list_pget() and eina_value_list_pset() | | * @li eina_value_list_pget() and eina_value_list_pset() | |
| * | | * | |
| * eina_value_set() takes an #Eina_Value_List where just @c subtype is | | * eina_value_set() takes an #Eina_Value_List where just @c subtype is | |
| * used. If there is an @c list, it will be copied (including each | | * used. If there is an @c list, it will be copied (including each | |
| * item) and its contents must be properly configurable as @c | | * item) and its contents must be properly configurable as @c | |
|
| * subtype expects. eina_value_pset() takes a pointer to an | | * subtype expects. eina_value_pset() takes a pointer to an #Eina_Value_Lis | |
| * #Eina_Value_List. For your convenience, use | | t. | |
| * eina_value_list_setup(). | | * For your convenience, use eina_value_list_setup(). | |
| * | | * | |
|
| * eina_value_get() and eina_value_pget() takes a pointer to | | * eina_value_get() and eina_value_pget() takes a pointer to #Eina_Value_Li | |
| * #Eina_Value_List, it's an exact copy of the current structure in | | st, | |
| * use by value, no copies are done. | | * it's an exact copy of the current structure in use by value, no copies a | |
| | | re | |
| | | * done. | |
| * | | * | |
| * @since 1.2 | | * @since 1.2 | |
| */ | | */ | |
| EAPI extern const Eina_Value_Type *EINA_VALUE_TYPE_LIST; | | EAPI extern const Eina_Value_Type *EINA_VALUE_TYPE_LIST; | |
| | | | |
| /** | | /** | |
| * @var EINA_VALUE_TYPE_HASH | | * @var EINA_VALUE_TYPE_HASH | |
| * | | * | |
| * manages hash type. Use the value get/set for hashes: | | * manages hash type. Use the value get/set for hashes: | |
| * @li eina_value_hash_get() and eina_value_hash_set() | | * @li eina_value_hash_get() and eina_value_hash_set() | |
| * @li eina_value_hash_vget() and eina_value_hash_vset() | | * @li eina_value_hash_vget() and eina_value_hash_vset() | |
| * @li eina_value_hash_pget() and eina_value_hash_pset() | | * @li eina_value_hash_pget() and eina_value_hash_pset() | |
| * | | * | |
| * eina_value_set() takes an #Eina_Value_Hash where just @c subtype | | * eina_value_set() takes an #Eina_Value_Hash where just @c subtype | |
| * and @c buckets_power_size are used. If there is an @c hash, it will | | * and @c buckets_power_size are used. If there is an @c hash, it will | |
| * be copied (including each item) and its contents must be | | * be copied (including each item) and its contents must be | |
| * properly configurable as @c subtype expects. eina_value_pset() | | * properly configurable as @c subtype expects. eina_value_pset() | |
| * takes a pointer to an #Eina_Value_Hash. For your convenience, use | | * takes a pointer to an #Eina_Value_Hash. For your convenience, use | |
| * eina_value_hash_setup(). | | * eina_value_hash_setup(). | |
| * | | * | |
|
| * eina_value_get() and eina_value_pget() takes a pointer to | | * eina_value_get() and eina_value_pget() takes a pointer to #Eina_Value_Ha | |
| * #Eina_Value_Hash, it's an exact copy of the current structure in | | sh, | |
| * use by value, no copies are done. | | * it's an exact copy of the current structure in use by value, no copies a | |
| | | re | |
| | | * done. | |
| * | | * | |
| * @note be aware that hash data is always an allocated memory of size | | * @note be aware that hash data is always an allocated memory of size | |
| * defined by @c subtype->value_size. If your @c subtype is an | | * defined by @c subtype->value_size. If your @c subtype is an | |
| * integer, add as data malloc(sizeof(int)). If your @c subtype | | * integer, add as data malloc(sizeof(int)). If your @c subtype | |
| * is an string, add as data malloc(sizeof(char*)) and this data | | * is an string, add as data malloc(sizeof(char*)) and this data | |
| * value must point to strdup(string)! | | * value must point to strdup(string)! | |
| * | | * | |
| * @since 1.2 | | * @since 1.2 | |
| */ | | */ | |
| EAPI extern const Eina_Value_Type *EINA_VALUE_TYPE_HASH; | | EAPI extern const Eina_Value_Type *EINA_VALUE_TYPE_HASH; | |
| | | | |
| skipping to change at line 558 | | skipping to change at line 557 | |
| */ | | */ | |
| EAPI extern const Eina_Value_Type *EINA_VALUE_TYPE_TIMEVAL; | | EAPI extern const Eina_Value_Type *EINA_VALUE_TYPE_TIMEVAL; | |
| | | | |
| /** | | /** | |
| * @var EINA_VALUE_TYPE_BLOB | | * @var EINA_VALUE_TYPE_BLOB | |
| * manages blob of bytes type, see @ref Eina_Value_Blob | | * manages blob of bytes type, see @ref Eina_Value_Blob | |
| * | | * | |
| * eina_value_set() takes an #Eina_Value_Blob | | * eina_value_set() takes an #Eina_Value_Blob | |
| * eina_value_pset() takes a pointer to #Eina_Value_Blob. | | * eina_value_pset() takes a pointer to #Eina_Value_Blob. | |
| * | | * | |
|
| * eina_value_get() and eina_value_pget() takes a pointer to | | * eina_value_get() and eina_value_pget() takes a pointer to #Eina_Value_Bl | |
| * #Eina_Value_Blob and it's an exact copy of value, no allocations | | ob | |
| * are made. | | * and it's an exact copy of value, no allocations are made. | |
| * | | * | |
| * Memory is untouched unless you provide @c ops (operations) pointer. | | * Memory is untouched unless you provide @c ops (operations) pointer. | |
| * | | * | |
| * @since 1.2 | | * @since 1.2 | |
| */ | | */ | |
| EAPI extern const Eina_Value_Type *EINA_VALUE_TYPE_BLOB; | | EAPI extern const Eina_Value_Type *EINA_VALUE_TYPE_BLOB; | |
| | | | |
| /** | | /** | |
| * @var EINA_VALUE_TYPE_STRUCT | | * @var EINA_VALUE_TYPE_STRUCT | |
| * | | * | |
| * manages struct type. Use the value get/set for structs: | | * manages struct type. Use the value get/set for structs: | |
| * @li eina_value_struct_get() and eina_value_struct_set() | | * @li eina_value_struct_get() and eina_value_struct_set() | |
| * @li eina_value_struct_vget() and eina_value_struct_vset() | | * @li eina_value_struct_vget() and eina_value_struct_vset() | |
| * @li eina_value_struct_pget() and eina_value_struct_pset() | | * @li eina_value_struct_pget() and eina_value_struct_pset() | |
| * | | * | |
| * eina_value_set() takes an #Eina_Value_Struct where just @c desc is | | * eina_value_set() takes an #Eina_Value_Struct where just @c desc is | |
| * used. If there is an @c memory, it will be copied (including each | | * used. If there is an @c memory, it will be copied (including each | |
| * member) and its contents must be properly configurable as @c desc | | * member) and its contents must be properly configurable as @c desc | |
|
| * expects. eina_value_pset() takes a pointer to an | | * expects. eina_value_pset() takes a pointer to an #Eina_Value_Struct. For | |
| * #Eina_Value_Struct. For your convenience, use | | * your convenience, use eina_value_struct_setup(). | |
| * eina_value_struct_setup(). | | | |
| * | | * | |
|
| * eina_value_get() and eina_value_pget() takes a pointer to | | * eina_value_get() and eina_value_pget() takes a pointer | |
| * #Eina_Value_Struct, it's an exact copy of the current structure in | | * to #Eina_Value_Struct, it's an exact copy of the current structure in | |
| * use by value, no copies are done. | | * use by value, no copies are done. | |
| * | | * | |
| * @since 1.2 | | * @since 1.2 | |
| */ | | */ | |
| EAPI extern const Eina_Value_Type *EINA_VALUE_TYPE_STRUCT; | | EAPI extern const Eina_Value_Type *EINA_VALUE_TYPE_STRUCT; | |
| | | | |
| /** | | /** | |
| * @var EINA_ERROR_VALUE_FAILED | | * @var EINA_ERROR_VALUE_FAILED | |
| * Error identifier corresponding to value check failure. | | * Error identifier corresponding to value check failure. | |
| * | | * | |
| | | | |
| skipping to change at line 629 | | skipping to change at line 626 | |
| * @param type how to manage this value. | | * @param type how to manage this value. | |
| * @return The new value or @c NULL on failure. | | * @return The new value or @c NULL on failure. | |
| * | | * | |
| * Create a new generic value storage. The members are managed using | | * Create a new generic value storage. The members are managed using | |
| * the description specified by @a type. | | * the description specified by @a type. | |
| * | | * | |
| * Some types may specify more operations: | | * Some types may specify more operations: | |
| * eg. #EINA_VALUE_TYPE_ARRAY uses eina_value_array_set(), | | * eg. #EINA_VALUE_TYPE_ARRAY uses eina_value_array_set(), | |
| * eina_value_array_get() and so on. | | * eina_value_array_get() and so on. | |
| * | | * | |
|
| * On failure, @c NULL is returned and either #EINA_ERROR_OUT_OF_MEMORY or | | * On failure, @c NULL is returned and either #EINA_ERROR_OUT_OF_MEMORY | |
| * #EINA_ERROR_VALUE_FAILED is set. | | * or #EINA_ERROR_VALUE_FAILED is set. | |
| * | | * | |
| * @note this calls creates from mempool and then uses | | * @note this calls creates from mempool and then uses | |
| * eina_value_setup(). Consider using eina_value_flush() and | | * eina_value_setup(). Consider using eina_value_flush() and | |
| * eina_value_setup() instead to avoid memory allocations. | | * eina_value_setup() instead to avoid memory allocations. | |
| * | | * | |
| * @see eina_value_free() | | * @see eina_value_free() | |
| * | | * | |
| * @since 1.2 | | * @since 1.2 | |
| */ | | */ | |
| EAPI Eina_Value *eina_value_new(const Eina_Value_Type *type) EINA_ARG_NONNU
LL(1) EINA_MALLOC EINA_WARN_UNUSED_RESULT; | | EAPI Eina_Value *eina_value_new(const Eina_Value_Type *type) EINA_ARG_NONNU
LL(1) EINA_MALLOC EINA_WARN_UNUSED_RESULT; | |
| | | | |
| skipping to change at line 661 | | skipping to change at line 658 | |
| | | | |
| /** | | /** | |
| * @brief Initialize generic value storage. | | * @brief Initialize generic value storage. | |
| * @param value value object | | * @param value value object | |
| * @param type how to manage this value. | | * @param type how to manage this value. | |
| * @return #EINA_TRUE on success, #EINA_FALSE otherwise. | | * @return #EINA_TRUE on success, #EINA_FALSE otherwise. | |
| * | | * | |
| * Initializes existing generic value storage. The members are managed usin
g the | | * Initializes existing generic value storage. The members are managed usin
g the | |
| * description specified by @a type. | | * description specified by @a type. | |
| * | | * | |
|
| * Some types may specify more operations, as an example | | * Some types may specify more operations, as an example #EINA_VALUE_TYPE_A | |
| * #EINA_VALUE_TYPE_ARRAY uses eina_value_array_set(), | | RRAY | |
| * eina_value_array_get() and so on. | | * uses eina_value_array_set(), eina_value_array_get() and so on. | |
| * | | * | |
| * @note Existing contents are ignored! If the value was previously used, t
hen | | * @note Existing contents are ignored! If the value was previously used, t
hen | |
| * use eina_value_flush() first. | | * use eina_value_flush() first. | |
| * | | * | |
| * On failure, #EINA_FALSE is returned and #EINA_ERROR_OUT_OF_MEMORY | | * On failure, #EINA_FALSE is returned and #EINA_ERROR_OUT_OF_MEMORY | |
| * or #EINA_ERROR_VALUE_FAILED is set. | | * or #EINA_ERROR_VALUE_FAILED is set. | |
| * | | * | |
| * @see eina_value_flush() | | * @see eina_value_flush() | |
| * | | * | |
| * @since 1.2 | | * @since 1.2 | |
| | | | |
| skipping to change at line 1104 | | skipping to change at line 1100 | |
| | | | |
| /** | | /** | |
| * @brief Create generic value storage of type array. | | * @brief Create generic value storage of type array. | |
| * @param subtype how to manage this array members. | | * @param subtype how to manage this array members. | |
| * @param step how to grow the members array. | | * @param step how to grow the members array. | |
| * @return The new value or @c NULL on failure. | | * @return The new value or @c NULL on failure. | |
| * | | * | |
| * Create a new generic value storage of type array. The members are | | * Create a new generic value storage of type array. The members are | |
| * managed using the description specified by @a subtype. | | * managed using the description specified by @a subtype. | |
| * | | * | |
|
| * On failure, @c NULL is returned and #EINA_ERROR_OUT_OF_MEMORY or | | * On failure, @c NULL is returned and #EINA_ERROR_OUT_OF_MEMORY | |
| * #EINA_ERROR_VALUE_FAILED is set. | | * or #EINA_ERROR_VALUE_FAILED is set. | |
| * | | * | |
| * @note this creates from mempool and then uses | | * @note this creates from mempool and then uses | |
| * eina_value_array_setup(). @see eina_value_free() @see | | * eina_value_array_setup(). @see eina_value_free() @see | |
| * eina_value_array_setup() | | * eina_value_array_setup() | |
| * | | * | |
| * @since 1.2 | | * @since 1.2 | |
| */ | | */ | |
| EAPI Eina_Value *eina_value_array_new(const Eina_Value_Type *subtype, | | EAPI Eina_Value *eina_value_array_new(const Eina_Value_Type *subtype, | |
| unsigned int step) EINA_ARG_NONNULL(1
); | | unsigned int step) EINA_ARG_NONNULL(1
); | |
| | | | |
| /** | | /** | |
| * @brief Initialize generic value storage of type array. | | * @brief Initialize generic value storage of type array. | |
| * @param value value object | | * @param value value object | |
| * @param subtype how to manage array members. | | * @param subtype how to manage array members. | |
| * @param step how to grow the members array. | | * @param step how to grow the members array. | |
| * @return #EINA_TRUE on success, #EINA_FALSE otherwise. | | * @return #EINA_TRUE on success, #EINA_FALSE otherwise. | |
| * | | * | |
| * Initializes new generic value storage of type array with the given | | * Initializes new generic value storage of type array with the given | |
| * @a subtype. | | * @a subtype. | |
| * | | * | |
|
| * This is the same as calling eina_value_set() with | | * This is the same as calling eina_value_set() | |
| * #EINA_VALUE_TYPE_ARRAY followed by eina_value_pset() with the | | * with #EINA_VALUE_TYPE_ARRAY followed by eina_value_pset() with | |
| * #Eina_Value_Array description configured. | | * the #Eina_Value_Array description configured. | |
| * | | * | |
| * @note Existing contents are ignored! If the value was previously used, t
hen | | * @note Existing contents are ignored! If the value was previously used, t
hen | |
| * use eina_value_flush() first. | | * use eina_value_flush() first. | |
| * | | * | |
| * On failure, #EINA_FALSE is returned and #EINA_ERROR_OUT_OF_MEMORY | | * On failure, #EINA_FALSE is returned and #EINA_ERROR_OUT_OF_MEMORY | |
| * or #EINA_ERROR_VALUE_FAILED is set. | | * or #EINA_ERROR_VALUE_FAILED is set. | |
| * | | * | |
| * @see eina_value_flush() | | * @see eina_value_flush() | |
| * | | * | |
| * @since 1.2 | | * @since 1.2 | |
| | | | |
| skipping to change at line 1750 | | skipping to change at line 1746 | |
| }; | | }; | |
| | | | |
| /** | | /** | |
| * @brief Create generic value storage of type list. | | * @brief Create generic value storage of type list. | |
| * @param subtype how to manage this list members. | | * @param subtype how to manage this list members. | |
| * @return The new value or @c NULL on failure. | | * @return The new value or @c NULL on failure. | |
| * | | * | |
| * Create a new generic value storage of type list. The members are | | * Create a new generic value storage of type list. The members are | |
| * managed using the description specified by @a subtype. | | * managed using the description specified by @a subtype. | |
| * | | * | |
|
| * On failure, @c NULL is returned and #EINA_ERROR_OUT_OF_MEMORY or | | * On failure, @c NULL is returned and #EINA_ERROR_OUT_OF_MEMORY | |
| * #EINA_ERROR_VALUE_FAILED is set. | | * or #EINA_ERROR_VALUE_FAILED is set. | |
| * | | * | |
| * @note this creates from mempool and then uses | | * @note this creates from mempool and then uses | |
| * eina_value_list_setup(). | | * eina_value_list_setup(). | |
| * | | * | |
| * @see eina_value_free() | | * @see eina_value_free() | |
| * @see eina_value_list_setup() | | * @see eina_value_list_setup() | |
| * | | * | |
| * @since 1.2 | | * @since 1.2 | |
| */ | | */ | |
| EAPI Eina_Value *eina_value_list_new(const Eina_Value_Type *subtype) EINA_A
RG_NONNULL(1); | | EAPI Eina_Value *eina_value_list_new(const Eina_Value_Type *subtype) EINA_A
RG_NONNULL(1); | |
| | | | |
| /** | | /** | |
| * @brief Initialize generic value storage of type list. | | * @brief Initialize generic value storage of type list. | |
| * @param value value object | | * @param value value object | |
| * @param subtype how to manage this list members. | | * @param subtype how to manage this list members. | |
| * @return #EINA_TRUE on success, #EINA_FALSE otherwise. | | * @return #EINA_TRUE on success, #EINA_FALSE otherwise. | |
| * | | * | |
| * Initializes new generic value storage of type list with the given | | * Initializes new generic value storage of type list with the given | |
| * @a subtype. | | * @a subtype. | |
| * | | * | |
|
| * This is the same as calling eina_value_set() with | | * This is the same as calling eina_value_set() | |
| * #EINA_VALUE_TYPE_LIST followed by eina_value_pset() with the | | * with #EINA_VALUE_TYPE_LIST followed by eina_value_pset() with | |
| * #Eina_Value_List description configured. | | * the #Eina_Value_List description configured. | |
| * | | * | |
| * @note Existing contents are ignored! If the value was previously used, t
hen | | * @note Existing contents are ignored! If the value was previously used, t
hen | |
| * use eina_value_flush() first. | | * use eina_value_flush() first. | |
| * | | * | |
| * On failure, #EINA_FALSE is returned and #EINA_ERROR_OUT_OF_MEMORY | | * On failure, #EINA_FALSE is returned and #EINA_ERROR_OUT_OF_MEMORY | |
| * or #EINA_ERROR_VALUE_FAILED is set. | | * or #EINA_ERROR_VALUE_FAILED is set. | |
| * | | * | |
| * @see eina_value_flush() | | * @see eina_value_flush() | |
| * | | * | |
| * @since 1.2 | | * @since 1.2 | |
| | | | |
| skipping to change at line 2374 | | skipping to change at line 2370 | |
| /** | | /** | |
| * @brief Create generic value storage of type hash. | | * @brief Create generic value storage of type hash. | |
| * @param subtype how to manage this hash members. | | * @param subtype how to manage this hash members. | |
| * @param buckets_power_size how to allocate hash buckets (2 ^ | | * @param buckets_power_size how to allocate hash buckets (2 ^ | |
| * buckets_power_size), if zero then a sane value is chosen. | | * buckets_power_size), if zero then a sane value is chosen. | |
| * @return The new value or @c NULL on failure. | | * @return The new value or @c NULL on failure. | |
| * | | * | |
| * Create a new generic value storage of type hash. The members are | | * Create a new generic value storage of type hash. The members are | |
| * managed using the description specified by @a subtype. | | * managed using the description specified by @a subtype. | |
| * | | * | |
|
| * On failure, @c NULL is returned and #EINA_ERROR_OUT_OF_MEMORY or | | * On failure, @c NULL is returned and #EINA_ERROR_OUT_OF_MEMORY | |
| * #EINA_ERROR_VALUE_FAILED is set. | | * or #EINA_ERROR_VALUE_FAILED is set. | |
| * | | * | |
| * @note this creates from mempool and then uses | | * @note this creates from mempool and then uses | |
| * eina_value_hash_setup(). | | * eina_value_hash_setup(). | |
| * | | * | |
| * @see eina_value_free() | | * @see eina_value_free() | |
| * @see eina_value_hash_setup() | | * @see eina_value_hash_setup() | |
| * | | * | |
| * @since 1.2 | | * @since 1.2 | |
| */ | | */ | |
| EAPI Eina_Value *eina_value_hash_new(const Eina_Value_Type *subtype, unsign
ed int buckets_power_size) EINA_ARG_NONNULL(1); | | EAPI Eina_Value *eina_value_hash_new(const Eina_Value_Type *subtype, unsign
ed int buckets_power_size) EINA_ARG_NONNULL(1); | |
| | | | |
| skipping to change at line 2398 | | skipping to change at line 2394 | |
| * @brief Initialize generic value storage of type hash. | | * @brief Initialize generic value storage of type hash. | |
| * @param value value object | | * @param value value object | |
| * @param subtype how to manage this hash members. | | * @param subtype how to manage this hash members. | |
| * @param buckets_power_size how to allocate hash buckets (2 ^ | | * @param buckets_power_size how to allocate hash buckets (2 ^ | |
| * buckets_power_size), if zero then a sane value is chosen. | | * buckets_power_size), if zero then a sane value is chosen. | |
| * @return #EINA_TRUE on success, #EINA_FALSE otherwise. | | * @return #EINA_TRUE on success, #EINA_FALSE otherwise. | |
| * | | * | |
| * Initializes new generic value storage of type hash with the given | | * Initializes new generic value storage of type hash with the given | |
| * @a subtype. | | * @a subtype. | |
| * | | * | |
|
| * This is the same as calling eina_value_set() with | | * This is the same as calling eina_value_set() | |
| * #EINA_VALUE_TYPE_HASH followed by eina_value_pset() with the | | * with #EINA_VALUE_TYPE_HASH followed by eina_value_pset() with | |
| * #Eina_Value_Hash description configured. | | * the #Eina_Value_Hash description configured. | |
| * | | * | |
| * @note Existing contents are ignored! If the value was previously used, t
hen | | * @note Existing contents are ignored! If the value was previously used, t
hen | |
| * use eina_value_flush() first. | | * use eina_value_flush() first. | |
| * | | * | |
| * On failure, #EINA_FALSE is returned and #EINA_ERROR_OUT_OF_MEMORY | | * On failure, #EINA_FALSE is returned and #EINA_ERROR_OUT_OF_MEMORY | |
| * or #EINA_ERROR_VALUE_FAILED is set. | | * or #EINA_ERROR_VALUE_FAILED is set. | |
| * | | * | |
| * @see eina_value_flush() | | * @see eina_value_flush() | |
| * | | * | |
| * @since 1.2 | | * @since 1.2 | |
| | | | |
| skipping to change at line 2855 | | skipping to change at line 2851 | |
| EAPI extern const Eina_Value_Struct_Operations *EINA_VALUE_STRUCT_OPERATION
S_STRINGSHARE; | | EAPI extern const Eina_Value_Struct_Operations *EINA_VALUE_STRUCT_OPERATION
S_STRINGSHARE; | |
| | | | |
| /** | | /** | |
| * @struct _Eina_Value_Struct_Member | | * @struct _Eina_Value_Struct_Member | |
| * Describes a single member of struct. | | * Describes a single member of struct. | |
| * | | * | |
| * The name is used to lookup the member description. This is done as | | * The name is used to lookup the member description. This is done as | |
| * specified as _Eina_Value_Struct_Operations::find_member(). For | | * specified as _Eina_Value_Struct_Operations::find_member(). For | |
| * structures with huge number of members, consider using a better | | * structures with huge number of members, consider using a better | |
| * find_member function to quickly finding it! There are two helper | | * find_member function to quickly finding it! There are two helper | |
|
| * operations provided to help this: | | * operations provided to help this: #EINA_VALUE_STRUCT_OPERATIONS_BINSEARC | |
| * #EINA_VALUE_STRUCT_OPERATIONS_BINSEARCH and | | H | |
| * #EINA_VALUE_STRUCT_OPERATIONS_STRINGSHARE, both depend on properly | | * and #EINA_VALUE_STRUCT_OPERATIONS_STRINGSHARE, both depend on properly | |
| * set #_Eina_Value_Struct_Desc and #_Eina_Value_Struct_Member. | | * set #_Eina_Value_Struct_Desc and #_Eina_Value_Struct_Member. | |
| * | | * | |
| * @see #EINA_VALUE_STRUCT_MEMBER | | * @see #EINA_VALUE_STRUCT_MEMBER | |
| * @see #EINA_VALUE_STRUCT_MEMBER_SENTINEL | | * @see #EINA_VALUE_STRUCT_MEMBER_SENTINEL | |
| * | | * | |
| * @since 1.2 | | * @since 1.2 | |
| */ | | */ | |
| struct _Eina_Value_Struct_Member | | struct _Eina_Value_Struct_Member | |
| { | | { | |
| const char *name; /**< member name, used in lookups such as eina_value_s
truct_get() */ | | const char *name; /**< member name, used in lookups such as eina_value_s
truct_get() */ | |
| | | | |
| skipping to change at line 2937 | | skipping to change at line 2932 | |
| }; | | }; | |
| | | | |
| /** | | /** | |
| * @brief Create generic value storage of type struct. | | * @brief Create generic value storage of type struct. | |
| * @param desc how to manage this struct members. | | * @param desc how to manage this struct members. | |
| * @return The new value or @c NULL on failure. | | * @return The new value or @c NULL on failure. | |
| * | | * | |
| * Create a new generic value storage of type struct. The members are | | * Create a new generic value storage of type struct. The members are | |
| * managed using the description specified by @a desc. | | * managed using the description specified by @a desc. | |
| * | | * | |
|
| * On failure, @c NULL is returned and #EINA_ERROR_OUT_OF_MEMORY or | | * On failure, @c NULL is returned and #EINA_ERROR_OUT_OF_MEMORY | |
| * #EINA_ERROR_VALUE_FAILED is set. | | * or #EINA_ERROR_VALUE_FAILED is set. | |
| * | | * | |
| * @note this creates from mempool and then uses | | * @note this creates from mempool and then uses | |
| * eina_value_struct_setup(). | | * eina_value_struct_setup(). | |
| * | | * | |
| * @see eina_value_free() | | * @see eina_value_free() | |
| * @see eina_value_struct_setup() | | * @see eina_value_struct_setup() | |
| * | | * | |
| * @since 1.2 | | * @since 1.2 | |
| */ | | */ | |
| EAPI Eina_Value *eina_value_struct_new(const Eina_Value_Struct_Desc *desc)
EINA_ARG_NONNULL(1); | | EAPI Eina_Value *eina_value_struct_new(const Eina_Value_Struct_Desc *desc)
EINA_ARG_NONNULL(1); | |
| | | | |
| /** | | /** | |
| * @brief Initialize generic value storage of type struct. | | * @brief Initialize generic value storage of type struct. | |
| * @param value value object | | * @param value value object | |
| * @param desc how to manage this struct members. | | * @param desc how to manage this struct members. | |
| * @return #EINA_TRUE on success, #EINA_FALSE otherwise. | | * @return #EINA_TRUE on success, #EINA_FALSE otherwise. | |
| * | | * | |
| * Initializes new generic value storage of type struct with the given | | * Initializes new generic value storage of type struct with the given | |
| * @a desc. | | * @a desc. | |
| * | | * | |
|
| * This is the same as calling eina_value_set() with | | * This is the same as calling eina_value_set() | |
| * #EINA_VALUE_TYPE_STRUCT followed by eina_value_pset() with the | | * with #EINA_VALUE_TYPE_STRUCT followed by eina_value_pset() with | |
| * #Eina_Value_Struct description configured. | | * the #Eina_Value_Struct description configured. | |
| * | | * | |
| * @note Existing contents are ignored! If the value was previously used, t
hen | | * @note Existing contents are ignored! If the value was previously used, t
hen | |
| * use eina_value_flush() first. | | * use eina_value_flush() first. | |
| * | | * | |
| * On failure, #EINA_FALSE is returned and #EINA_ERROR_OUT_OF_MEMORY | | * On failure, #EINA_FALSE is returned and #EINA_ERROR_OUT_OF_MEMORY | |
| * or #EINA_ERROR_VALUE_FAILED is set. | | * or #EINA_ERROR_VALUE_FAILED is set. | |
| * | | * | |
| * @see eina_value_flush() | | * @see eina_value_flush() | |
| * | | * | |
| * @since 1.2 | | * @since 1.2 | |
| | | | |
End of changes. 18 change blocks. |
| 47 lines changed or deleted | | 50 lines changed or added | |
|
| eina_xattr.h | | eina_xattr.h | |
| | | | |
| skipping to change at line 111 | | skipping to change at line 111 | |
| EAPI Eina_Iterator *eina_xattr_value_fd_ls(int fd); | | EAPI Eina_Iterator *eina_xattr_value_fd_ls(int fd); | |
| | | | |
| /** | | /** | |
| * @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 attribute 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 @c 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); | |
| | | | |
| /** | | /** | |
| * @brief Set an extended attribute on a file. | | * @brief Set an extended attribute on a file. | |
| * | | * | |
| * @param file The file to set the extended attribute to. | | * @param file The file to set the extended attribute to. | |
| * @param attribute The attribute to set. | | * @param attribute The attribute to set. | |
| * @param data The data to set. | | * @param data The data to set. | |
| * @param length The length of the data to set. | | * @param length The length of the data 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_set(const char *file, const char *attribute, cons
t void *data, ssize_t length, Eina_Xattr_Flags flags); | | EAPI Eina_Bool eina_xattr_set(const char *file, const char *attribute, cons
t void *data, ssize_t length, Eina_Xattr_Flags flags); | |
| | | | |
| /** | | /** | |
| * @brief Set a string as a extended attribute properties. | | * @brief Set a string as a extended attribute properties. | |
| * | | * | |
| * @param file The file to set the string to. | | * @param file The file to set the string to. | |
| * @param attribute The attribute to set. | | * @param attribute The attribute to set. | |
|
| * @param data The NULL terminated string to set. | | * @param data The NULL-terminated string 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_string_set(const char *file, const char *attribut
e, const char *data, Eina_Xattr_Flags flags); | | EAPI Eina_Bool eina_xattr_string_set(const char *file, const char *attribut
e, const char *data, Eina_Xattr_Flags flags); | |
| | | | |
| /** | | /** | |
| * @brief Get a string from an extended attribute properties. | | * @brief Get a string from an extended attribute properties. | |
| * | | * | |
| * @param file The file to get the string from. | | * @param file The file to get the string from. | |
| * @param attribute The attribute to get. | | * @param attribute The attribute to get. | |
|
| * @return a valid string on success, NULL otherwise. | | * @return A valid string on success, @c NULL otherwise. | |
| * | | * | |
| * This call check that the string is properly NULL-terminated before retur
ning it. | | * This call check that the string is properly NULL-terminated before retur
ning it. | |
| * | | * | |
| * @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 value 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. | |
| * | | * | |
| * @param file The file to get the string from. | | * @param file The file to get the string from. | |
| * @param attribute The attribute to get. | | * @param attribute The attribute to get. | |
| * @param value Where to put the extracted value | | * @param value Where to put the extracted value | |
|
| * @return EINA_TRUE on success, EINA_FALSE otherwise. | | * @return #EINA_TRUE on success, #EINA_FALSE otherwise. | |
| * | | * | |
| * This call check that the double is correctly set. | | * This call check that the double is correctly set. | |
| * | | * | |
| * @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 value 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. | |
| * | | * | |
| * @param file The file to get the string from. | | * @param file The file to get the string from. | |
| * @param attribute The attribute to get. | | * @param attribute The attribute to get. | |
| * @param value Where to put the extracted value | | * @param value Where to put the extracted value | |
|
| * @return EINA_TRUE on success, EINA_FALSE otherwise. | | * @return #EINA_TRUE on success, #EINA_FALSE otherwise. | |
| * | | * | |
| * This call check that the int is correctly set. | | * This call check that the int is correctly set. | |
| * | | * | |
| * @since 1.1 | | * @since 1.1 | |
| */ | | */ | |
| EAPI Eina_Bool eina_xattr_int_get(const char *file, const char *attribute,
int *value); | | EAPI Eina_Bool eina_xattr_int_get(const char *file, const char *attribute,
int *value); | |
| | | | |
| /** | | /** | |
| * @} | | * @} | |
| */ | | */ | |
| | | | |
End of changes. 10 change blocks. |
| 10 lines changed or deleted | | 10 lines changed or added | |
|