Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
6cf8e6bd
Commit
6cf8e6bd
authored
Jun 05, 2007
by
Dan Hipschman
Committed by
Alexandre Julliard
Jun 06, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
list.h: Add macros for reverse iteration.
parent
a2deafcc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
0 deletions
+24
-0
list.h
include/wine/list.h
+24
-0
No files found.
include/wine/list.h
View file @
6cf8e6bd
...
...
@@ -196,6 +196,30 @@ static inline void list_move_head( struct list *dst, struct list *src )
(cursor) = (cursor2), \
(cursor2) = LIST_ENTRY((cursor)->field.next, type, field))
/* iterate through the list in reverse order */
#define LIST_FOR_EACH_REV(cursor,list) \
for ((cursor) = (list)->prev; (cursor) != (list); (cursor) = (cursor)->prev)
/* iterate through the list in reverse order, with safety against removal */
#define LIST_FOR_EACH_SAFE_REV(cursor, cursor2, list) \
for ((cursor) = (list)->prev, (cursor2) = (cursor)->prev; \
(cursor) != (list); \
(cursor) = (cursor2), (cursor2) = (cursor)->prev)
/* 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))
/* iterate through the list in reverse order using a list entry, with safety against removal */
#define LIST_FOR_EACH_ENTRY_SAFE_REV(cursor, cursor2, list, type, field) \
for ((cursor) = LIST_ENTRY((list)->prev, type, field), \
(cursor2) = LIST_ENTRY((cursor)->field.prev, type, field); \
&(cursor)->field != (list); \
(cursor) = (cursor2), \
(cursor2) = LIST_ENTRY((cursor)->field.prev, type, field))
/* macros for statically initialized lists */
#define LIST_INIT(list) { &(list), &(list) }
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment