Author: hpoussin
Date: Fri Jul 27 19:07:07 2007
New Revision: 27932
URL:
http://svn.reactos.org/svn/reactos?rev=27932&view=rev
Log:
Add missing LIST_FOR_EACH_ENTRY_REV macro
Modified:
trunk/reactos/include/reactos/wine/list.h
Modified: trunk/reactos/include/reactos/wine/list.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/wine/list.…
==============================================================================
--- trunk/reactos/include/reactos/wine/list.h (original)
+++ trunk/reactos/include/reactos/wine/list.h Fri Jul 27 19:07:07 2007
@@ -171,6 +171,12 @@
(cursor) = (cursor2), \
(cursor2) = LIST_ENTRY((cursor)->field.next, type, field))
+/* iterate through the list in reverse order using a list entry */
+#define LIST_FOR_EACH_ENTRY_REV(elem, list, type, field) \
+ for ((elem) = LIST_ENTRY((list)->prev, type, field); \
+ &(elem)->field != (list); \
+ (elem) = LIST_ENTRY((elem)->field.prev, type, field))
+
/* macros for statically initialized lists */
#define LIST_INIT(list) { &(list), &(list) }