Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
099f84c4
Commit
099f84c4
authored
Aug 30, 2022
by
Zebediah Figura
Committed by
Alexandre Julliard
Aug 30, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
include: Add list_move_after() and list_move_before().
Cherry-picked from vkd3d commit a2996c2d59b140a0a92efc85d43c8f9b59540a12.
parent
57c9bc90
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
4 deletions
+16
-4
list.h
include/wine/list.h
+16
-4
No files found.
include/wine/list.h
View file @
099f84c4
...
@@ -150,8 +150,8 @@ static inline unsigned int list_count( const struct list *list )
...
@@ -150,8 +150,8 @@ static inline unsigned int list_count( const struct list *list )
return
count
;
return
count
;
}
}
/* move all elements from src to
the tail of ds
t */
/* move all elements from src to
before the specified elemen
t */
static
inline
void
list_move_
tail
(
struct
list
*
dst
,
struct
list
*
src
)
static
inline
void
list_move_
before
(
struct
list
*
dst
,
struct
list
*
src
)
{
{
if
(
list_empty
(
src
))
return
;
if
(
list_empty
(
src
))
return
;
...
@@ -162,8 +162,8 @@ static inline void list_move_tail( struct list *dst, struct list *src )
...
@@ -162,8 +162,8 @@ static inline void list_move_tail( struct list *dst, struct list *src )
list_init
(
src
);
list_init
(
src
);
}
}
/* move all elements from src to
the head of ds
t */
/* move all elements from src to
after the specified elemen
t */
static
inline
void
list_move_
head
(
struct
list
*
dst
,
struct
list
*
src
)
static
inline
void
list_move_
after
(
struct
list
*
dst
,
struct
list
*
src
)
{
{
if
(
list_empty
(
src
))
return
;
if
(
list_empty
(
src
))
return
;
...
@@ -174,6 +174,18 @@ static inline void list_move_head( struct list *dst, struct list *src )
...
@@ -174,6 +174,18 @@ static inline void list_move_head( struct list *dst, struct list *src )
list_init
(
src
);
list_init
(
src
);
}
}
/* move all elements from src to the head of dst */
static
inline
void
list_move_head
(
struct
list
*
dst
,
struct
list
*
src
)
{
list_move_after
(
dst
,
src
);
}
/* move all elements from src to the tail of dst */
static
inline
void
list_move_tail
(
struct
list
*
dst
,
struct
list
*
src
)
{
list_move_before
(
dst
,
src
);
}
/* iterate through the list */
/* iterate through the list */
#define LIST_FOR_EACH(cursor,list) \
#define LIST_FOR_EACH(cursor,list) \
for ((cursor) = (list)->next; (cursor) != (list); (cursor) = (cursor)->next)
for ((cursor) = (list)->next; (cursor) != (list); (cursor) = (cursor)->next)
...
...
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