--- psiconv/trunk/lib/psiconv/list.h 2000/12/25 22:25:33 79 +++ psiconv/trunk/lib/psiconv/list.h 2000/12/27 02:12:23 80 @@ -58,6 +58,9 @@ /* Return 1 if the list is empty, 0 if not */ extern int psiconv_list_is_empty(const psiconv_list l); +/* Empty a list. Note this does not reclaim any memory space! */ +extern void psiconv_list_empty(psiconv_list l); + /* Get an element from the list, and return a pointer to it. Note: you can directly modify this element, but be careful not to write beyond the element memory space. @@ -72,6 +75,12 @@ succeeds, 0 is returned. */ extern int psiconv_list_add(psiconv_list l, const void *el); +/* Replace an element within the list. The element is copied from the + supplied element. Fails if you try to write at or after the end of + the list. */ +extern int psiconv_list_replace(psiconv_list l, psiconv_u32 indx, + const void *el); + /* Do some action for each element. Note: you can directly modify the elements supplied to action, and they will be changed in the list, but never try a free(el)! */