/**
* @file
- * implements List class.
+ * Linked list module implementation.
*/
#include <ccunit/CCUnitList.h>
+/** @addtogroup CCUnitList
+ * @{
+ */
+
+/** @defgroup CCUnitListCell ListCell
+ * Linked list cell.
+ * @{
+ */
+
/**
* List Cell class.
*/
void* contents; /**< list content object */
} CCUnitListCell;
-CCUnitList* ccunit_initList (CCUnitList* list)
-{
- list->length = 0;
- list->head = NULL;
- list->tailp = &list->head;
- list->isAllocated = false;
- return list;
-}
-
-inline CCUnitList* ccunit_newList ()
-{
- CCUnitList* newList = calloc (1, sizeof (*newList));
- ccunit_initList (newList);
- newList->isAllocated = true;
- return newList;
-}
-
/**
* create new list cell object.
* @return new list cell object.
safe_free (cell);
}
+/** @} */
+
+CCUnitList* ccunit_initList (CCUnitList* list)
+{
+ list->length = 0;
+ list->head = NULL;
+ list->tailp = &list->head;
+ list->isAllocated = false;
+ return list;
+}
+
+inline CCUnitList* ccunit_newList ()
+{
+ CCUnitList* newList = calloc (1, sizeof (*newList));
+ ccunit_initList (newList);
+ newList->isAllocated = true;
+ return newList;
+}
+
void ccunit_addList (CCUnitList* list, void* contents)
{
CCUnitListCell* cell = ccunit_newListCell ();
if (it && it->isAllocated)
safe_free (it);
}
+
+/** @} */