diff th_util.h @ 54:48926b3ff598

Add new linked list handling functions: th_llist_foreach() and th_llist_foreach_cond()
author Matti Hamalainen <ccr@tnsp.org>
date Sat, 26 May 2012 02:25:27 +0300
parents 2c90b33d3617
children 300fba04b7ad
line wrap: on
line diff
--- a/th_util.h	Sat May 26 01:04:12 2012 +0300
+++ b/th_util.h	Sat May 26 02:25:27 2012 +0300
@@ -115,6 +115,9 @@
 size_t    th_llist_length(const qlist_t *list);
 ssize_t   th_llist_position(const qlist_t *list, const qlist_t *node);
 
+void      th_llist_foreach(qlist_t *list, void (*func)(qlist_t *node));
+qlist_t * th_llist_foreach_cond(qlist_t *list, int (*func)(qlist_t *node), int *ret);
+
 qlist_t * th_llist_find(qlist_t *list, const void *data);
 qlist_t * th_llist_find_func(qlist_t *list, const void *userdata, int (compare)(const void *, const void *));