From f50feadeae8273f4eb112e568ea2e5583188956c Mon Sep 17 00:00:00 2001 From: Vincent Torri Date: Fri, 19 Sep 2008 05:22:43 +0000 Subject: [PATCH] * add benchmark and file documentation * reorganize a bit more. it's not finished * fix spellingg and formatting * gnuplot file names generated by our bechmarks tests have an absolute time description and not H:M:S description, as this breaks the check out of the repo on Windows. SVN revision: 36090 --- legacy/eina/Makefile.am | 2 +- legacy/eina/src/include/eina_array.h | 24 +++- legacy/eina/src/include/eina_benchmark.h | 24 +++- legacy/eina/src/include/eina_convert.h | 4 +- legacy/eina/src/include/eina_counter.h | 4 +- legacy/eina/src/include/eina_error.h | 4 +- legacy/eina/src/include/eina_file.h | 34 +++++- legacy/eina/src/include/eina_hash.h | 27 +++++ legacy/eina/src/include/eina_inline_array.x | 2 +- legacy/eina/src/include/eina_list.h | 30 +++++ legacy/eina/src/include/eina_stringshare.h | 12 +- legacy/eina/src/lib/eina_array.c | 28 ++++- legacy/eina/src/lib/eina_benchmark.c | 112 ++++++++++++++++++- legacy/eina/src/lib/eina_convert.c | 4 +- legacy/eina/src/lib/eina_counter.c | 4 +- legacy/eina/src/lib/eina_error.c | 4 +- legacy/eina/src/lib/eina_file.c | 55 ++++++++- legacy/eina/src/lib/eina_hash.c | 86 ++++++-------- legacy/eina/src/lib/eina_list.c | 118 ++++---------------- legacy/eina/src/lib/eina_stringshare.c | 12 +- 20 files changed, 406 insertions(+), 184 deletions(-) diff --git a/legacy/eina/Makefile.am b/legacy/eina/Makefile.am index a32c318141..1a9109ec70 100644 --- a/legacy/eina/Makefile.am +++ b/legacy/eina/Makefile.am @@ -95,7 +95,7 @@ if EINA_ENABLE_BENCH benchmark: @make -C src benchmark @mkdir result || true - @cd result && ../src/tests/eina_bench `date +%F_%T` + @cd result && ../src/tests/eina_bench `date +%F_%s` else diff --git a/legacy/eina/src/include/eina_array.h b/legacy/eina/src/include/eina_array.h index a57f014993..9a5fd70b47 100644 --- a/legacy/eina/src/include/eina_array.h +++ b/legacy/eina/src/include/eina_array.h @@ -27,14 +27,26 @@ #include "eina_accessor.h" /** - * @defgroup Eina_Array_Group Array Functions + * @addtogroup Eina_Data_Types_Group Data Types + * + * @{ + */ + +/** + * @addtogroup Eina_Containers_Group Containers + * + * @{ + */ + +/** + * @defgroup Eina_Array_Group Array * * @{ */ /** * @typedef Eina_Array - * Type for generic vector. + * Type for a generic vector. */ typedef struct _Eina_Array Eina_Array; @@ -113,6 +125,14 @@ EAPI Eina_Accessor *eina_array_accessor_new (const Eina_Array *array); #include "eina_inline_array.x" +/** + * @} + */ + +/** + * @} + */ + /** * @} */ diff --git a/legacy/eina/src/include/eina_benchmark.h b/legacy/eina/src/include/eina_benchmark.h index 4adb0d28c3..870a0687a5 100644 --- a/legacy/eina/src/include/eina_benchmark.h +++ b/legacy/eina/src/include/eina_benchmark.h @@ -22,20 +22,38 @@ #include "eina_array.h" /** - * @addtogroup Eina_Tools_Group Tools Modules + * @addtogroup Eina_Tools_Group Tools * * @{ */ /** - * @defgroup Eina_Benchmark_Group Benchmark Functions + * @defgroup Eina_Benchmark_Group Benchmark * * @{ */ +/** + * @typedef Eina_Benchmark + * Type for a benchmark. + */ typedef struct _Eina_Benchmark Eina_Benchmark; + +/** + * @typedef Eina_Benchmark_Specimens + * Type for a test function to be called when running a benchmark. + */ typedef void (*Eina_Benchmark_Specimens)(int request); -#define EINA_BENCHMARK(Function) ((Eina_Benchmark_Specimens)Function) + +/** + * @def EINA_BENCHMARK + * @brief cast to an #Eina_Benchmark_Specimens. + * + * @param function The function to cast. + * + * This macro casts @p function to Eina_Benchmark_Specimens. + */ +#define EINA_BENCHMARK(function) ((Eina_Benchmark_Specimens)function) EAPI int eina_benchmark_init(void); EAPI int eina_benchmark_shutdown(void); diff --git a/legacy/eina/src/include/eina_convert.h b/legacy/eina/src/include/eina_convert.h index c7ec682403..dd15f20a22 100644 --- a/legacy/eina/src/include/eina_convert.h +++ b/legacy/eina/src/include/eina_convert.h @@ -23,13 +23,13 @@ #include "eina_error.h" /** - * @addtogroup Eina_Tools_Group Tools Modules + * @addtogroup Eina_Tools_Group Tools * * @{ */ /** - * @defgroup Eina_Convert_Group Convert Functions + * @defgroup Eina_Convert_Group Convert * * @{ */ diff --git a/legacy/eina/src/include/eina_counter.h b/legacy/eina/src/include/eina_counter.h index 75a53d9a20..69e408d9db 100644 --- a/legacy/eina/src/include/eina_counter.h +++ b/legacy/eina/src/include/eina_counter.h @@ -24,13 +24,13 @@ #include "eina_types.h" /** - * @addtogroup Eina_Tools_Group Tools Modules + * @addtogroup Eina_Tools_Group Tools * * @{ */ /** - * @defgroup Eina_Counter_Group Counter Functions + * @defgroup Eina_Counter_Group Counter * * @{ */ diff --git a/legacy/eina/src/include/eina_error.h b/legacy/eina/src/include/eina_error.h index d964c8541f..ef00939f5a 100644 --- a/legacy/eina/src/include/eina_error.h +++ b/legacy/eina/src/include/eina_error.h @@ -24,13 +24,13 @@ #include "eina_types.h" /** - * @addtogroup Eina_Tools_Group Tools Modules + * @addtogroup Eina_Tools_Group Tools * * @{ */ /** - * @defgroup Eina_Error_Group Error Functions + * @defgroup Eina_Error_Group Error * * @{ */ diff --git a/legacy/eina/src/include/eina_file.h b/legacy/eina/src/include/eina_file.h index b03dc68d71..0293887b5f 100644 --- a/legacy/eina/src/include/eina_file.h +++ b/legacy/eina/src/include/eina_file.h @@ -23,16 +23,42 @@ #include "eina_array.h" /** - * @defgroup File_Group Memory File + * @addtogroup Eina_Tools_Group Tools + * * @{ */ +/** + * @defgroup Eina_File_Group Memory File + * + * @{ + */ + +/** + * @typedef Eina_File_Dir_List_Cb + * Type for a callback. + */ typedef void (*Eina_File_Dir_List_Cb)(const char *name, const char *path, void *data); -#define EINA_FILE_DIR_LIST_CB(Function) ((Eina_File_Dir_List_Cb)Function) + +/** + * @def EINA_FILE_DIR_LIST_CB + * @brief cast to an #Eina_File_Dir_List_Cb. + * + * @param function The function to cast. + * + * This macro casts @p function to Eina_File_Dir_List_Cb. + */ +#define EINA_FILE_DIR_LIST_CB(function) ((Eina_File_Dir_List_Cb)function) EAPI Eina_Bool eina_file_dir_list(const char *dir, Eina_Bool recursive, Eina_File_Dir_List_Cb cb, void *data); EAPI Eina_Array *eina_file_split(char *path); -/** @} */ +/** + * @} + */ -#endif /*EINA_FILE_H_*/ +/** + * @} + */ + +#endif /* EINA_FILE_H_ */ diff --git a/legacy/eina/src/include/eina_hash.h b/legacy/eina/src/include/eina_hash.h index cec4c72310..392f701bc9 100644 --- a/legacy/eina/src/include/eina_hash.h +++ b/legacy/eina/src/include/eina_hash.h @@ -24,8 +24,23 @@ #include "eina_iterator.h" /** + * @addtogroup Eina_Data_Types_Group Data Types * + * @{ */ + +/** + * @addtogroup Eina_Containers_Group Containers + * + * @{ + */ + +/** + * @defgroup Eina_Hash_Group Hash Table + * + * @{ + */ + typedef struct _Eina_Hash Eina_Hash; typedef struct _Eina_Hash_Tuple Eina_Hash_Tuple; struct _Eina_Hash_Tuple @@ -94,4 +109,16 @@ static inline int eina_hash_djb2(const char *key, int len); #include "eina_inline_hash.x" +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ + #endif /*EINA_HASH_H_*/ diff --git a/legacy/eina/src/include/eina_inline_array.x b/legacy/eina/src/include/eina_inline_array.x index 045583488e..eaf193f19f 100644 --- a/legacy/eina/src/include/eina_inline_array.x +++ b/legacy/eina/src/include/eina_inline_array.x @@ -36,7 +36,7 @@ EAPI Eina_Bool eina_array_grow(Eina_Array *array); */ /** - * @addtogroup Eina_Array_Group Array Functions + * @addtogroup Eina_Array_Group Array * * @brief These functions provide array management. * diff --git a/legacy/eina/src/include/eina_list.h b/legacy/eina/src/include/eina_list.h index 0a0232bf34..42d374653c 100644 --- a/legacy/eina/src/include/eina_list.h +++ b/legacy/eina/src/include/eina_list.h @@ -25,6 +25,24 @@ #include "eina_iterator.h" #include "eina_accessor.h" +/** + * @addtogroup Eina_Data_Types_Group Data Types + * + * @{ + */ + +/** + * @addtogroup Eina_Containers_Group Containers + * + * @{ + */ + +/** + * @defgroup Eina_List_Group List + * + * @{ + */ + typedef struct _Eina_List Eina_List; typedef struct _Eina_List_Accounting Eina_List_Accounting; @@ -75,4 +93,16 @@ EAPI Eina_Accessor *eina_list_accessor_new(const Eina_List *list); #include "eina_inline_list.x" +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ + #endif /* EINA_LIST_H_ */ diff --git a/legacy/eina/src/include/eina_stringshare.h b/legacy/eina/src/include/eina_stringshare.h index 83cdbfe383..420c3c65ce 100644 --- a/legacy/eina/src/include/eina_stringshare.h +++ b/legacy/eina/src/include/eina_stringshare.h @@ -54,7 +54,13 @@ #include "eina_types.h" /** - * @defgroup Eina_Stringshare_Group String Instance Functions + * @addtogroup Eina_Data_Types_Group Data Types + * + * @{ + */ + +/** + * @defgroup Eina_Stringshare_Group Stringshare * * @{ */ @@ -64,6 +70,10 @@ EAPI int eina_stringshare_shutdown(void); EAPI const char *eina_stringshare_add(const char *str); EAPI void eina_stringshare_del(const char *str); +/** + * @} + */ + /** * @} */ diff --git a/legacy/eina/src/lib/eina_array.c b/legacy/eina/src/lib/eina_array.c index 31bf7e8541..3bb7f8cfa1 100644 --- a/legacy/eina/src/lib/eina_array.c +++ b/legacy/eina/src/lib/eina_array.c @@ -144,7 +144,19 @@ eina_array_grow(Eina_Array *array) *============================================================================*/ /** - * @addtogroup Eina_Array_Group Array Functions + * @addtogroup Eina_Data_Types_Group Data Types + * + * @{ + */ + +/** + * @addtogroup Eina_Containers_Group Containers + * + * @{ + */ + +/** + * @addtogroup Eina_Array_Group Array * * @brief These functions provide array management. * @@ -249,7 +261,8 @@ eina_array_new(unsigned int step) * * This function frees @p array. It calls first eina_array_flush() then * free the memory of the pointeur. It's up to the user to free the - * memory allocated for the elements of @p array. + * memory allocated for the elements of @p array. For performance + * reasons, there is no check of @p array. */ EAPI void eina_array_free(Eina_Array *array) @@ -315,6 +328,7 @@ eina_array_flush(Eina_Array *array) * @param array The array. * @param keep The functions which selects the data to keep. * @param gdata The data to pass to the function keep. + * @return #EINA_TRUE on success, #EINA_FALSE oterwise. * * This function rebuilds @p array be specifying the elements to keep * with the function @p keep. @p gdata is an additional data to pass @@ -322,7 +336,7 @@ eina_array_flush(Eina_Array *array) * array. If it is @c NULL or invalid, the program may crash. * * This function always return a valid array. If it wasn't able to - * remove items due to an allocation failure, it will return EINA_FALSE + * remove items due to an allocation failure, it will return #EINA_FALSE * and the error is set to #EINA_ERROR_OUT_OF_MEMORY. */ EAPI Eina_Bool @@ -479,3 +493,11 @@ eina_array_accessor_new(const Eina_Array *array) * @} */ +/** + * @} + */ + +/** + * @} + */ + diff --git a/legacy/eina/src/lib/eina_benchmark.c b/legacy/eina/src/lib/eina_benchmark.c index 06bb7ddf0a..157f79435a 100644 --- a/legacy/eina/src/lib/eina_benchmark.c +++ b/legacy/eina/src/lib/eina_benchmark.c @@ -76,21 +76,48 @@ static int _eina_benchmark_count = 0; *============================================================================*/ /** - * @addtogroup Eina_Tools_Group Tools Modules + * @addtogroup Eina_Tools_Group Tools * * @{ */ /** - * @addtogroup Eina_Benchmark_Group Benchmark Functions + * @addtogroup Eina_Benchmark_Group Benchmark * - * These functions allow you to add benchmark framework in a project. + * These functions allow you to add benchmark framework in a project + * for timing critical part and detect slow parts of code. It is used + * in Eina to compare the time used by eina, glib, evas and ecore data + * types. + * + * The benchmark module must be initialized with eina_benchmark_init() + * and shut down with eina_benchmark_shutdown(). A benchmark is + * created with eina_benchmark_new() and freed with + * eina_benchmark_free(). + * + * eina_benchmark_register() adds a test to a benchmark. That test can + * be run a certain amount of times. Adding more than one test to be + * executed allows the comparison between several parts of a program, + * or different implementations. + * + * eina_benchmark_run() runs all the tests registered with + * eina_benchmark_register(). The amount of time of each test is + * written in a gnuplot file. * * For more information, you can look at the @ref tutorial_benchmark_page. * * @{ */ +/** + * @brief Initialize the benchmark module. + * + * @return 1 or greater on success, 0 on error. + * + * This function sets up the error, array and counter modules or + * Eina. It is also called by eina_init(). It returns 0 on failure, + * otherwise it returns the number of times eina_error_init() has + * already been called. + */ EAPI int eina_benchmark_init(void) { @@ -105,6 +132,16 @@ eina_benchmark_init(void) return _eina_benchmark_count; } +/** + * @brief Shut down the benchmark module. + * + * @return 0 when the error module is completely shut down, 1 or + * greater otherwise. + * + * This function shut down the error, array and counter modules set up + * by eina_array_init(). It is also called by eina_shutdown(). It returns + * 0 when it is called the same number of times than eina_error_init(). + */ EAPI int eina_benchmark_shutdown(void) { @@ -119,6 +156,20 @@ eina_benchmark_shutdown(void) return 0; } +/** + * @brief Create a new array. + * + * @param name The name of the benchmark. + * @param run The name of the run. + * @return @c NULL on failure, non @c NULL otherwise. + * + * This function creates a new benchmark. @p name and @p run are used + * to name the gnuplot file that eina_benchmark_run() will create. + * + * This function return a valid benchmark on success, or @c NULL if + * memory allocation fails. In that case, the error is set to + * #EINA_ERROR_OUT_OF_MEMORY. + */ EAPI Eina_Benchmark * eina_benchmark_new(const char *name, const char *run) { @@ -138,6 +189,15 @@ eina_benchmark_new(const char *name, const char *run) return new; } +/** + * @brief Free a benchmark object. + * + * @param bench The benchmark to free. + * + * This function removes all the benchmark tests that have been + * registered and frees @p bench. If @p bench is @c NULL, this + * function returns immediatly. + */ EAPI void eina_benchmark_free(Eina_Benchmark *bench) { @@ -154,6 +214,27 @@ eina_benchmark_free(Eina_Benchmark *bench) free(bench); } +/** + * @brief Add a test to a benchmark. + * + * @param bench The benchmark. + * @param name The name of the test. + * @param bench_cb The test function to be called. + * @param count_start The start data to be passed to @p bench_cb. + * @param count_end The end data to be passed to @p bench_cb. + * @param count_step The step data to be passed to @p bench_cb. + * + * This function adds the test named @p name to @p benchmark. @p + * bench_cb is the function called when the test is executed. That + * test can be executed a certain amount of time. @p start, @p end and + * @p step define a loop with a step increment. The integer that is + * increasing by @p step from @p start to @p end is passed to @p + * bench_cb when eina_benchmark_run() is called. + * + * If @p bench is @c NULL, this function returns imediatly. If the + * allocation of the memory of the test to add fails, the error is set + * to #EINA_ERROR_OUT_OF_MEMORY. + */ EAPI void eina_benchmark_register(Eina_Benchmark *bench, const char *name, Eina_Benchmark_Specimens bench_cb, int count_start, int count_end, int count_step) @@ -179,6 +260,31 @@ eina_benchmark_register(Eina_Benchmark *bench, const char *name, Eina_Benchmark_ bench->runs = eina_inlist_append(bench->runs, EINA_INLIST_GET(run)); } +/** + * @brief Run the benchmark tests that have been registered. + * + * @param bench The benchmark. + * @return The list of names of the test files. + * + * This function runs all the tests that as been registered with + * eina_benchmark_register() and save the result in a gnuplot + * file. The name of the file has the following format: + * + * @code + * bench_[name]_[run]%s.gnuplot + * @endcode + * + * where [name] and [run] are the values passed to + * eina_benchmark_new(). + * + * Each registered test is executed and timed. The time is written to + * the gnuplot file. The number of times each test is executed is + * controlled by the parameters passed to eina_benchmark_register(). + * + * If @p bench is @c NULL, this functions returns @c NULL + * immediatly. Otherwise, it returns the list of the names of each + * test. + */ EAPI Eina_Array * eina_benchmark_run(Eina_Benchmark *bench) { diff --git a/legacy/eina/src/lib/eina_convert.c b/legacy/eina/src/lib/eina_convert.c index 04da4e4571..ce96f0124b 100644 --- a/legacy/eina/src/lib/eina_convert.c +++ b/legacy/eina/src/lib/eina_convert.c @@ -78,13 +78,13 @@ EAPI Eina_Error EINA_ERROR_CONVERT_OUTRUN_STRING_LENGTH = 0; */ /** - * @addtogroup Eina_Tools_Group Tools Modules + * @addtogroup Eina_Tools_Group Tools * * @{ */ /** - * @addtogroup Eina_Convert_Group Convert Functions + * @addtogroup Eina_Convert_Group Convert * * These functions allow you to convert integer or real numbers to * string or conversely. diff --git a/legacy/eina/src/lib/eina_counter.c b/legacy/eina/src/lib/eina_counter.c index 2a5d323e03..41cad26c08 100644 --- a/legacy/eina/src/lib/eina_counter.c +++ b/legacy/eina/src/lib/eina_counter.c @@ -110,13 +110,13 @@ _eina_counter_time_get(Eina_Nano_Time *tp) *============================================================================*/ /** - * @addtogroup Eina_Tools_Group Tools Modules + * @addtogroup Eina_Tools_Group Tools * * @{ */ /** - * @addtogroup Eina_Counter_Group Counter Functions + * @addtogroup Eina_Counter_Group Counter * * These functions allow you to get the time spent in a part of a code. * diff --git a/legacy/eina/src/lib/eina_error.c b/legacy/eina/src/lib/eina_error.c index 136c057319..41f224f54c 100644 --- a/legacy/eina/src/lib/eina_error.c +++ b/legacy/eina/src/lib/eina_error.c @@ -413,13 +413,13 @@ static char *_colors[EINA_ERROR_LEVELS] = { *============================================================================*/ /** - * @addtogroup Eina_Tools_Group Tools Modules + * @addtogroup Eina_Tools_Group Tools * * @{ */ /** - * @addtogroup Eina_Error_Group Error Functions + * @addtogroup Eina_Error_Group Error * * @brief These functions provide error management for projects. * diff --git a/legacy/eina/src/lib/eina_file.c b/legacy/eina/src/lib/eina_file.c index 56ac43209d..75ff7520de 100644 --- a/legacy/eina/src/lib/eina_file.c +++ b/legacy/eina/src/lib/eina_file.c @@ -66,15 +66,42 @@ void *alloca (size_t); *============================================================================*/ /*============================================================================* - * API * + * API * *============================================================================*/ /** - * List all files on the directory calling the function for every file found - * @param dir The directory name - * @param recursive Iterate recursively in the directory - * @param cb The callback to be called - * @param data The data to pass to the callback + * @addtogroup Eina_Tools_Group Tools + * + * @{ + */ + +/** + * @addtogroup Eina_File_Group Memory File + * + * @brief Functions to traverse directories and split paths + * + * To be documented... + * + * @{ + */ + +/** + * @brief List all files on the directory calling the function for every file found. + * + * @param dir The directory name. + * @param recursive Iterate recursively in the directory. + * @param cb The callback to be called. + * @param data The data to pass to the callback. + * @return #EINA_TRUE on success, #EINA_FALSE oterwise. + * + * This function lists all the files in @p dir. To list also all the + * sub directoris recursively, @p recursive must be set to #EINA_TRUE, + * otherwise it must be set to #EINA_FALSE. For each found file, @p cb + * is called and @p data is passed to it. + * + * 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 + * immediatly. otherwise, it returns #EINA_TRUE. */ EAPI Eina_Bool eina_file_dir_list(const char *dir, Eina_Bool recursive, Eina_File_Dir_List_Cb cb, void *data) @@ -189,7 +216,15 @@ eina_file_dir_list(const char *dir, Eina_Bool recursive, Eina_File_Dir_List_Cb c } /** + * @brief Split a path according to the delimiter of the filesystem. * + * @param path The path to split. + * @return An array of the parts of the path to split. + * + * This function splits @p path according to the delimiter of the used + * filesystem. If @p path is @c NULL or if the array can not be + * created, @c NULL is returned, otherwise, an array with the + * different parts of @p path is returned. */ EAPI Eina_Array * eina_file_split(char *path) @@ -221,3 +256,11 @@ eina_file_split(char *path) return ea; } + +/** + * @} + */ + +/** + * @} + */ diff --git a/legacy/eina/src/lib/eina_hash.c b/legacy/eina/src/lib/eina_hash.c index f561a5b8ea..202fe82031 100644 --- a/legacy/eina/src/lib/eina_hash.c +++ b/legacy/eina/src/lib/eina_hash.c @@ -284,7 +284,19 @@ _eina_hash_iterator_free(Eina_Iterator_Hash *it) *============================================================================*/ /** - * @addtogroup Eina_Hash_Group Hash Functions + * @addtogroup Eina_Data_Types_Group Data Types + * + * @{ + */ + +/** + * @addtogroup Eina_Containers_Group Containers + * + * @{ + */ + +/** + * @addtogroup Eina_Hash_Group Hash Table * * @brief give a small description here : what it is for, what it does * , etc... @@ -309,16 +321,14 @@ _eina_hash_iterator_free(Eina_Iterator_Hash *it) */ /** - * @addtogroup Eina_Hash_Init_Group Hash Init and Shutdown Functions + * @brief Initialize the hash table module. * - * Functions that init and shut down hash system. + * @return 1 or greater on success, 0 on error. * - * @{ - */ - -/** - * Initialize the eina hash internal structure. - * @return Zero on failure, non-zero on successful initialization. + * This function just sets up the error module or Eina. It is also + * called by eina_init(). It returns 0 on failure, otherwise it + * returns the number of times eina_error_init() has already been + * called. */ EAPI int eina_hash_init(void) @@ -327,7 +337,15 @@ eina_hash_init(void) } /** - * Shutdown the eina hash internal structures + * @brief Shut down the hash table module. + * + * @return 0 when the error module is completely shut down, 1 or + * greater otherwise. + * + * This function just shut down the error module set up by + * eina_hash_init(). It is also called by eina_shutdown(). It returns + * 0 when it is called the same number of times than + * eina_error_init(). */ EAPI int eina_hash_shutdown(void) @@ -335,18 +353,6 @@ eina_hash_shutdown(void) return eina_error_shutdown(); } -/** - * @} - */ - -/** - * @addtogroup Eina_Hash_Creation_Group Hash Creation Functions - * - * Functions that create hash tables. - * - * @{ - */ - EAPI Eina_Hash * eina_hash_new(Eina_Key_Length key_length_cb, Eina_Key_Cmp key_cmp_cb, @@ -440,18 +446,6 @@ eina_hash_free(Eina_Hash *hash) free(hash); } -/** - * @} - */ - -/** - * @addtogroup Eina_Hash_Data_Group Hash Data Functions - * - * Functions that add, access or remove data from hashes. - * - * @{ - */ - /** * Adds an entry to the given hash table. * @@ -793,22 +787,10 @@ eina_hash_modify(Eina_Hash *hash, const void *key, const void *data) return eina_hash_modify_by_hash(hash, key, key_length, hash_num, data); } -/** - * @} - */ - /*============================================================================* * Iterator * *============================================================================*/ -/** - * @addtogroup Eina_Hash_Iterator_Group Hash Iterator Functions - * - * Functions that iterate over hash tables. - * - * @{ - */ - /** * Call a function on every member stored in the hash table * @param hash The hash table whose members will be walked @@ -920,10 +902,6 @@ eina_hash_iterator_tuple_new(const Eina_Hash *hash) return &it->iterator; } -/** - * @} - */ - /* Common hash functions */ /* Paul Hsieh (http://www.azillionmonkeys.com/qed/hash.html) @@ -981,3 +959,11 @@ eina_hash_superfast(const char *key, int len) /** * @} */ + +/** + * @} + */ + +/** + * @} + */ diff --git a/legacy/eina/src/lib/eina_list.c b/legacy/eina/src/lib/eina_list.c index 984a4a1b28..cda8699ed7 100644 --- a/legacy/eina/src/lib/eina_list.c +++ b/legacy/eina/src/lib/eina_list.c @@ -280,7 +280,19 @@ eina_list_accessor_free(Eina_Accessor_List *it) *============================================================================*/ /** - * @addtogroup Eina_List_Group List Functions + * @addtogroup Eina_Data_Types_Group Data Types + * + * @{ + */ + +/** + * @addtogroup Eina_Containers_Group Containers + * + * @{ + */ + +/** + * @addtogroup Eina_List_Group List * * @brief give a small description here : what it is for, what it does * , etc... @@ -304,14 +316,6 @@ eina_list_accessor_free(Eina_Accessor_List *it) * @{ */ -/** - * @addtogroup Eina_List_Init_Group List Init and Shutdown Functions - * - * Functions that init and shut down list system. - * - * @{ - */ - /** * Initialize the eina list internal structure. * @return Zero on failure, non-zero on successful initialization. @@ -331,18 +335,6 @@ eina_list_shutdown(void) return eina_error_shutdown(); } -/** - * @} - */ - -/** - * @addtogroup Eina_List_Data_Group Linked List Add Functions - * - * Functions that add data to an Eina_List. - * - * @{ - */ - /** * Appends the given data to the given linked list. * @@ -598,18 +590,6 @@ eina_list_prepend_relative_list(Eina_List *list, const void *data, Eina_List *re return new_l; } -/** - * @} - */ - -/** - * @addtogroup Eina_List_Remove_Group Linked List Remove Functions - * - * Functions that remove data from linked lists. - * - * @{ - */ - /** * Removes the first instance of the specified data from the given list. * @@ -712,18 +692,6 @@ eina_list_free(Eina_List *list) return NULL; } -/** - * @} - */ - -/** - * @addtogroup Eina_List_Promote_Group List Promote Functions - * - * Functions that promote data of a list (?) - * - * @{ - */ - /** * Moves the specified data to the head of the list * @@ -778,18 +746,6 @@ eina_list_promote_list(Eina_List *list, Eina_List *move_list) return move_list; } -/** - * @} - */ - -/** - * @addtogroup Eina_List_Find_Group Linked List Find Functions - * - * Functions that find specified data in a linked list. - * - * @{ - */ - /** * Find a member of a list and return the member * @param list The list handle to search for @p data @@ -938,18 +894,6 @@ eina_list_nth_list(const Eina_List *list, unsigned int n) abort(); } -/** - * @} - */ - -/** - * @addtogroup Eina_List_Traverse_Group Linked List Traverse Functions - * - * Functions that you can use to traverse a linked list. - * - * @{ - */ - /** * Get the last list node in the list * @param list The list to get the last list node from @@ -1021,18 +965,6 @@ static inline Eina_List *eina_list_next(const Eina_List *list); */ static inline Eina_List *eina_list_prev(const Eina_List *list); -/** - * @} - */ - -/** - * @addtogroup Eina_List_General_Group Linked List General Functions - * - * Miscellaneous functions that work on linked lists. - * - * @{ - */ - /** * Get the list node data member * @param list The list node to get the data member of @@ -1075,18 +1007,6 @@ static inline void *eina_list_data(const Eina_List *list); */ static inline unsigned int eina_list_count(const Eina_List *list); -/** - * @} - */ - -/** - * @addtogroup Eina_List_Ordering_Group Linked List Ordering Functions - * - * Functions that change the ordering of data in a linked list. - * - * @{ - */ - /** * Reverse all the elements in the list * @param list The list to reverse @@ -1262,10 +1182,6 @@ eina_list_sort(Eina_List *list, unsigned int size, int (*func)(void *, void *)) return list; } -/** - * @} - */ - EAPI Eina_Iterator * eina_list_iterator_new(const Eina_List *list) { @@ -1318,3 +1234,11 @@ eina_list_accessor_new(const Eina_List *list) /** * @} */ + +/** + * @} + */ + +/** + * @} + */ diff --git a/legacy/eina/src/lib/eina_stringshare.c b/legacy/eina/src/lib/eina_stringshare.c index ad851652b5..b01e22966c 100644 --- a/legacy/eina/src/lib/eina_stringshare.c +++ b/legacy/eina/src/lib/eina_stringshare.c @@ -137,7 +137,13 @@ _eina_stringshare_node(const Eina_Stringshare_Head *left, const Eina_Stringshare *============================================================================*/ /** - * @addtogroup Eina_Stringshare_Group String Instance Functions + * @addtogroup Eina_Data_Types_Group Data Types + * + * @{ + */ + +/** + * @addtogroup Eina_Stringshare_Group Stringshare * * These functions allow you to store one copy of a string, and use it * throughout your program. @@ -366,3 +372,7 @@ eina_stringshare_del(const char *str) /** * @} */ + +/** + * @} + */