ReactOS 0.4.17-dev-966-gf06eace
list.h File Reference
#include <stddef.h>
Include dependency graph for list.h:
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 list * list_next (const struct list *list, const struct list *elem)
 
__WINE_SERVER_LIST_INLINE struct list * list_prev (const struct list *list, const struct list *elem)
 
__WINE_SERVER_LIST_INLINE struct list * list_head (const struct list *list)
 
__WINE_SERVER_LIST_INLINE struct list * list_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_before (struct list *dst, struct list *src)
 
__WINE_SERVER_LIST_INLINE void list_move_after (struct list *dst, struct list *src)
 
__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)
 
__WINE_SERVER_LIST_INLINE void list_move_slice_head (struct list *dst, struct list *begin, struct list *end)
 
__WINE_SERVER_LIST_INLINE void list_move_slice_tail (struct list *dst, struct list *begin, struct list *end)
 

Macro Definition Documentation

◆ __WINE_SERVER_LIST_INLINE

#define __WINE_SERVER_LIST_INLINE   static

Definition at line 34 of file list.h.

◆ LIST_ENTRY

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

Definition at line 281 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 226 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:39
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
static size_t elem
Definition: string.c:71
static unsigned __int64 next
Definition: rand_nt.c:6
#define LIST_ENTRY(elem, type, field)
Definition: list.h:281
Definition: parser.c:44

Definition at line 236 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 260 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 242 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 266 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 250 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 230 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 254 of file list.h.

◆ LIST_INIT

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

Definition at line 274 of file list.h.

Function Documentation

◆ list_add_after()

◆ list_add_before()

◆ list_add_head()

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

Definition at line 98 of file list.h.

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

◆ list_add_tail()

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

Definition at line 104 of file list.h.

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

◆ list_count()

◆ list_empty()

__WINE_SERVER_LIST_INLINE int list_empty ( const struct list *  list)

Definition at line 145 of file list.h.

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

◆ list_head()

Definition at line 133 of file list.h.

134{
135 return list_next( list, list );
136}
__WINE_SERVER_LIST_INLINE struct list * list_next(const struct list *list, const struct list *elem)
Definition: list.h:117

◆ list_init()

__WINE_SERVER_LIST_INLINE void list_init ( struct list *  list)

Definition at line 151 of file list.h.

152{
153 list->next = list->prev = list;
154}

◆ list_move_after()

__WINE_SERVER_LIST_INLINE void list_move_after ( struct list *  dst,
struct list *  src 
)

Definition at line 178 of file list.h.

179{
180 if (list_empty(src)) return;
181
182 dst->next->prev = src->prev;
183 src->prev->next = dst->next;
184 dst->next = src->next;
185 src->next->prev = dst;
186 list_init(src);
187}
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 list_move_head().

◆ list_move_before()

__WINE_SERVER_LIST_INLINE void list_move_before ( struct list *  dst,
struct list *  src 
)

Definition at line 166 of file list.h.

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

Referenced by call_lower_func(), list_move_tail(), loop_unrolling_unroll_loop(), lower_calls(), remove_trivial_conditional_branches(), and replace_deref_path_with_offset().

◆ list_move_head()

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

Definition at line 196 of file list.h.

197{
199}
__WINE_SERVER_LIST_INLINE void list_move_after(struct list *dst, struct list *src)
Definition: list.h:178

Referenced by dialog_set_tab_order(), hlsl_new_switch(), process_entry_function(), shader_sm4_free(), shader_sm4_read_instruction(), sm1_generate_vsir(), sm4_generate_vsir_add_function(), and sort_synthetic_separated_samplers_first().

◆ list_move_slice_head()

__WINE_SERVER_LIST_INLINE void list_move_slice_head ( struct list *  dst,
struct list *  begin,
struct list *  end 
)

Definition at line 202 of file list.h.

203{
204 struct list *dst_next = dst->next;
205 begin->prev->next = end->next;
206 end->next->prev = begin->prev;
207 dst->next = begin;
208 dst_next->prev = end;
209 begin->prev = dst;
210 end->next = dst_next;
211}
GLuint GLuint end
Definition: gl.h:1545

◆ list_move_slice_tail()

__WINE_SERVER_LIST_INLINE void list_move_slice_tail ( struct list *  dst,
struct list *  begin,
struct list *  end 
)

Definition at line 214 of file list.h.

215{
216 struct list *dst_prev = dst->prev;
217 begin->prev->next = end->next;
218 end->next->prev = begin->prev;
219 dst_prev->next = begin;
220 dst->prev = end;
221 begin->prev = dst_prev;
222 end->next = dst;
223}

Referenced by loop_unrolling_unroll_loop(), lower_return(), and remove_unreachable_code().

◆ list_move_tail()

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

Definition at line 190 of file list.h.

191{
193}
__WINE_SERVER_LIST_INLINE void list_move_before(struct list *dst, struct list *src)
Definition: list.h:166

◆ list_next()

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

Definition at line 117 of file list.h.

118{
119 struct list *ret = elem->next;
120 if (elem->next == list) ret = NULL;
121 return ret;
122}
#define NULL
Definition: types.h:112
return ret
Definition: mutex.c:147

Referenced by ComponentEnum_Next(), ComponentEnum_Skip(), context_get_entry(), CRYPT_CollectionAdvanceEnum(), d3d_device3_NextViewport(), d3d_viewport_NextLight(), D3DXLoadMeshFromXInMemory(), D3DXLoadSkinMeshFromXof(), dict_enum_Next(), dict_enum_Skip(), dwritetextlayout_source_GetLocaleName(), enum_components_Next(), enum_groups_Next(), EnumFilters_Next(), EnumFilters_Skip(), find_next(), format_parameterized_type_args(), format_parameterized_type_impl_name(), format_parameterized_type_name(), format_string_callback(), gc_run(), get_body(), get_keyitem_pair(), get_struct_fc(), heap_pool_clear(), IAssemblyEnumImpl_GetNextAssembly(), inf_next_section(), inf_section_next_value(), iterate_map(), layout_get_next_erun(), layout_get_next_inline_run(), layout_get_next_spacing_range(), list_head(), lower_return(), match_pattern_list(), MemStore_enumContext(), CCompartmentEnumGuid::Next(), CEnumTfDocumentMgr::Next(), normalize_switch_cases(), notify_remove_pair(), path_config_get_audio_path_params(), remove_unreachable_code(), replace_type_parameters_in_type(), Resync(), ScanDiff(), set_layout_range_attr(), shader_glsl_load_constants_b(), shader_glsl_load_constants_i(), ShowDiff(), CCompartmentEnumGuid::Skip(), CEnumTfDocumentMgr::Skip(), SkipIdentical(), SkipIdenticalN(), TextCompare(), vbnamespacemanager_popContext(), write_enums(), write_range_tfs(), write_remoting_arg(), and xmlreader_MoveToNextAttribute().

◆ list_prev()

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

◆ list_remove()

__WINE_SERVER_LIST_INLINE void list_remove ( struct list *  elem)

Definition at line 110 of file list.h.

111{
112 elem->next->prev = elem->prev;
113 elem->prev->next = elem->next;
114}

◆ list_tail()