@ -72,6 +74,7 @@ void l_nullify_if(list_t *t, _l_predicate f); /** Nullifies elements that s
voidl_do(list_t*t,_l_actionact);/** Calls <act> on all elements of <t> **/
voidl_do(list_t*t,_l_actionact);/** Calls <act> on all elements of <t> **/
voidl_do_if(list_t*t,_l_actionact,_l_predicatef);/** Calls <act> on elements that satisfy <f> **/
voidl_do_if(list_t*t,_l_actionact,_l_predicatef);/** Calls <act> on elements that satisfy <f> **/
voidl_swap(list_t*t,intindex1,intindex2);/** Swap elements at <index1> and <index2> **/
voidl_swap(list_t*t,intindex1,intindex2);/** Swap elements at <index1> and <index2> **/
voidl_swap_e(list_t*t,void*temp,intindex1,intindex2);/** Swap elements, using specified memory location as temp stoarge (or NULL to alloc) **/
voidl_sort(list_t*t,_l_sort_algalg,_l_comparatorcomp);/** Sorts <t> with algorithm <alg> using comparator <comp> **/
voidl_sort(list_t*t,_l_sort_algalg,_l_comparatorcomp);/** Sorts <t> with algorithm <alg> using comparator <comp> **/
list_t*l_clone(constlist_t*t);/** Creates new list from <t> **/
list_t*l_clone(constlist_t*t);/** Creates new list from <t> **/
list_t*l_clone_if(constlist_t*t,_l_predicatef);/** Creates new list from <t> with all elements that satisfy <f> **/
list_t*l_clone_if(constlist_t*t,_l_predicatef);/** Creates new list from <t> with all elements that satisfy <f> **/
@ -79,6 +82,7 @@ int l_count(const list_t *t, _l_predicate f); /** Count all elements that s
void*l_push(list_t*t,constvoid*o);/** Adds new element at end of <t>, updates ->length, and returns pointer to element **/
void*l_push(list_t*t,constvoid*o);/** Adds new element at end of <t>, updates ->length, and returns pointer to element **/
intl_pop(list_t*t,void*pop_into);/** Removes last element after copying it into <pop_into> (if not NULL), then updates ->length and returns new length. returns -1 if ->length is 0 **/
intl_pop(list_t*t,void*pop_into);/** Removes last element after copying it into <pop_into> (if not NULL), then updates ->length and returns new length. returns -1 if ->length is 0 **/
void*l_pop_n(list_t*t);/** Copies last element into newly malloc'd memory and calls l_pop, returns pointer to new memory. returns NULL if ->length is 0 **/
void*l_pop_n(list_t*t);/** Copies last element into newly malloc'd memory and calls l_pop, returns pointer to new memory. returns NULL if ->length is 0 **/
voidl_reverse(list_t*t);/** Reverse all elements in array **/
l_iteratorli_create(list_t*list);/** Creates iterator from <list> and initialises at index 0 **/
l_iteratorli_create(list_t*list);/** Creates iterator from <list> and initialises at index 0 **/
intli_next(l_iterator*it);/** Updates current element and increments pointer in <it> and returns non-zero if index is in bounds **/
intli_next(l_iterator*it);/** Updates current element and increments pointer in <it> and returns non-zero if index is in bounds **/
@ -86,7 +90,6 @@ void* li_get(l_iterator *i); /** Updates and returns current element o
void*li_iterate(l_iterator*i);/** Updates and returns current element of iterator and increments pointer, or returns NULL if not in bounds **/
void*li_iterate(l_iterator*i);/** Updates and returns current element of iterator and increments pointer, or returns NULL if not in bounds **/
void*li_set(l_iterator*i,intindex);/** Sets current index to <index> then updates and returns current element, or NULL if index is not in bounds **/
void*li_set(l_iterator*i,intindex);/** Sets current index to <index> then updates and returns current element, or NULL if index is not in bounds **/
/* Predefined Predicates */
/* Predefined Predicates */
L_P_FUNCTION(not_null);/** Allows all non-null elements **/
L_P_FUNCTION(not_null);/** Allows all non-null elements **/