LISTITEM * FirstListItem(LIST *list)
Move to the first list item.
LIST * List(void)
Create a new list.
LISTITEM * ListLinearSearchRetrieve(struct List *list, void *ptr)
LISTITEM * ListAppend(LIST *list, void *p)
Append an item to the list.
LISTITEM * GetItem(LIST *list, int n)
Get the nth item of the list.
LISTITEM * LinkNext(LISTITEM *src, void *ptr, void(*free_obj)(void *obj))
int RemoveListItem(LIST *list, LISTITEM *ptr)
LISTITEM * GetNextItem(LISTITEM *ptr)
LISTITEM * LinkPrev(LISTITEM *src, void *ptr, void(*free_obj)(void *obj))
int FreeListItem(LIST *list, LISTITEM *ptr)
LISTITEM * FindItem(LIST *list, void *ptr)
Finds the LISTITEM pointer corresponding to the data.
struct ListItem LISTITEM
A list item.
LISTITEM * LastListItem(LIST *list)
Move to the last list item.
int ListSize(LIST *list)
Get the size of the list.
int ClearList(LIST *list)
Clear the list.
int PopItem(LIST *list)
Remove the topmost item of the list (also frees obj memory)
struct List LIST
A very simple list structure.
LISTITEM * NextListItem(LIST *list)
Advance one item.
LISTITEM * GetPrevItem(LISTITEM *ptr)
LISTITEM * ListItem(void *ptr, void(*free_obj)(void *obj))
A very simple list structure.
LISTITEM * curr
current item
struct ListItem * next
next item
void(* free_obj)(void *obj)
free hook
struct ListItem * prev
previous item