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