mav_listNew(3)

NAME
mav_listNew - List management functions.

LEVEL
Maverik Level 1

SYNTAX
MAV_list *mav_listNew(void);

void mav_listItemAdd(MAV_list *l, void *d);

void mav_listItemRmv(MAV_list *l, void *d);

int mav_listItemNext(MAV_list *l, void **d);

int mav_listItemContains(MAV_list *l, void *d);

void mav_listPointerReset(MAV_list *l);

void mav_listPointerPush(MAV_list *l);

void mav_listPointerPop(MAV_list *l);

void mav_listEmpty(MAV_list *l);

void mav_listDelete(MAV_list *l);

int mav_listSize(MAV_list *l);

DESCRIPTION
creates a new list, and returns a handle to the list. Lists preserve elements in the order in which they were inserted into the list. MAV_list's are implemented as linked-lists each with its own private "list pointer", and a stack on which to save it, which can be used to conveniently step through the list (see mav_listItemNext and related functions). appends item d to list l. searches list l for item d and removes it from the list. returns, in d, the list item currently pointed to by the list pointer of list l. The return value of the function is MAV_TRUE if the data was successfully returned, otherwise MAV_FALSE. The pointer is then moved onto the next item. searches list l for item d. The function returns MAV_TRUE if the the item is located, otherwise MAV_FALSE. sets the list pointer of list l to point to the beginning of the list. This function pushes the list pointer for list l onto its stack. The value of the list pointer is unchanged. pops the list pointer for list l from its stack. deletes all the linked-list nodes from list l. It does not, however, delete the data referenced by the nodes in the list. After calling this function, l refers to an empty list, which can be used again. deletes all the nodes in list l. It does not, however, delete any data referenced by the nodes in the list. After calling this function, l is undefined. returns the number of items in list l.