Go to the source code of this file.
|
#define | WINE_RB_ENTRY_VALUE(element, type, field) ((type *)((char *)(element) - offsetof(type, field))) |
|
#define | WINE_RB_FLAG_RED 0x1 |
|
#define | WINE_RB_FOR_EACH(cursor, tree) for ((cursor) = wine_rb_head((tree)->root); (cursor); (cursor) = wine_rb_next(cursor)) |
|
#define | WINE_RB_FOR_EACH_ENTRY(elem, tree, type, field) |
|
#define | WINE_RB_FOR_EACH_DESTRUCTOR(cursor, cursor2, tree) |
|
#define | WINE_RB_FOR_EACH_ENTRY_DESTRUCTOR(elem, elem2, tree, type, field) |
|
|
static int | wine_rb_is_red (struct wine_rb_entry *entry) |
|
static void | wine_rb_rotate_left (struct wine_rb_tree *tree, struct wine_rb_entry *e) |
|
static void | wine_rb_rotate_right (struct wine_rb_tree *tree, struct wine_rb_entry *e) |
|
static void | wine_rb_flip_color (struct wine_rb_entry *entry) |
|
static struct wine_rb_entry * | wine_rb_head (struct wine_rb_entry *iter) |
|
static struct wine_rb_entry * | wine_rb_tail (struct wine_rb_entry *iter) |
|
static struct wine_rb_entry * | wine_rb_next (struct wine_rb_entry *iter) |
|
static struct wine_rb_entry * | wine_rb_prev (struct wine_rb_entry *iter) |
|
static struct wine_rb_entry * | wine_rb_postorder_head (struct wine_rb_entry *iter) |
|
static struct wine_rb_entry * | wine_rb_postorder_next (struct wine_rb_entry *iter) |
|
static void | wine_rb_postorder (struct wine_rb_tree *tree, wine_rb_traverse_func_t *callback, void *context) |
|
static void | wine_rb_init (struct wine_rb_tree *tree, wine_rb_compare_func_t compare) |
|
static void | wine_rb_for_each_entry (struct wine_rb_tree *tree, wine_rb_traverse_func_t *callback, void *context) |
|
static void | wine_rb_clear (struct wine_rb_tree *tree, wine_rb_traverse_func_t *callback, void *context) |
|
static void | wine_rb_destroy (struct wine_rb_tree *tree, wine_rb_traverse_func_t *callback, void *context) |
|
static struct wine_rb_entry * | wine_rb_get (const struct wine_rb_tree *tree, const void *key) |
|
static int | wine_rb_put (struct wine_rb_tree *tree, const void *key, struct wine_rb_entry *entry) |
|
static void | wine_rb_remove (struct wine_rb_tree *tree, struct wine_rb_entry *entry) |
|
static void | wine_rb_remove_key (struct wine_rb_tree *tree, const void *key) |
|
◆ WINE_RB_ENTRY_VALUE
◆ WINE_RB_FLAG_RED
◆ WINE_RB_FOR_EACH
◆ WINE_RB_FOR_EACH_DESTRUCTOR
Value:
static struct wine_rb_entry * wine_rb_postorder_next(struct wine_rb_entry *iter)
static struct wine_rb_entry * wine_rb_postorder_head(struct wine_rb_entry *iter)
Definition at line 160 of file rbtree.h.
◆ WINE_RB_FOR_EACH_ENTRY
Value:
GLuint GLuint GLsizei GLenum type
#define WINE_RB_ENTRY_VALUE(element, type, field)
static struct wine_rb_entry * wine_rb_head(struct wine_rb_entry *iter)
static struct wine_rb_entry * wine_rb_next(struct wine_rb_entry *iter)
Definition at line 154 of file rbtree.h.
◆ WINE_RB_FOR_EACH_ENTRY_DESTRUCTOR
◆ wine_rb_compare_func_t
◆ wine_rb_traverse_func_t
◆ wine_rb_clear()
◆ wine_rb_destroy()
Definition at line 198 of file rbtree.h.
199{
201}
static void wine_rb_clear(struct wine_rb_tree *tree, wine_rb_traverse_func_t *callback, void *context)
Referenced by add_function_decl(), arbfp_blitter_destroy(), arbfp_free(), atifs_free(), device_init(), free_function(), glsl_fragment_pipe_free(), glsl_vertex_pipe_vp_free(), ID3DXFontImpl_Release(), reflection_cleanup(), shader_arb_free(), shader_glsl_free(), and wined3d_device_decref().
◆ wine_rb_flip_color()
◆ wine_rb_for_each_entry()
◆ wine_rb_get()
Definition at line 203 of file rbtree.h.
Referenced by add_function_decl(), arbfp_blit_set(), CreateComponentInfo(), find_ffp_frag_shader(), find_function(), find_input_signature(), find_local(), get_glsl_program_entry(), get_parameter_by_name(), get_reflection_type(), get_type(), ID3DXFontImpl_GetGlyphData(), ID3DXFontImpl_PreloadGlyphs(), sampler(), shader_glsl_find_ffp_vertex_shader(), source_find(), and wine_rb_remove_key().
◆ wine_rb_head()
Definition at line 103 of file rbtree.h.
104{
105 if (!iter)
return NULL;
106 while (iter->
left) iter = iter->
left;
107 return iter;
108}
struct wine_rb_entry * left
Referenced by wine_rb_next().
◆ wine_rb_init()
Definition at line 179 of file rbtree.h.
Referenced by add_function_decl(), arbfp_alloc(), atifs_alloc(), compile_function(), d3dcompiler_shader_reflection_init(), d3dx_parse_effect(), D3DXCreateFontIndirectW(), device_init(), glsl_fragment_pipe_alloc(), glsl_vertex_pipe_vp_alloc(), init_functions_tree(), module_new(), push_scope(), shader_arb_alloc(), shader_glsl_alloc(), and wined3d_arbfp_blitter_create().
◆ wine_rb_is_red()
◆ wine_rb_next()
Definition at line 117 of file rbtree.h.
118{
122}
struct wine_rb_entry * right
struct wine_rb_entry * parent
◆ wine_rb_postorder()
Definition at line 173 of file rbtree.h.
174{
177}
static unsigned __int64 next
#define WINE_RB_FOR_EACH_DESTRUCTOR(cursor, cursor2, tree)
Referenced by wine_rb_clear().
◆ wine_rb_postorder_head()
◆ wine_rb_postorder_next()
◆ wine_rb_prev()
Definition at line 124 of file rbtree.h.
125{
129}
static struct wine_rb_entry * wine_rb_tail(struct wine_rb_entry *iter)
◆ wine_rb_put()
Definition at line 215 of file rbtree.h.
216{
218
219 while (*iter)
220 {
222
226 else if (
c < 0) iter = &
parent->left;
227 else iter = &
parent->right;
228 }
229
235
237 {
238 if (
entry->parent ==
entry->parent->parent->left)
239 {
241 {
244 }
245 else
246 {
248 {
251 }
252 entry->parent->flags &= ~WINE_RB_FLAG_RED;
255 }
256 }
257 else
258 {
260 {
263 }
264 else
265 {
267 {
270 }
271 entry->parent->flags &= ~WINE_RB_FLAG_RED;
274 }
275 }
276 }
277
278 tree->
root->flags &= ~WINE_RB_FLAG_RED;
279
280 return 0;
281}
static void wine_rb_rotate_right(struct wine_rb_tree *tree, struct wine_rb_entry *e)
static int wine_rb_is_red(struct wine_rb_entry *entry)
static void wine_rb_flip_color(struct wine_rb_entry *entry)
static void wine_rb_rotate_left(struct wine_rb_tree *tree, struct wine_rb_entry *e)
Referenced by add_ffp_frag_shader(), add_function_decl(), add_glsl_program_entry(), add_param_to_tree(), alloc_local(), arbfp_blit_set(), CreateComponentInfo(), find_input_signature(), get_reflection_type(), ID3DXFontImpl_PreloadGlyphs(), sampler(), shader_glsl_find_ffp_vertex_shader(), and source_new().
◆ wine_rb_remove()
Definition at line 283 of file rbtree.h.
284{
286 int need_fixup;
287
290 else
292
294
297 else if (iter == iter->
parent->left)
299 else
301
304
306
308 {
313 iter->
parent->left = iter;
314 else
315 iter->
parent->right = iter;
316
318 if (iter->
left) iter->
left->parent = iter;
320 }
321
322 if (need_fixup)
323 {
325 {
327 {
330 {
331 w->flags &= ~WINE_RB_FLAG_RED;
335 }
337 {
339 {
340 w->left->flags &= ~WINE_RB_FLAG_RED;
344 }
346 parent->flags &= ~WINE_RB_FLAG_RED;
348 w->right->flags &= ~WINE_RB_FLAG_RED;
351 break;
352 }
353 }
354 else
355 {
358 {
359 w->flags &= ~WINE_RB_FLAG_RED;
363 }
365 {
367 {
368 w->right->flags &= ~WINE_RB_FLAG_RED;
372 }
374 parent->flags &= ~WINE_RB_FLAG_RED;
376 w->left->flags &= ~WINE_RB_FLAG_RED;
379 break;
380 }
381 }
385 }
387 }
388
390}
GLubyte GLubyte GLubyte GLubyte w
Referenced by add_function_decl(), delete_glsl_program_entry(), and wine_rb_remove_key().
◆ wine_rb_remove_key()
Definition at line 392 of file rbtree.h.
393{
396}
static struct wine_rb_entry * wine_rb_get(const struct wine_rb_tree *tree, const void *key)
static void wine_rb_remove(struct wine_rb_tree *tree, struct wine_rb_entry *entry)
◆ wine_rb_rotate_left()
◆ wine_rb_rotate_right()
◆ wine_rb_tail()