ReactOS 0.4.15-dev-7788-g1ad9096
list.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  list< _Tp, >
 

Macros

#define __WINE_SERVER_LIST_INLINE   static
 
#define LIST_FOR_EACH(cursor, list)    for ((cursor) = (list)->next; (cursor) != (list); (cursor) = (cursor)->next)
 
#define LIST_FOR_EACH_SAFE(cursor, cursor2, list)
 
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
 
#define LIST_FOR_EACH_ENTRY_SAFE(cursor, cursor2, list, type, field)
 
#define LIST_FOR_EACH_REV(cursor, list)    for ((cursor) = (list)->prev; (cursor) != (list); (cursor) = (cursor)->prev)
 
#define LIST_FOR_EACH_SAFE_REV(cursor, cursor2, list)
 
#define LIST_FOR_EACH_ENTRY_REV(elem, list, type, field)
 
#define LIST_FOR_EACH_ENTRY_SAFE_REV(cursor, cursor2, list, type, field)
 
#define LIST_INIT(list)   { &(list), &(list) }
 
#define LIST_ENTRY(elem, type, field)    ((type *)((char *)(elem) - (unsigned long)(&((type *)0)->field)))
 

Functions

__WINE_SERVER_LIST_INLINE void list_add_after (struct list *elem, struct list *to_add)
 
__WINE_SERVER_LIST_INLINE void list_add_before (struct list *elem, struct list *to_add)
 
__WINE_SERVER_LIST_INLINE void list_add_head (struct list *list, struct list *elem)
 
__WINE_SERVER_LIST_INLINE void list_add_tail (struct list *list, struct list *elem)
 
__WINE_SERVER_LIST_INLINE void list_remove (struct list *elem)
 
__WINE_SERVER_LIST_INLINE struct listlist_next (const struct list *list, const struct list *elem)
 
__WINE_SERVER_LIST_INLINE struct listlist_prev (const struct list *list, const struct list *elem)
 
__WINE_SERVER_LIST_INLINE struct listlist_head (const struct list *list)
 
__WINE_SERVER_LIST_INLINE struct listlist_tail (const struct list *list)
 
__WINE_SERVER_LIST_INLINE int list_empty (const struct list *list)
 
__WINE_SERVER_LIST_INLINE void list_init (struct list *list)
 
__WINE_SERVER_LIST_INLINE unsigned int list_count (const struct list *list)
 
__WINE_SERVER_LIST_INLINE void list_move_tail (struct list *dst, struct list *src)
 
__WINE_SERVER_LIST_INLINE void list_move_head (struct list *dst, struct list *src)
 

Macro Definition Documentation

◆ __WINE_SERVER_LIST_INLINE

#define __WINE_SERVER_LIST_INLINE   static

Definition at line 32 of file list.h.

◆ LIST_ENTRY

#define LIST_ENTRY (   elem,
  type,
  field 
)     ((type *)((char *)(elem) - (unsigned long)(&((type *)0)->field)))

Definition at line 243 of file list.h.

◆ LIST_FOR_EACH

#define LIST_FOR_EACH (   cursor,
  list 
)     for ((cursor) = (list)->next; (cursor) != (list); (cursor) = (cursor)->next)

Definition at line 188 of file list.h.

◆ LIST_FOR_EACH_ENTRY

#define LIST_FOR_EACH_ENTRY (   elem,
  list,
  type,
  field 
)
Value:
for ((elem) = LIST_ENTRY((list)->next, type, field); \
&(elem)->field != (list); \
(elem) = LIST_ENTRY((elem)->field.next, type, field))
Definition: list.h:37
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
static size_t elem
Definition: string.c:68
static unsigned __int64 next
Definition: rand_nt.c:6
#define LIST_ENTRY(elem, type, field)
Definition: list.h:243
Definition: parser.c:44

Definition at line 198 of file list.h.

◆ LIST_FOR_EACH_ENTRY_REV

#define LIST_FOR_EACH_ENTRY_REV (   elem,
  list,
  type,
  field 
)
Value:
for ((elem) = LIST_ENTRY((list)->prev, type, field); \
&(elem)->field != (list); \
(elem) = LIST_ENTRY((elem)->field.prev, type, field))

Definition at line 222 of file list.h.

◆ LIST_FOR_EACH_ENTRY_SAFE

#define LIST_FOR_EACH_ENTRY_SAFE (   cursor,
  cursor2,
  list,
  type,
  field 
)
Value:
for ((cursor) = LIST_ENTRY((list)->next, type, field), \
(cursor2) = LIST_ENTRY((cursor)->field.next, type, field); \
&(cursor)->field != (list); \
(cursor) = (cursor2), \
(cursor2) = LIST_ENTRY((cursor)->field.next, type, field))
const char cursor[]
Definition: icontest.c:13
Definition: typedefs.h:120

Definition at line 204 of file list.h.

◆ LIST_FOR_EACH_ENTRY_SAFE_REV

#define LIST_FOR_EACH_ENTRY_SAFE_REV (   cursor,
  cursor2,
  list,
  type,
  field 
)
Value:
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))

Definition at line 228 of file list.h.

◆ LIST_FOR_EACH_REV

#define LIST_FOR_EACH_REV (   cursor,
  list 
)     for ((cursor) = (list)->prev; (cursor) != (list); (cursor) = (cursor)->prev)

Definition at line 212 of file list.h.

◆ LIST_FOR_EACH_SAFE

#define LIST_FOR_EACH_SAFE (   cursor,
  cursor2,
  list 
)
Value:
for ((cursor) = (list)->next, (cursor2) = (cursor)->next; \
(cursor) != (list); \
(cursor) = (cursor2), (cursor2) = (cursor)->next)

Definition at line 192 of file list.h.

◆ LIST_FOR_EACH_SAFE_REV

#define LIST_FOR_EACH_SAFE_REV (   cursor,
  cursor2,
  list 
)
Value:
for ((cursor) = (list)->prev, (cursor2) = (cursor)->prev; \
(cursor) != (list); \
(cursor) = (cursor2), (cursor2) = (cursor)->prev)

Definition at line 216 of file list.h.

◆ LIST_INIT

#define LIST_INIT (   list)    { &(list), &(list) }

Definition at line 236 of file list.h.

Function Documentation

◆ list_add_after()

__WINE_SERVER_LIST_INLINE void list_add_after ( struct list elem,
struct list to_add 
)

Definition at line 78 of file list.h.

79{
80 to_add->next = elem->next;
81 to_add->prev = elem;
82 elem->next->prev = to_add;
83 elem->next = to_add;
84}
struct list * next
Definition: list.h:38
struct list * prev
Definition: list.h:39

Referenced by add_source_to_list(), add_wildcard(), list_add_head(), ME_InsertOLEFromCursor(), and SYSLINK_AppendDocItem().

◆ list_add_before()

__WINE_SERVER_LIST_INLINE void list_add_before ( struct list elem,
struct list to_add 
)

◆ list_add_head()

__WINE_SERVER_LIST_INLINE void list_add_head ( struct list list,
struct list elem 
)

Definition at line 96 of file list.h.

97{
99}
__WINE_SERVER_LIST_INLINE void list_add_after(struct list *elem, struct list *to_add)
Definition: list.h:78

◆ list_add_tail()

__WINE_SERVER_LIST_INLINE void list_add_tail ( struct list list,
struct list elem 
)

Definition at line 102 of file list.h.

103{
105}
__WINE_SERVER_LIST_INLINE void list_add_before(struct list *elem, struct list *to_add)
Definition: list.h:87

◆ list_count()

◆ list_empty()

__WINE_SERVER_LIST_INLINE int list_empty ( const struct list list)

Definition at line 143 of file list.h.

144{
145 return list->next == list;
146}
#define list
Definition: rosglue.h:35

◆ list_head()

Definition at line 131 of file list.h.

132{
133 return list_next( list, list );
134}
__WINE_SERVER_LIST_INLINE struct list * list_next(const struct list *list, const struct list *elem)
Definition: list.h:115

◆ list_init()

__WINE_SERVER_LIST_INLINE void list_init ( struct list list)

Definition at line 149 of file list.h.

150{
151 list->next = list->prev = list;
152}

◆ list_move_head()

__WINE_SERVER_LIST_INLINE void list_move_head ( struct list dst,
struct list src 
)

Definition at line 176 of file list.h.

177{
178 if (list_empty(src)) return;
179
180 dst->next->prev = src->prev;
181 src->prev->next = dst->next;
182 dst->next = src->next;
183 src->next->prev = dst;
184 list_init(src);
185}
static int list_empty(struct list_entry *head)
Definition: list.h:58
static void list_init(struct list_entry *head)
Definition: list.h:51
GLenum src
Definition: glext.h:6340
GLenum GLenum dst
Definition: glext.h:6340

Referenced by msi_dialog_set_tab_order(), shader_sm4_free(), and shader_sm4_read_instruction().

◆ list_move_tail()

__WINE_SERVER_LIST_INLINE void list_move_tail ( struct list dst,
struct list src 
)

Definition at line 164 of file list.h.

165{
166 if (list_empty(src)) return;
167
168 dst->prev->next = src->next;
169 src->next->prev = dst->prev;
170 dst->prev = src->prev;
171 src->prev->next = dst;
172 list_init(src);
173}

◆ list_next()

◆ list_prev()

__WINE_SERVER_LIST_INLINE struct list * list_prev ( const struct list list,
const struct list elem 
)

Definition at line 123 of file list.h.

124{
125 struct list *ret = elem->prev;
126 if (elem->prev == list) ret = NULL;
127 return ret;
128}

Referenced by context_get_entry(), get_body(), list_tail(), and ShowDiff().

◆ list_remove()

__WINE_SERVER_LIST_INLINE void list_remove ( struct list elem)

Definition at line 108 of file list.h.

109{
110 elem->next->prev = elem->prev;
111 elem->prev->next = elem->next;
112}

◆ list_tail()

Definition at line 137 of file list.h.

138{
139 return list_prev( list, list );
140}
__WINE_SERVER_LIST_INLINE struct list * list_prev(const struct list *list, const struct list *elem)
Definition: list.h:123

Referenced by context_find_fbo_entry(), context_get_entry(), d3d_device3_NextViewport(), d3d_viewport_NextLight(), find_array_or_string_in_struct(), get_body(), process_timer(), release_children(), SYSLINK_GetPrevLink(), type_union_get_cases(), write_output_buffer(), and write_user_quad_list().