Overview
T_LIST related data structures and funtions are used extensively in Palmmicro TCP/IP implementation. This description is to help API users to use them in more places.
T_LIST data structure is defined in include\p_list.h.
T_LIST works as the base type of all T_XXXX_LIST struct where ptNext is the first element, and the struct itself is malloced from heap.
Related ListXyyy functions are in list\list.c and include\p_list.h.
T_BUF_LIST with list\buflist.c is the most direct example of using T_LIST functions.
Details
ListIterate runs every list item with F_LIST_ITERATE f function, f returns TRUE to abort iteration, the stopped list ptr is returned by ListIterate,
or NULL if f always returns FALSE.
ListRemoveItem can be safely called in F_LIST_ITERATER function to remove an item.
|