From 2b696b582a434a5496ad60dc2f7f474758e00401 Mon Sep 17 00:00:00 2001 From: "7u83@mail.ru" <7u83@mail.ru@noemail.net> Date: Mon, 28 Mar 2016 08:45:57 +0000 Subject: [PATCH] foreach function FossilOrigin-Name: 1341f06c96b58767034c1833abb9fe44bb2effd4c771b82ffacfcd7cb83ff475 --- src/cw/mlist.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/cw/mlist.h b/src/cw/mlist.h index e8c770d7..6c4ab97a 100644 --- a/src/cw/mlist.h +++ b/src/cw/mlist.h @@ -66,6 +66,15 @@ extern struct mlist_elem *mlist_replace(mlist_t *l, struct mlist_elem *start, vo * @} */ + + + +#define mlist_foreach(i,l)\ + for (i=l->data; i; i=i->next) + + + + /** * @} */