From ac6272d9f6a6990658e6c08d1396c3250bd44b75 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Sun, 1 Jun 2008 19:08:47 +0000 Subject: [PATCH] Documentation fixes: "data"->"value". --- src/arraylist.h | 46 +++++++++++++++--------------- src/avl-tree.h | 14 +++++----- src/binary-heap.h | 14 ++++++---- src/binomial-heap.h | 15 +++++----- src/hash-table.h | 10 +++---- src/list.h | 68 ++++++++++++++++++++++----------------------- src/queue.h | 38 ++++++++++++------------- src/set.h | 37 ++++++++++++------------ src/slist.h | 63 +++++++++++++++++++++-------------------- src/trie.h | 2 +- 10 files changed, 157 insertions(+), 150 deletions(-) diff --git a/src/arraylist.h b/src/arraylist.h index f9361d9..92aa155 100644 --- a/src/arraylist.h +++ b/src/arraylist.h @@ -44,10 +44,10 @@ POSSIBILITY OF SUCH DAMAGE. * To create an ArrayList, use @ref arraylist_new. * To destroy an ArrayList, use @ref arraylist_free. * - * To add data an ArrayList, use @ref arraylist_prepend, + * To add a value to an ArrayList, use @ref arraylist_prepend, * @ref arraylist_append, or @ref arraylist_insert. * - * To remove data from an ArrayList, use @ref arraylist_remove + * To remove a value from an ArrayList, use @ref arraylist_remove * or @ref arraylist_remove_range. */ @@ -92,21 +92,22 @@ typedef struct _ArrayList { * @return Non-zero if the values are not equal, zero if they are equal. */ -typedef int (*ArrayListEqualFunc)(ArrayListValue data1, ArrayListValue data2); +typedef int (*ArrayListEqualFunc)(ArrayListValue value1, ArrayListValue value2); /** * Compare two values in an arraylist. Used by @ref arraylist_sort * when sorting values. * - * @param data1 The first value. - * @param data2 The second value. - * @return A negative number if data1 should be sorted - * before data2, a positive number if data2 should - * be sorted before data1, zero if the two values + * @param value1 The first value. + * @param value2 The second value. + * @return A negative number if value1 should be sorted + * before value2, a positive number if value2 should + * be sorted before value1, zero if the two values * are equal. */ -typedef int (*ArrayListCompareFunc)(ArrayListValue data1, ArrayListValue data2); +typedef int (*ArrayListCompareFunc)(ArrayListValue value1, + ArrayListValue value2); /** * Allocate a new ArrayList for use. @@ -129,10 +130,10 @@ ArrayList *arraylist_new(int length); void arraylist_free(ArrayList *arraylist); /** - * Append data to the end of an ArrayList. + * Append a value to the end of an ArrayList. * * @param arraylist The ArrayList. - * @param data The data to append. + * @param data The value to append. * @return Non-zero if the request was successful, zero * if it was not possible to allocate more memory * for the new entry. @@ -141,10 +142,10 @@ void arraylist_free(ArrayList *arraylist); int arraylist_append(ArrayList *arraylist, ArrayListValue data); /** - * Prepend data to the beginning of an ArrayList. + * Prepend a value to the beginning of an ArrayList. * * @param arraylist The ArrayList. - * @param data The data to prepend. + * @param data The value to prepend. * @return Non-zero if the request was successful, zero * if it was not possible to allocate more memory * for the new entry. @@ -172,13 +173,13 @@ void arraylist_remove(ArrayList *arraylist, int index); void arraylist_remove_range(ArrayList *arraylist, int index, int length); /** - * Insert new data at the specified index in an ArrayList. - * The index where new data can be inserted is limited by the + * Insert a value at the specified index in an ArrayList. + * The index where the new value can be inserted is limited by the * size of the ArrayList. * * @param arraylist The ArrayList. - * @param index The index at which to insert the data. - * @param data The data. + * @param index The index at which to insert the value. + * @param data The value. * @return Returns zero if unsuccessful, else non-zero * if successful (due to an invalid index or * if it was impossible to allocate more memory). @@ -187,13 +188,14 @@ void arraylist_remove_range(ArrayList *arraylist, int index, int length); int arraylist_insert(ArrayList *arraylist, int index, ArrayListValue data); /** - * Find the index of a particular pointer in an ArrayList. + * Find the index of a particular value in an ArrayList. * * @param arraylist The ArrayList to search. - * @param callback Callback function to be invoked to determine if - * values are equal to the data to search for. - * @param data The data to search for. - * @return The index of the data if found, or -1 if not found. + * @param callback Callback function to be invoked to compare + * values in the list with the value to be + * searched for. + * @param data The value to search for. + * @return The index of the value if found, or -1 if not found. */ int arraylist_index_of(ArrayList *arraylist, diff --git a/src/avl-tree.h b/src/avl-tree.h index 01cd9a7..b482f30 100644 --- a/src/avl-tree.h +++ b/src/avl-tree.h @@ -115,15 +115,15 @@ typedef struct _AVLTreeNode AVLTreeNode; /** * Type of function used to compare keys in an AVL tree. * - * @param data1 The first key. - * @param data2 The second key. - * @return A negative number if data1 should be sorted - * before data2, a positive number if data2 should - * be sorted before data1, zero if the two keys + * @param value1 The first key. + * @param value2 The second key. + * @return A negative number if value1 should be sorted + * before value2, a positive number if value2 should + * be sorted before value1, zero if the two keys * are equal. */ -typedef int (*AVLTreeCompareFunc)(AVLTreeValue data1, AVLTreeValue data2); +typedef int (*AVLTreeCompareFunc)(AVLTreeValue value1, AVLTreeValue value2); /** * Create a new AVL tree. @@ -199,7 +199,7 @@ AVLTreeNode *avl_tree_lookup_node(AVLTree *tree, AVLTreeKey key); * @param tree The AVL tree to search. * @param key The key to search for. * @return The value associated with the given key, or - * AVLTREE_NULL if no entry with the given key is + * @ref AVLTREE_NULL if no entry with the given key is * found. */ diff --git a/src/binary-heap.h b/src/binary-heap.h index 92249e6..7c2d008 100644 --- a/src/binary-heap.h +++ b/src/binary-heap.h @@ -85,14 +85,15 @@ typedef void *BinaryHeapValue; /** * Type of function used to compare values in a binary heap. * - * @param data1 The first value. - * @param data2 The second value. - * @return A negative number if data1 is less than data2, - * a positive number if data1 is greater than data2, + * @param value1 The first value. + * @param value2 The second value. + * @return A negative number if value1 is less than value2, + * a positive number if value1 is greater than value2, * zero if the two are equal. */ -typedef int (*BinaryHeapCompareFunc)(BinaryHeapValue data1, BinaryHeapValue data2); +typedef int (*BinaryHeapCompareFunc)(BinaryHeapValue value1, + BinaryHeapValue value2); /** * A binary heap data structure. @@ -137,7 +138,8 @@ int binary_heap_insert(BinaryHeap *heap, BinaryHeapValue value); * Remove the first value from a binary heap. * * @param heap The heap. - * @return The first value in the heap. + * @return The first value in the heap, or + * @ref BINARY_HEAP_NULL if the heap is empty. */ BinaryHeapValue binary_heap_pop(BinaryHeap *heap); diff --git a/src/binomial-heap.h b/src/binomial-heap.h index 3285d28..94abe48 100644 --- a/src/binomial-heap.h +++ b/src/binomial-heap.h @@ -85,15 +85,15 @@ typedef void *BinomialHeapValue; /** * Type of function used to compare values in a binomial heap. * - * @param data1 The first value. - * @param data2 The second value. - * @return A negative number if data1 is less than data2, - * a positive number if data1 is greater than data2, + * @param value1 The first value. + * @param value2 The second value. + * @return A negative number if value1 is less than value2, + * a positive number if value1 is greater than value2, * zero if the two are equal. */ -typedef int (*BinomialHeapCompareFunc)(BinomialHeapValue data1, - BinomialHeapValue data2); +typedef int (*BinomialHeapCompareFunc)(BinomialHeapValue value1, + BinomialHeapValue value2); /** * A binomial heap data structure. @@ -138,7 +138,8 @@ int binomial_heap_insert(BinomialHeap *heap, BinomialHeapValue value); * Remove the first value from a binomial heap. * * @param heap The heap. - * @return The first value in the heap. + * @return The first value in the heap, or + * @ref BINOMIAL_HEAP_NULL if the heap is empty. */ BinomialHeapValue binomial_heap_pop(BinomialHeap *heap); diff --git a/src/hash-table.h b/src/hash-table.h index 075d600..e1870a0 100644 --- a/src/hash-table.h +++ b/src/hash-table.h @@ -114,11 +114,11 @@ struct _HashTableIterator { * Hash function used to generate hash values for keys used in a hash * table. * - * @param data The value to generate a hash value for. + * @param value The value to generate a hash value for. * @return The hash value. */ -typedef unsigned long (*HashTableHashFunc)(HashTableKey data); +typedef unsigned long (*HashTableHashFunc)(HashTableKey value); /** * Function used to compare two keys for equality. @@ -127,21 +127,21 @@ typedef unsigned long (*HashTableHashFunc)(HashTableKey data); * not equal. */ -typedef int (*HashTableEqualFunc)(HashTableKey data1, HashTableKey data2); +typedef int (*HashTableEqualFunc)(HashTableKey value1, HashTableKey value2); /** * Type of function used to free keys when entries are removed from a * hash table. */ -typedef void (*HashTableKeyFreeFunc)(HashTableKey data); +typedef void (*HashTableKeyFreeFunc)(HashTableKey value); /** * Type of function used to free values when entries are removed from a * hash table. */ -typedef void (*HashTableValueFreeFunc)(HashTableValue data); +typedef void (*HashTableValueFreeFunc)(HashTableValue value); /** * Create a new hash table. diff --git a/src/list.h b/src/list.h index 4c1c1e2..6c95c02 100644 --- a/src/list.h +++ b/src/list.h @@ -48,9 +48,9 @@ POSSIBILITY OF SUCH DAMAGE. * a @ref ListEntry structure, and initialise it to NULL. * To destroy an entire list, use @ref list_free. * - * To add data to a list, use @ref list_append or @ref list_prepend. + * To add a value to a list, use @ref list_append or @ref list_prepend. * - * To remove data from a list, use @ref list_remove_entry or + * To remove a value from a list, use @ref list_remove_entry or * @ref list_remove_data. * * To iterate over entries in a list, use @ref list_iterate to initialise @@ -107,26 +107,26 @@ struct _ListIterator { /** * Callback function used to compare values in a list when sorting. * - * @param data1 The first value to compare. - * @param data2 The second value to compare. - * @return A negative value if data1 should be sorted before - * data2, a positive value if data1 should be sorted - * after data2, zero if data1 and data2 are equal. + * @param value1 The first value to compare. + * @param value2 The second value to compare. + * @return A negative value if value1 should be sorted before + * value2, a positive value if value1 should be sorted + * after value2, zero if value1 and value2 are equal. */ -typedef int (*ListCompareFunc)(ListValue data1, ListValue data2); +typedef int (*ListCompareFunc)(ListValue value1, ListValue value2); /** * Callback function used to determine of two values in a list are * equal. * - * @param data1 The first value to compare. - * @param data2 The second value to compare. - * @return A non-zero value if data1 and data2 are equal, zero + * @param value1 The first value to compare. + * @param value2 The second value to compare. + * @return A non-zero value if value1 and value2 are equal, zero * if they are not equal. */ -typedef int (*ListEqualFunc)(ListValue data1, ListValue data2); +typedef int (*ListEqualFunc)(ListValue value1, ListValue value2); /** * Free an entire list. @@ -137,23 +137,23 @@ typedef int (*ListEqualFunc)(ListValue data1, ListValue data2); void list_free(ListEntry *list); /** - * Prepend data to the start of a list. + * Prepend a value to the start of a list. * * @param list Pointer to the list to prepend to. - * @param data Data to prepend. - * @return The new entry in the list, or NULL if it was not possible - * to allocate the memory for the new entry. + * @param data The value to prepend. + * @return The new entry in the list, or NULL if it was not + * possible to allocate the memory for the new entry. */ ListEntry *list_prepend(ListEntry **list, ListValue data); /** - * Append data to the end of a list. + * Append a value to the end of a list. * * @param list Pointer to the list to append to. - * @param data Data to append. - * @return The new entry in the list, or NULL if it was not possible - * to allocate the memory for the new entry. + * @param value The value to append. + * @return The new entry in the list, or NULL if it was not + * possible to allocate the memory for the new entry. */ ListEntry *list_append(ListEntry **list, ListValue data); @@ -179,10 +179,10 @@ ListEntry *list_prev(ListEntry *listentry); ListEntry *list_next(ListEntry *listentry); /** - * Retrieve the data at a list entry. + * Retrieve the value at a list entry. * * @param listentry Pointer to the list entry. - * @return The data at the list entry. + * @return The value stored at the list entry. */ ListValue list_data(ListEntry *listentry); @@ -198,11 +198,11 @@ ListValue list_data(ListEntry *listentry); ListEntry *list_nth_entry(ListEntry *list, int n); /** - * Retrieve the data at a specified entry in the list. + * Retrieve the value at a specified index in the list. * * @param list The list. - * @param n The index into the list . - * @return The data at the specified index, or LIST_NULL if + * @param n The index into the list. + * @return The value at the specified index, or @ref LIST_NULL if * unsuccessful. */ @@ -241,12 +241,12 @@ ListValue *list_to_array(ListEntry *list); int list_remove_entry(ListEntry **list, ListEntry *entry); /** - * Remove all occurrences of a particular piece of data from a list. + * Remove all occurrences of a particular value from a list. * * @param list Pointer to the list. - * @param callback Function to invoke to compare data against the - * data to be removed. - * @param data The data to remove from the list. + * @param callback Function to invoke to compare values in the list + * with the value to be removed. + * @param data The value to remove from the list. * @return The number of entries removed from the list. */ @@ -262,12 +262,12 @@ int list_remove_data(ListEntry **list, ListEqualFunc callback, ListValue data); void list_sort(ListEntry **list, ListCompareFunc compare_func); /** - * Find the entry for a particular data item in a list. + * Find the entry for a particular value in a list. * * @param list The list to search. - * @param callback Callback function to be invoked to determine if - * values are equal to the data to search for. - * @param data The data to search for. + * @param callback Function to invoke to compare values in the list + * with the value to be searched for. + * @param data The value to search for. * @return The list entry of the item being searched for, or * NULL if not found. */ @@ -300,7 +300,7 @@ int list_iter_has_more(ListIterator *iterator); * Using a list iterator, retrieve the next value from the list. * * @param iterator The list iterator. - * @return The next value from the list, or LIST_NULL if + * @return The next value from the list, or @ref LIST_NULL if * there are no more values in the list. */ diff --git a/src/queue.h b/src/queue.h index 3ea912d..3c9f6da 100644 --- a/src/queue.h +++ b/src/queue.h @@ -39,17 +39,17 @@ POSSIBILITY OF SUCH DAMAGE. * * @brief Double-ended queue. * - * A double ended queue stores a list of pointers in order. New data + * A double ended queue stores a list of values in order. New values * can be added and removed from either end of the queue. * * To create a new queue, use @ref queue_new. To destroy a queue, use * @ref queue_free. * - * To add data to a queue, use @ref queue_push_head and + * To add values to a queue, use @ref queue_push_head and * @ref queue_push_tail. * - * To read data from the ends of a queue, use @ref queue_pop_head - * and @ref queue_pop_tail. To examine the ends without removing data + * To read values from the ends of a queue, use @ref queue_pop_head + * and @ref queue_pop_tail. To examine the ends without removing values * from the queue, use @ref queue_peek_head and @ref queue_peek_tail. * */ @@ -97,10 +97,10 @@ Queue *queue_new(void); void queue_free(Queue *queue); /** - * Add data to the head of a queue. + * Add a value to the head of a queue. * * @param queue The queue. - * @param data The data to add. + * @param data The value to add. * @return Non-zero if the value was added successfully, or zero * if it was not possible to allocate the memory for the * new entry. @@ -109,31 +109,31 @@ void queue_free(Queue *queue); int queue_push_head(Queue *queue, QueueValue data); /** - * Remove data from the head of a queue. + * Remove a value from the head of a queue. * * @param queue The queue. - * @return Data at the head of the queue, or QUEUE_NULL if the - * queue is empty. + * @return Value that was at the head of the queue, or + * @ref QUEUE_NULL if the queue is empty. */ QueueValue queue_pop_head(Queue *queue); /** - * Read data from the head of queue, without removing it from + * Read value from the head of a queue, without removing it from * the queue. * * @param queue The queue. - * @return Data at the head of the queue, or QUEUE_NULL if the + * @return Value at the head of the queue, or @ref QUEUE_NULL if the * queue is empty. */ QueueValue queue_peek_head(Queue *queue); /** - * Add data to the tail of a queue. + * Add a value to the tail of a queue. * * @param queue The queue. - * @param data The data to add. + * @param data The value to add. * @return Non-zero if the value was added successfully, or zero * if it was not possible to allocate the memory for the * new entry. @@ -142,28 +142,28 @@ QueueValue queue_peek_head(Queue *queue); int queue_push_tail(Queue *queue, QueueValue data); /** - * Remove data from the tail of a queue. + * Remove a value from the tail of a queue. * * @param queue The queue. - * @return Data at the head of the queue, or QUEUE_NULL if the - * queue is empty. + * @return Value that was at the head of the queue, or + * @ref QUEUE_NULL if the queue is empty. */ QueueValue queue_pop_tail(Queue *queue); /** - * Read data from the tail of queue, without removing it from + * Read a value from the tail of a queue, without removing it from * the queue. * * @param queue The queue. - * @return Data at the tail of the queue, or QUEUE_NULL if the + * @return Value at the tail of the queue, or QUEUE_NULL if the * queue is empty. */ QueueValue queue_peek_tail(Queue *queue); /** - * Query if any data is currently in a queue. + * Query if any values are currently in a queue. * * @param queue The queue. * @return Zero if the queue is not empty, non-zero if the queue diff --git a/src/set.h b/src/set.h index 4b403bc..5ad147e 100644 --- a/src/set.h +++ b/src/set.h @@ -67,11 +67,8 @@ extern "C" { #endif /** - * Represents a set of data. Created using the set_new function and destroyed - * using the set_free function. - * - * @see set_new - * @see set_free + * Represents a set of values. Created using the @ref set_new function and + * destroyed using the @ref set_free function. */ typedef struct _Set Set; @@ -113,29 +110,29 @@ struct _SetIterator { #define SET_NULL ((void *) 0) /** - * Hash function. Generates a hash key for data to be stored in a set. + * Hash function. Generates a hash key for values to be stored in a set. */ -typedef unsigned long (*SetHashFunc)(SetValue data); +typedef unsigned long (*SetHashFunc)(SetValue value); /** * Equality function. Compares two values to determine if they are * equivalent. */ -typedef int (*SetEqualFunc)(SetValue data1, SetValue data2); +typedef int (*SetEqualFunc)(SetValue value1, SetValue value2); /** * Function used to free values stored in a set. See * @ref set_register_free_function. */ -typedef void (*SetFreeFunc)(SetValue data); +typedef void (*SetFreeFunc)(SetValue value); /** * Create a new set. * - * @param hash_func Hash function used on data in the set . + * @param hash_func Hash function used on values in the set. * @param equal_func Compares two values in the set to determine * if they are equal. * @return A new set, or NULL if it was not possible to @@ -167,7 +164,7 @@ void set_register_free_function(Set *set, SetFreeFunc free_func); * Add a value to a set. * * @param set The set. - * @param data The data to add to the set . + * @param data The value to add to the set. * @return Non-zero (true) if the value was added to the set, * zero (false) if it already exists in the set, or * if it was not possible to allocate memory for the @@ -180,9 +177,9 @@ int set_insert(Set *set, SetValue data); * Remove a value from a set. * * @param set The set. - * @param data The data to remove from the set. - * @return Non-zero (true) if the data was found and removed - * from the set, zero (false) if the data was not + * @param data The value to remove from the set. + * @return Non-zero (true) if the value was found and removed + * from the set, zero (false) if the value was not * found in the set. */ @@ -192,9 +189,9 @@ int set_remove(Set *set, SetValue data); * Query if a particular value is in a set. * * @param set The set. - * @param data The data to query for. - * @return Zero if the data is not in the set, non-zero if the - * data is in the set. + * @param data The value to query for. + * @return Zero if the value is not in the set, non-zero if the + * value is in the set. */ int set_query(Set *set, SetValue data); @@ -212,7 +209,9 @@ int set_num_entries(Set *set); * Create an array containing all entries in a set. * * @param set The set. - * @return An array containing all entries in the set. + * @return An array containing all entries in the set, + * or NULL if it was not possible to allocate + * memory for the array. */ SetValue *set_to_array(Set *set); @@ -268,7 +267,7 @@ int set_iter_has_more(SetIterator *iterator); * Using a set iterator, retrieve the next value from the set. * * @param iterator The set iterator. - * @return The next value from the set, or SET_NULL if no + * @return The next value from the set, or @ref SET_NULL if no * more values are available. */ diff --git a/src/slist.h b/src/slist.h index 699c983..2f923b0 100644 --- a/src/slist.h +++ b/src/slist.h @@ -49,15 +49,15 @@ POSSIBILITY OF SUCH DAMAGE. * * To destroy a singly linked list, use @ref slist_free. * - * To add new data at the start of a list, use @ref slist_prepend. - * To add new data at the end of a list, use @ref slist_append. + * To add a new value at the start of a list, use @ref slist_prepend. + * To add a new value at the end of a list, use @ref slist_append. * * To find the length of a list, use @ref slist_length. * - * To access data in a list by its index in the list, use + * To access a value in a list by its index in the list, use * @ref slist_nth_data. * - * To search a list for data, use @ref slist_find_data. + * To search a list for a value, use @ref slist_find_data. * * To sort a list into an order, use @ref slist_sort. * @@ -73,7 +73,7 @@ POSSIBILITY OF SUCH DAMAGE. * Given a particular entry in a list (@ref SListEntry): * * @li To find the next entry, use @ref slist_next. - * @li To access the data stored at the entry, use @ref slist_data. + * @li To access the value stored at the entry, use @ref slist_data. * @li To remove the entry, use @ref slist_remove_entry. * */ @@ -120,22 +120,22 @@ struct _SListIterator { /** * Callback function used to compare values in a list when sorting. * - * @return A negative value if data1 should be sorted before data2, - * a positive value if data1 should be sorted after data2, - * zero if data1 and data2 are equal. + * @return A negative value if value1 should be sorted before value2, + * a positive value if value1 should be sorted after value2, + * zero if value1 and value2 are equal. */ -typedef int (*SListCompareFunc)(SListValue data1, SListValue data2); +typedef int (*SListCompareFunc)(SListValue value1, SListValue value2); /** * Callback function used to determine of two values in a list are * equal. * - * @return A non-zero value if data1 and data2 are equal, zero if they + * @return A non-zero value if value1 and value2 are equal, zero if they * are not equal. */ -typedef int (*SListEqualFunc)(SListValue data1, SListValue data2); +typedef int (*SListEqualFunc)(SListValue value1, SListValue value2); /** * Free an entire list. @@ -146,10 +146,10 @@ typedef int (*SListEqualFunc)(SListValue data1, SListValue data2); void slist_free(SListEntry *list); /** - * Prepend data to the start of a list. + * Prepend a value to the start of a list. * * @param list Pointer to the list to prepend to. - * @param data Data to prepend. + * @param data The value to prepend. * @return The new entry in the list, or NULL if it was not possible * to allocate a new entry. */ @@ -157,10 +157,10 @@ void slist_free(SListEntry *list); SListEntry *slist_prepend(SListEntry **list, SListValue data); /** - * Append data to the end of a list. + * Append a value to the end of a list. * * @param list Pointer to the list to append to. - * @param data Data to append. + * @param data The value to append. * @return The new entry in the list, or NULL if it was not possible * to allocate a new entry. */ @@ -177,10 +177,10 @@ SListEntry *slist_append(SListEntry **list, SListValue data); SListEntry *slist_next(SListEntry *listentry); /** - * Retrieve the data at a list entry. + * Retrieve the value stored at a list entry. * * @param listentry Pointer to the list entry. - * @return The data at the list entry. + * @return The value at the list entry. */ SListValue slist_data(SListEntry *listentry); @@ -196,12 +196,12 @@ SListValue slist_data(SListEntry *listentry); SListEntry *slist_nth_entry(SListEntry *list, int n); /** - * Retrieve the data at a specified entry in the list. + * Retrieve the value stored at a specified index in the list. * * @param list The list. - * @param n The index into the list . - * @return The data at the specified index, or @ref SLIST_NULL if - * unsuccessful. + * @param n The index into the list. + * @return The value stored at the specified index, or + * @ref SLIST_NULL if unsuccessful. */ SListValue slist_nth_data(SListEntry *list, int n); @@ -239,16 +239,18 @@ SListValue *slist_to_array(SListEntry *list); int slist_remove_entry(SListEntry **list, SListEntry *entry); /** - * Remove all occurrences of a particular piece of data from a list. + * Remove all occurrences of a particular value from a list. * * @param list Pointer to the list. - * @param callback Callback function to invoke to compare data in the - * list with the data to remove. - * @param data The data to remove from the list. + * @param callback Callback function to invoke to compare values in the + * list with the value to remove. + * @param data The value to remove from the list. * @return The number of entries removed from the list. */ -int slist_remove_data(SListEntry **list, SListEqualFunc callback, SListValue data); +int slist_remove_data(SListEntry **list, + SListEqualFunc callback, + SListValue data); /** * Sort a list. @@ -260,13 +262,14 @@ int slist_remove_data(SListEntry **list, SListEqualFunc callback, SListValue dat void slist_sort(SListEntry **list, SListCompareFunc compare_func); /** - * Find the entry for a particular data item in a list. + * Find the entry for a particular value in a list. * * @param list The list to search. * @param callback Callback function to be invoked to determine if - * values are equal to the data to search for. - * @param data The data to search for. - * @return The list entry of the item being searched for, or + * values in the list are equal to the value to be + * searched for. + * @param data The value to search for. + * @return The list entry of the value being searched for, or * NULL if not found. */ diff --git a/src/trie.h b/src/trie.h index 5fb03ad..2f8432a 100644 --- a/src/trie.h +++ b/src/trie.h @@ -110,7 +110,7 @@ int trie_insert(Trie *trie, char *key, TrieValue value); * @param trie The trie. * @param key The key. * @return The value associated with the key, or - * TRIE_NULL if not found in the trie. + * @ref TRIE_NULL if not found in the trie. */ TrieValue trie_lookup(Trie *trie, char *key);