Some minor comment fixes.

This commit is contained in:
Tobias Brunner
2010-09-02 19:01:23 +02:00
parent 211943be23
commit 1989c75e9e
+20 -14
View File
@@ -34,8 +34,8 @@ typedef struct linked_list_t linked_list_t;
* @param item current list item * @param item current list item
* @param ... user supplied data (only pointers, at most 5) * @param ... user supplied data (only pointers, at most 5)
* @return * @return
* - TRUE, if the item matched * - TRUE, if the item matched
* - FALSE, otherwise * - FALSE, otherwise
*/ */
typedef bool (*linked_list_match_t)(void *item, ...); typedef bool (*linked_list_match_t)(void *item, ...);
@@ -57,7 +57,7 @@ struct linked_list_t {
/** /**
* Gets the count of items in the list. * Gets the count of items in the list.
* *
* @return number of items in list * @return number of items in list
*/ */
int (*get_count) (linked_list_t *this); int (*get_count) (linked_list_t *this);
@@ -69,7 +69,7 @@ struct linked_list_t {
* @deprecated Iterator is obsolete and will disappear, it is too * @deprecated Iterator is obsolete and will disappear, it is too
* complicated to implement. Use enumerator instead. * complicated to implement. Use enumerator instead.
* *
* @param forward iterator direction (TRUE: front to end) * @param forward iterator direction (TRUE: front to end)
* @return new iterator_t object * @return new iterator_t object
*/ */
iterator_t *(*create_iterator) (linked_list_t *this, bool forward); iterator_t *(*create_iterator) (linked_list_t *this, bool forward);
@@ -94,7 +94,7 @@ struct linked_list_t {
/** /**
* Removes the first item in the list and returns its value. * Removes the first item in the list and returns its value.
* *
* @param item returned value of first item, or NULL * @param item returned value of first item, or NULL
* @return SUCCESS, or NOT_FOUND if list is empty * @return SUCCESS, or NOT_FOUND if list is empty
*/ */
status_t (*remove_first) (linked_list_t *this, void **item); status_t (*remove_first) (linked_list_t *this, void **item);
@@ -107,18 +107,20 @@ struct linked_list_t {
void (*remove_at)(linked_list_t *this, enumerator_t *enumerator); void (*remove_at)(linked_list_t *this, enumerator_t *enumerator);
/** /**
* Remove items from the list matching item. * Remove items from the list matching the given item.
* *
* If a compare function is given, it is called for each item, where * If a compare function is given, it is called for each item, with the
* the first parameter is the current list item and the second parameter * first parameter being the current list item and the second parameter
* is the supplied item parameter. * being the supplied item. Return TRUE from the compare function to remove
* If compare is NULL, compare is done by pointer. * the item, return FALSE to keep it in the list.
*
* If compare is NULL, comparison is done by pointers.
* *
* @param item item to remove/pass to comparator * @param item item to remove/pass to comparator
* @param compare compare function, or NULL * @param compare compare function, or NULL
* @return number of removed items * @return number of removed items
*/ */
int (*remove)(linked_list_t *this, void *item, bool (*compare)(void *,void*)); int (*remove)(linked_list_t *this, void *item, bool (*compare)(void*,void*));
/** /**
* Returns the value of the first list item without removing it. * Returns the value of the first list item without removing it.
@@ -132,7 +134,7 @@ struct linked_list_t {
/** /**
* Inserts a new item at the end of the list. * Inserts a new item at the end of the list.
* *
* @param item value to insert into list * @param item value to insert into list
*/ */
void (*insert_last) (linked_list_t *this, void *item); void (*insert_last) (linked_list_t *this, void *item);
@@ -148,7 +150,7 @@ struct linked_list_t {
/** /**
* Returns the value of the last list item without removing it. * Returns the value of the last list item without removing it.
* *
* @param this calling object * @param this calling object
* @param item returned value of last item * @param item returned value of last item
* @return SUCCESS, NOT_FOUND if list is empty * @return SUCCESS, NOT_FOUND if list is empty
*/ */
@@ -203,6 +205,8 @@ struct linked_list_t {
* which can be evalutated at compile time using the offsetof * which can be evalutated at compile time using the offsetof
* macro, e.g.: list->invoke(list, offsetof(object_t, method)); * macro, e.g.: list->invoke(list, offsetof(object_t, method));
* *
* @warning Only use pointers as user supplied data.
*
* @param offset offset of the method to invoke on objects * @param offset offset of the method to invoke on objects
* @param ... user data to supply to called function (limited to 5 arguments) * @param ... user data to supply to called function (limited to 5 arguments)
*/ */
@@ -211,6 +215,8 @@ struct linked_list_t {
/** /**
* Invoke a function on all of the contained objects. * Invoke a function on all of the contained objects.
* *
* @warning Only use pointers as user supplied data.
*
* @param function offset of the method to invoke on objects * @param function offset of the method to invoke on objects
* @param ... user data to supply to called function (limited to 5 arguments) * @param ... user data to supply to called function (limited to 5 arguments)
*/ */
@@ -265,7 +271,7 @@ struct linked_list_t {
/** /**
* Creates an empty linked list object. * Creates an empty linked list object.
* *
* @return linked_list_t object. * @return linked_list_t object.
*/ */
linked_list_t *linked_list_create(void); linked_list_t *linked_list_create(void);