Commit 3527230c authored by Alexandre Julliard's avatar Alexandre Julliard

include: Remove the wine_ prefix on rbtree functions.

Add defines for frequently-used functions. For compatibility with vkd3d. Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent f253fbd6
......@@ -791,8 +791,8 @@ static void free_ranges_remove_view( struct file_view *view )
/* It's possible to use AT_ROUND_TO_PAGE on 32bit with NtMapViewOfSection to force 4kB alignment,
* and this breaks our assumptions. Look at the views around to check if the range is still in use. */
#ifndef _WIN64
struct file_view *prev_view = WINE_RB_ENTRY_VALUE( wine_rb_prev( &view->entry ), struct file_view, entry );
struct file_view *next_view = WINE_RB_ENTRY_VALUE( wine_rb_next( &view->entry ), struct file_view, entry );
struct file_view *prev_view = RB_ENTRY_VALUE( rb_prev( &view->entry ), struct file_view, entry );
struct file_view *next_view = RB_ENTRY_VALUE( rb_next( &view->entry ), struct file_view, entry );
void *prev_view_base = prev_view ? ROUND_ADDR( prev_view->base, granularity_mask ) : NULL;
void *prev_view_end = prev_view ? ROUND_ADDR( (char *)prev_view->base + prev_view->size + granularity_mask, granularity_mask ) : NULL;
void *next_view_base = next_view ? ROUND_ADDR( next_view->base, granularity_mask ) : NULL;
......@@ -1293,7 +1293,7 @@ static void *map_free_area( void *base, void *end, size_t size, int top_down, in
start = ROUND_ADDR( (char *)view->base - size, granularity_mask );
/* stop if remaining space is not large enough */
if (!start || start >= end || start < base) return NULL;
first = wine_rb_prev( first );
first = rb_prev( first );
}
}
else
......@@ -1309,7 +1309,7 @@ static void *map_free_area( void *base, void *end, size_t size, int top_down, in
start = ROUND_ADDR( (char *)view->base + view->size + granularity_mask, granularity_mask );
/* stop if remaining space is not large enough */
if (!start || start >= end || (char *)end - (char *)start < size) return NULL;
first = wine_rb_next( first );
first = rb_next( first );
}
}
......
......@@ -1032,7 +1032,7 @@ BOOL wrap_marked_paras_dc( ME_TextEditor *editor, HDC hdc, BOOL invalidate )
ME_InitContext( &c, editor, hdc );
entry = wine_rb_head( editor->marked_paras.root );
entry = rb_head( editor->marked_paras.root );
while (entry)
{
para = WINE_RB_ENTRY_VALUE( entry, ME_Paragraph, marked_entry );
......@@ -1045,7 +1045,7 @@ BOOL wrap_marked_paras_dc( ME_TextEditor *editor, HDC hdc, BOOL invalidate )
next_entry = entry;
}
else
next_entry = wine_rb_next( entry );
next_entry = rb_next( entry );
c.pt = para->pt;
prev_width = para->nWidth;
......@@ -1076,7 +1076,7 @@ BOOL wrap_marked_paras_dc( ME_TextEditor *editor, HDC hdc, BOOL invalidate )
}
entry = next_entry;
}
wine_rb_clear( &editor->marked_paras, NULL, NULL );
wine_rb_destroy( &editor->marked_paras, NULL, NULL );
editor->sizeWindow.cx = c.rcView.right-c.rcView.left;
editor->sizeWindow.cy = c.rcView.bottom-c.rcView.top;
......
......@@ -1182,10 +1182,10 @@ void wined3d_device_uninit_3d(struct wined3d_device *device)
wined3d_device_context_emit_reset_state(&device->cs->c, true);
state_cleanup(state);
wine_rb_clear(&device->samplers, device_free_sampler, NULL);
wine_rb_clear(&device->rasterizer_states, device_free_rasterizer_state, NULL);
wine_rb_clear(&device->blend_states, device_free_blend_state, NULL);
wine_rb_clear(&device->depth_stencil_states, device_free_depth_stencil_state, NULL);
wine_rb_destroy(&device->samplers, device_free_sampler, NULL);
wine_rb_destroy(&device->rasterizer_states, device_free_rasterizer_state, NULL);
wine_rb_destroy(&device->blend_states, device_free_blend_state, NULL);
wine_rb_destroy(&device->depth_stencil_states, device_free_depth_stencil_state, NULL);
LIST_FOR_EACH_ENTRY_SAFE(resource, cursor, &device->resources, struct wined3d_resource, resource_list_entry)
{
......@@ -5556,10 +5556,10 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
}
}
wine_rb_clear(&device->samplers, device_free_sampler, NULL);
wine_rb_clear(&device->rasterizer_states, device_free_rasterizer_state, NULL);
wine_rb_clear(&device->blend_states, device_free_blend_state, NULL);
wine_rb_clear(&device->depth_stencil_states, device_free_depth_stencil_state, NULL);
wine_rb_destroy(&device->samplers, device_free_sampler, NULL);
wine_rb_destroy(&device->rasterizer_states, device_free_rasterizer_state, NULL);
wine_rb_destroy(&device->blend_states, device_free_blend_state, NULL);
wine_rb_destroy(&device->depth_stencil_states, device_free_depth_stencil_state, NULL);
if (reset_state)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment