winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
July 2015
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
2 participants
567 discussions
Start a n
N
ew thread
Alex Henrie : user32/tests: Correct spelling of "Invisible".
by Alexandre Julliard
20 Jul '15
20 Jul '15
Module: wine Branch: master Commit: 541a6e1e5e86b89ea60eb7475ed14e75e6bdda6d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=541a6e1e5e86b89ea60eb7475…
Author: Alex Henrie <alexhenrie24(a)gmail.com> Date: Mon Jul 20 00:42:36 2015 -0600 user32/tests: Correct spelling of "Invisible". --- dlls/user32/tests/msg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c index 03f6b5c..8b4475f 100644 --- a/dlls/user32/tests/msg.c +++ b/dlls/user32/tests/msg.c @@ -3209,7 +3209,7 @@ static const struct message WmMinimizeMDIchildVisibleSeq[] = { { 0 } }; /* ShowWindow(SW_RESTORE) for a not visible MDI child window */ -static const struct message WmRestoreMDIchildInisibleSeq[] = { +static const struct message WmRestoreMDIchildInvisibleSeq[] = { { HCBT_MINMAX, hook|lparam, 0, SW_RESTORE }, { WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_FRAMECHANGED|SWP_STATECHANGED }, { WM_NCCALCSIZE, sent|wparam, 1 }, @@ -3537,7 +3537,7 @@ static void test_mdi_messages(void) ok_sequence(WmHideChildSeq, "ShowWindow(SW_HIDE):MDI child", FALSE); ShowWindow(mdi_child2, SW_RESTORE); - ok_sequence(WmRestoreMDIchildInisibleSeq, "ShowWindow(SW_RESTORE):invisible MDI child", FALSE); + ok_sequence(WmRestoreMDIchildInvisibleSeq, "ShowWindow(SW_RESTORE):invisible MDI child", FALSE); flush_sequence(); ok(GetWindowLongA(mdi_child2, GWL_STYLE) & WS_VISIBLE, "MDI child should be visible\n");
1
0
0
0
Henri Verbeet : d3d10core: Implement d3d10_device_CopySubresourceRegion().
by Alexandre Julliard
20 Jul '15
20 Jul '15
Module: wine Branch: master Commit: e2c0c611d48eda80e6cd6a8f2a98ad500bdf2d56 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e2c0c611d48eda80e6cd6a8f2…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Mon Jul 20 11:07:30 2015 +0200 d3d10core: Implement d3d10_device_CopySubresourceRegion(). --- dlls/d3d10core/device.c | 19 ++++++++++-- dlls/wined3d/device.c | 74 +++++++++++++++++++++++++++++++++++++++++++++++ dlls/wined3d/wined3d.spec | 1 + include/wine/wined3d.h | 4 +++ 4 files changed, 96 insertions(+), 2 deletions(-) diff --git a/dlls/d3d10core/device.c b/dlls/d3d10core/device.c index 3ba87b4..abf0430 100644 --- a/dlls/d3d10core/device.c +++ b/dlls/d3d10core/device.c @@ -635,10 +635,25 @@ static void STDMETHODCALLTYPE d3d10_device_CopySubresourceRegion(ID3D10Device1 * ID3D10Resource *dst_resource, UINT dst_subresource_idx, UINT dst_x, UINT dst_y, UINT dst_z, ID3D10Resource *src_resource, UINT src_subresource_idx, const D3D10_BOX *src_box) { - FIXME("iface %p, dst_resource %p, dst_subresource_idx %u, dst_x %u, dst_y %u, dst_z %u,\n" - "\tsrc_resource %p, src_subresource_idx %u, src_box %p stub!\n", + struct wined3d_resource *wined3d_dst_resource, *wined3d_src_resource; + struct d3d10_device *device = impl_from_ID3D10Device(iface); + struct wined3d_box wined3d_src_box; + + TRACE("iface %p, dst_resource %p, dst_subresource_idx %u, dst_x %u, dst_y %u, dst_z %u, " + "src_resource %p, src_subresource_idx %u, src_box %p.\n", iface, dst_resource, dst_subresource_idx, dst_x, dst_y, dst_z, src_resource, src_subresource_idx, src_box); + + wined3d_dst_resource = wined3d_resource_from_resource(dst_resource); + wined3d_src_resource = wined3d_resource_from_resource(src_resource); + wined3d_src_box.left = src_box->left; + wined3d_src_box.top = src_box->top; + wined3d_src_box.front = src_box->front; + wined3d_src_box.right = src_box->right; + wined3d_src_box.bottom = src_box->bottom; + wined3d_src_box.back = src_box->back; + wined3d_device_copy_sub_resource_region(device->wined3d_device, wined3d_dst_resource, dst_subresource_idx, + dst_x, dst_y, dst_z, wined3d_src_resource, src_subresource_idx, &wined3d_src_box); } static void STDMETHODCALLTYPE d3d10_device_CopyResource(ID3D10Device1 *iface, diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 56cf325..bff610d 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -3908,6 +3908,80 @@ void CDECL wined3d_device_copy_resource(struct wined3d_device *device, } } +void CDECL wined3d_device_copy_sub_resource_region(struct wined3d_device *device, + struct wined3d_resource *dst_resource, unsigned int dst_sub_resource_idx, unsigned int dst_x, + unsigned int dst_y, unsigned int dst_z, struct wined3d_resource *src_resource, + unsigned int src_sub_resource_idx, const struct wined3d_box *src_box) +{ + struct wined3d_surface *dst_surface, *src_surface; + struct wined3d_texture *dst_texture, *src_texture; + struct wined3d_resource *tmp; + RECT dst_rect, src_rect; + HRESULT hr; + + TRACE("device %p, dst_resource %p, dst_sub_resource_idx %u, dst_x %u, dst_y %u, dst_z %u, " + "src_resource %p, src_sub_resource_idx %u, src_box %p.\n", + device, dst_resource, dst_sub_resource_idx, dst_x, dst_y, dst_z, + src_resource, src_sub_resource_idx, src_box); + + if (src_resource == dst_resource && src_sub_resource_idx == dst_sub_resource_idx) + { + WARN("Source and destination are the same sub-resource.\n"); + return; + } + + if (src_resource->type != dst_resource->type) + { + WARN("Resource types (%s / %s) don't match.\n", + debug_d3dresourcetype(dst_resource->type), + debug_d3dresourcetype(src_resource->type)); + return; + } + + if (src_resource->format->id != dst_resource->format->id) + { + WARN("Resource formats (%s / %s) don't match.\n", + debug_d3dformat(dst_resource->format->id), + debug_d3dformat(src_resource->format->id)); + return; + } + + if (dst_resource->type != WINED3D_RTYPE_TEXTURE) + { + FIXME("Not implemented for %s resources.\n", debug_d3dresourcetype(dst_resource->type)); + return; + } + + dst_texture = wined3d_texture_from_resource(dst_resource); + if (!(tmp = wined3d_texture_get_sub_resource(dst_texture, dst_sub_resource_idx))) + { + WARN("Invalid dst_sub_resource_idx %u.\n", dst_sub_resource_idx); + return; + } + dst_surface = surface_from_resource(tmp); + + src_texture = wined3d_texture_from_resource(src_resource); + if (!(tmp = wined3d_texture_get_sub_resource(src_texture, src_sub_resource_idx))) + { + WARN("Invalid src_sub_resource_idx %u.\n", src_sub_resource_idx); + return; + } + src_surface = surface_from_resource(tmp); + + dst_rect.left = dst_x; + dst_rect.top = dst_y; + dst_rect.right = dst_x + (src_box->right - src_box->left); + dst_rect.bottom = dst_y + (src_box->bottom - src_box->top); + + src_rect.left = src_box->left; + src_rect.top = src_box->top; + src_rect.right = src_box->right; + src_rect.bottom = src_box->bottom; + + if (FAILED(hr = wined3d_surface_blt(dst_surface, &dst_rect, src_surface, &src_rect, 0, NULL, WINED3D_TEXF_POINT))) + ERR("Failed to blit, hr %#x.\n", hr); +} + HRESULT CDECL wined3d_device_clear_rendertarget_view(struct wined3d_device *device, struct wined3d_rendertarget_view *view, const RECT *rect, const struct wined3d_color *color) { diff --git a/dlls/wined3d/wined3d.spec b/dlls/wined3d/wined3d.spec index a79d6a6..f478106 100644 --- a/dlls/wined3d/wined3d.spec +++ b/dlls/wined3d/wined3d.spec @@ -38,6 +38,7 @@ @ cdecl wined3d_device_clear(ptr long ptr long ptr float long) @ cdecl wined3d_device_clear_rendertarget_view(ptr ptr ptr ptr) @ cdecl wined3d_device_copy_resource(ptr ptr ptr) +@ cdecl wined3d_device_copy_sub_resource_region(ptr ptr long long long long ptr long ptr) @ cdecl wined3d_device_create(ptr long long ptr long long ptr ptr) @ cdecl wined3d_device_decref(ptr) @ cdecl wined3d_device_draw_indexed_primitive(ptr long long) diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h index bb7007c..6ff1a3e 100644 --- a/include/wine/wined3d.h +++ b/include/wine/wined3d.h @@ -2137,6 +2137,10 @@ HRESULT __cdecl wined3d_device_clear_rendertarget_view(struct wined3d_device *de struct wined3d_rendertarget_view *view, const RECT *rect, const struct wined3d_color *color); void __cdecl wined3d_device_copy_resource(struct wined3d_device *device, struct wined3d_resource *dst_resource, struct wined3d_resource *src_resource); +void __cdecl wined3d_device_copy_sub_resource_region(struct wined3d_device *device, + struct wined3d_resource *dst_resource, unsigned int dst_sub_resource_idx, unsigned int dst_x, + unsigned int dst_y, unsigned int dst_z, struct wined3d_resource *src_resource, + unsigned int src_sub_resource_idx, const struct wined3d_box *src_box); HRESULT __cdecl wined3d_device_create(struct wined3d *wined3d, UINT adapter_idx, enum wined3d_device_type device_type, HWND focus_window, DWORD behaviour_flags, BYTE surface_alignment, struct wined3d_device_parent *device_parent, struct wined3d_device **device);
1
0
0
0
Henri Verbeet : d2d1: Add some FIXMEs for unimplemented functionality to d2d_d3d_render_target_DrawGlyphRun ().
by Alexandre Julliard
20 Jul '15
20 Jul '15
Module: wine Branch: master Commit: fc1286aed87201ac7adae18d2f5272246723c76a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=fc1286aed87201ac7adae18d2…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Mon Jul 20 11:07:29 2015 +0200 d2d1: Add some FIXMEs for unimplemented functionality to d2d_d3d_render_target_DrawGlyphRun(). --- dlls/d2d1/render_target.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dlls/d2d1/render_target.c b/dlls/d2d1/render_target.c index 37a8d57..ac6a0fa 100644 --- a/dlls/d2d1/render_target.c +++ b/dlls/d2d1/render_target.c @@ -848,6 +848,10 @@ static void STDMETHODCALLTYPE d2d_d3d_render_target_DrawGlyphRun(ID2D1RenderTarg if (measuring_mode) FIXME("Ignoring measuring mode %#x.\n", measuring_mode); + if (render_target->text_rendering_params) + FIXME("Ignoring text rendering parameters %p.\n", render_target->text_rendering_params); + if (render_target->drawing_state.textAntialiasMode != D2D1_TEXT_ANTIALIAS_MODE_ALIASED) + FIXME("Ignoring text antialiasing mode %#x.\n", render_target->drawing_state.textAntialiasMode); if (FAILED(hr = ID2D1Factory_CreatePathGeometry(render_target->factory, &geometry))) {
1
0
0
0
Henri Verbeet : d2d1: Implement initial support for drawing bezier curves.
by Alexandre Julliard
20 Jul '15
20 Jul '15
Module: wine Branch: master Commit: b33786ce6da790d1d120cb00c68e007b974e93bd URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b33786ce6da790d1d120cb00c…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Mon Jul 20 11:07:28 2015 +0200 d2d1: Implement initial support for drawing bezier curves. --- dlls/d2d1/brush.c | 17 +-- dlls/d2d1/d2d1_private.h | 39 +++++- dlls/d2d1/geometry.c | 123 +++++++++++++++++-- dlls/d2d1/render_target.c | 282 +++++++++++++++++++++++++++++++------------- dlls/d2d1/tests/d2d1.c | 293 ++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 643 insertions(+), 111 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=b33786ce6da790d1d120c…
1
0
0
0
Henri Verbeet : d2d1: Implement d2d_geometry_sink_SetFillMode().
by Alexandre Julliard
20 Jul '15
20 Jul '15
Module: wine Branch: master Commit: 025c3201450eecc666465be73dd739077690be32 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=025c3201450eecc666465be73…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Mon Jul 20 11:07:27 2015 +0200 d2d1: Implement d2d_geometry_sink_SetFillMode(). --- dlls/d2d1/d2d1_private.h | 1 + dlls/d2d1/geometry.c | 19 +++- dlls/d2d1/tests/d2d1.c | 246 ++++++++++++++++++++++++++--------------------- 3 files changed, 153 insertions(+), 113 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=025c3201450eecc666465…
1
0
0
0
Henri Verbeet : d2d1/tests: Don't call compare_surface() inside ok().
by Alexandre Julliard
20 Jul '15
20 Jul '15
Module: wine Branch: master Commit: f5b4da0ddd2a9d8f02eed429be0f3df1d70276fa URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f5b4da0ddd2a9d8f02eed429b…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Mon Jul 20 11:07:26 2015 +0200 d2d1/tests: Don't call compare_surface() inside ok(). --- dlls/d2d1/tests/d2d1.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/dlls/d2d1/tests/d2d1.c b/dlls/d2d1/tests/d2d1.c index a27ddfa..1106423 100644 --- a/dlls/d2d1/tests/d2d1.c +++ b/dlls/d2d1/tests/d2d1.c @@ -277,6 +277,7 @@ static void test_clip(void) D2D1_SIZE_F size; HWND window; HRESULT hr; + BOOL match; static const D2D1_MATRIX_3X2_F identity = { 1.0f, 0.0f, @@ -370,7 +371,8 @@ static void test_clip(void) hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL); ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr); - ok(compare_surface(surface, "035a44d4198d6e422e9de6185b5b2c2bac5e33c9"), "Surface does not match.\n"); + match = compare_surface(surface, "035a44d4198d6e422e9de6185b5b2c2bac5e33c9"); + ok(match, "Surface does not match.\n"); ID2D1RenderTarget_Release(rt); IDXGISurface_Release(surface); @@ -606,6 +608,7 @@ static void test_color_brush(void) float opacity; HWND window; HRESULT hr; + BOOL match; if (!(device = create_device())) { @@ -681,7 +684,8 @@ static void test_color_brush(void) hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL); ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr); - ok(compare_surface(surface, "6d1218fca5e21fb7e287b3a439d60dbc251f5ceb"), "Surface does not match.\n"); + match = compare_surface(surface, "6d1218fca5e21fb7e287b3a439d60dbc251f5ceb"); + ok(match, "Surface does not match.\n"); ID2D1SolidColorBrush_Release(brush); ID2D1RenderTarget_Release(rt); @@ -711,6 +715,7 @@ static void test_bitmap_brush(void) float opacity; HWND window; HRESULT hr; + BOOL match; static const struct { @@ -833,7 +838,8 @@ static void test_bitmap_brush(void) hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL); ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr); - ok(compare_surface(surface, "393636185359a550d459e1e5f0e25411814f724c"), "Surface does not match.\n"); + match = compare_surface(surface, "393636185359a550d459e1e5f0e25411814f724c"); + ok(match, "Surface does not match.\n"); ID2D1RenderTarget_BeginDraw(rt); @@ -861,7 +867,8 @@ static void test_bitmap_brush(void) hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL); ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr); - ok(compare_surface(surface, "b4b775afecdae2d26642001f4faff73663bb8b31"), "Surface does not match.\n"); + match = compare_surface(surface, "b4b775afecdae2d26642001f4faff73663bb8b31"); + ok(match, "Surface does not match.\n"); ID2D1BitmapBrush_Release(brush); refcount = ID2D1Bitmap_Release(bitmap); @@ -889,6 +896,7 @@ static void test_path_geometry(void) UINT32 count; HWND window; HRESULT hr; + BOOL match; if (!(device = create_device())) { @@ -1185,7 +1193,8 @@ static void test_path_geometry(void) hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL); ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr); - ok(compare_surface(surface, "736d9bf019bcf0be264571c1bd954f07752330ab"), "Surface does not match.\n"); + match = compare_surface(surface, "736d9bf019bcf0be264571c1bd954f07752330ab"); + ok(match, "Surface does not match.\n"); ID2D1PathGeometry_Release(geometry); ID2D1SolidColorBrush_Release(brush);
1
0
0
0
YongHao Hu : msvcp110: Fix TRACE msg of tr2 functions.
by Alexandre Julliard
20 Jul '15
20 Jul '15
Module: wine Branch: master Commit: 4980830ba62e2b2a75a1c03d8a8ebb91964b5905 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4980830ba62e2b2a75a1c03d8…
Author: YongHao Hu <christopherwuy(a)gmail.com> Date: Sat Jul 18 02:19:21 2015 +0800 msvcp110: Fix TRACE msg of tr2 functions. --- dlls/msvcp90/ios.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/dlls/msvcp90/ios.c b/dlls/msvcp90/ios.c index 2311c58..53c1089 100644 --- a/dlls/msvcp90/ios.c +++ b/dlls/msvcp90/ios.c @@ -14202,7 +14202,7 @@ ULONGLONG __cdecl tr2_sys__File_size(const char* path) { WIN32_FILE_ATTRIBUTE_DATA fad; - TRACE("(%p)\n", path); + TRACE("(%s)\n", debugstr_a(path)); if(!GetFileAttributesExA(path, GetFileExInfoStandard, &fad)) return 0; if(fad.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) @@ -14218,7 +14218,7 @@ int __cdecl tr2_sys__Equivalent(char const* path1, char const* path2) HANDLE h1, h2; int ret; BY_HANDLE_FILE_INFORMATION info1, info2; - TRACE("(%p %p)\n", path1, path2); + TRACE("(%s %s)\n", debugstr_a(path1), debugstr_a(path2)); h1 = CreateFileA(path1, 0, FILE_SHARE_DELETE | FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0, 0); @@ -14251,7 +14251,7 @@ int __cdecl tr2_sys__Equivalent(char const* path1, char const* path2) /* ?_Current_get@sys@tr2@std@@YAPEADAEAY0BAE@D@Z */ char* __cdecl tr2_sys__Current_get(char *current_path) { - TRACE("(%p)\n", current_path); + TRACE("(%s)\n", debugstr_a(current_path)); if(!GetCurrentDirectoryA(MAX_PATH, current_path)) return NULL; @@ -14262,7 +14262,7 @@ char* __cdecl tr2_sys__Current_get(char *current_path) /* ?_Current_set@sys@tr2@std@@YA_NPEBD@Z */ MSVCP_bool __cdecl tr2_sys__Current_set(char const* path) { - TRACE("(%p)\n", path); + TRACE("(%s)\n", debugstr_a(path)); return SetCurrentDirectoryA(path) != 0; } @@ -14270,7 +14270,7 @@ MSVCP_bool __cdecl tr2_sys__Current_set(char const* path) /* ?_Make_dir@sys@tr2@std@@YAHPEBD@Z */ int __cdecl tr2_sys__Make_dir(char const* path) { - TRACE("(%p)\n", path); + TRACE("(%s)\n", debugstr_a(path)); if(!CreateDirectoryA(path, NULL)) { if(GetLastError() == ERROR_ALREADY_EXISTS) @@ -14286,7 +14286,7 @@ int __cdecl tr2_sys__Make_dir(char const* path) /* ?_Remove_dir@sys@tr2@std@@YA_NPEBD@Z */ MSVCP_bool __cdecl tr2_sys__Remove_dir(char const* path) { - TRACE("(%p)\n", path); + TRACE("(%s)\n", debugstr_a(path)); return RemoveDirectoryA(path) != 0; }
1
0
0
0
Iván Matellanes : msvcirt: Add ios instance counter.
by Alexandre Julliard
20 Jul '15
20 Jul '15
Module: wine Branch: master Commit: 6812bb7469c95f21d13e52cc8a22b0edc7086f1c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6812bb7469c95f21d13e52cc8…
Author: Iván Matellanes <matellanesivan(a)gmail.com> Date: Fri Jul 17 16:37:24 2015 +0200 msvcirt: Add ios instance counter. --- dlls/msvcirt/msvcirt.c | 6 ++++++ dlls/msvcirt/msvcirt.spec | 2 +- dlls/msvcirt/tests/msvcirt.c | 10 ++++++++++ dlls/msvcrt20/msvcrt20.spec | 2 +- dlls/msvcrt40/msvcrt40.spec | 2 +- 5 files changed, 19 insertions(+), 3 deletions(-) diff --git a/dlls/msvcirt/msvcirt.c b/dlls/msvcirt/msvcirt.c index eb4e3e4..1c26e1c 100644 --- a/dlls/msvcirt/msvcirt.c +++ b/dlls/msvcirt/msvcirt.c @@ -38,6 +38,9 @@ const LONG ios_adjustfield = FLAGS_left | FLAGS_right | FLAGS_internal; const LONG ios_basefield = FLAGS_dec | FLAGS_oct | FLAGS_hex; /* ?floatfield@ios@@2JB */ const LONG ios_floatfield = FLAGS_scientific | FLAGS_fixed; +/* ?fLockcInit@ios@@0HA */ +/* FIXME: should be initialized to 0 and increased on construction of cin, cout, cerr and clog */ +int ios_fLockcInit = 4; /* ?x_lockc@ios@@0U_CRT_CRITICAL_SECTION@@A */ extern CRITICAL_SECTION ios_static_lock; CRITICAL_SECTION_DEBUG ios_static_lock_debug = @@ -741,6 +744,7 @@ DEFINE_THISCALL_WRAPPER(ios_copy_ctor, 8) ios* __thiscall ios_copy_ctor(ios *this, const ios *copy) { TRACE("(%p %p)\n", this, copy); + ios_fLockcInit++; this->vtable = &MSVCP_ios_vtable; this->sb = NULL; this->delbuf = 0; @@ -754,6 +758,7 @@ DEFINE_THISCALL_WRAPPER(ios_sb_ctor, 8) ios* __thiscall ios_sb_ctor(ios *this, streambuf *sb) { TRACE("(%p %p)\n", this, sb); + ios_fLockcInit++; this->vtable = &MSVCP_ios_vtable; this->sb = sb; this->state = sb ? IOSTATE_goodbit : IOSTATE_badbit; @@ -783,6 +788,7 @@ DEFINE_THISCALL_WRAPPER(ios_dtor, 4) void __thiscall ios_dtor(ios *this) { TRACE("(%p)\n", this); + ios_fLockcInit--; if (this->delbuf && this->sb) call_streambuf_vector_dtor(this->sb, 1); this->sb = NULL; diff --git a/dlls/msvcirt/msvcirt.spec b/dlls/msvcirt/msvcirt.spec index 4d15bdb..2780ecf 100644 --- a/dlls/msvcirt/msvcirt.spec +++ b/dlls/msvcirt/msvcirt.spec @@ -465,7 +465,7 @@ @ cdecl -arch=win64 ?eof@ios@@QEBAHXZ(ptr) ios_eof @ thiscall -arch=win32 ?epptr@streambuf@@IBEPADXZ(ptr) streambuf_epptr @ cdecl -arch=win64 ?epptr@streambuf@@IEBAPEADXZ(ptr) streambuf_epptr -# @ extern ?fLockcInit@ios@@0HA # static int ios::fLockcInit +@ extern ?fLockcInit@ios@@0HA ios_fLockcInit @ thiscall -arch=win32 ?fail@ios@@QBEHXZ(ptr) ios_fail @ cdecl -arch=win64 ?fail@ios@@QEBAHXZ(ptr) ios_fail @ stub -arch=win32 ?fd@filebuf@@QBEHXZ # int __thiscall filebuf::fd(void)const diff --git a/dlls/msvcirt/tests/msvcirt.c b/dlls/msvcirt/tests/msvcirt.c index e1390b5..30941d5 100644 --- a/dlls/msvcirt/tests/msvcirt.c +++ b/dlls/msvcirt/tests/msvcirt.c @@ -154,6 +154,7 @@ static LONG *p_ios_statebuf; static LONG* (*__thiscall p_ios_iword)(const ios*, int); static void** (*__thiscall p_ios_pword)(const ios*, int); static int (*__cdecl p_ios_xalloc)(void); +static int *p_ios_fLockcInit; /* Emulate a __thiscall */ #ifdef __i386__ @@ -333,6 +334,7 @@ static BOOL init(void) SET(p_ios_curindex, "?x_curindex@ios@@0HA"); SET(p_ios_statebuf, "?x_statebuf@ios@@0PAJA"); SET(p_ios_xalloc, "?xalloc@ios@@SAHXZ"); + SET(p_ios_fLockcInit, "?fLockcInit@ios@@0HA"); init_thiscall_thunk(); return TRUE; @@ -916,6 +918,7 @@ static void test_ios(void) call_func1(p_streambuf_ctor, psb); /* constructor/destructor */ + ok(*p_ios_fLockcInit == 4, "expected 4 got %d\n", *p_ios_fLockcInit); call_func2(p_ios_sb_ctor, &ios_obj, NULL); ok(ios_obj.sb == NULL, "expected %p got %p\n", NULL, ios_obj.sb); ok(ios_obj.state == IOSTATE_badbit, "expected %x got %x\n", IOSTATE_badbit, ios_obj.state); @@ -929,23 +932,28 @@ static void test_ios(void) ok(ios_obj.width == 0, "expected 0 got %d\n", ios_obj.width); ok(ios_obj.do_lock == -1, "expected -1 got %d\n", ios_obj.do_lock); ok(ios_obj.lock.LockCount == -1, "expected -1 got %d\n", ios_obj.lock.LockCount); + ok(*p_ios_fLockcInit == 5, "expected 5 got %d\n", *p_ios_fLockcInit); ios_obj.state = 0x8; call_func1(p_ios_dtor, &ios_obj); ok(ios_obj.state == IOSTATE_badbit, "expected %x got %x\n", IOSTATE_badbit, ios_obj.state); + ok(*p_ios_fLockcInit == 4, "expected 4 got %d\n", *p_ios_fLockcInit); ios_obj.state = 0x8; call_func2(p_ios_sb_ctor, &ios_obj, psb); ok(ios_obj.sb == psb, "expected %p got %p\n", psb, ios_obj.sb); ok(ios_obj.state == IOSTATE_goodbit, "expected %x got %x\n", IOSTATE_goodbit, ios_obj.state); ok(ios_obj.delbuf == 0, "expected 0 got %d\n", ios_obj.delbuf); + ok(*p_ios_fLockcInit == 5, "expected 5 got %d\n", *p_ios_fLockcInit); ios_obj.state = 0x8; call_func1(p_ios_dtor, &ios_obj); ok(ios_obj.sb == NULL, "expected %p got %p\n", NULL, ios_obj.sb); ok(ios_obj.state == IOSTATE_badbit, "expected %x got %x\n", IOSTATE_badbit, ios_obj.state); + ok(*p_ios_fLockcInit == 4, "expected 4 got %d\n", *p_ios_fLockcInit); ios_obj.sb = psb; ios_obj.state = 0x8; call_func1(p_ios_ctor, &ios_obj); ok(ios_obj.sb == NULL, "expected %p got %p\n", NULL, ios_obj.sb); ok(ios_obj.state == IOSTATE_badbit, "expected %x got %x\n", IOSTATE_badbit, ios_obj.state); + ok(*p_ios_fLockcInit == 5, "expected 5 got %d\n", *p_ios_fLockcInit); /* init */ ios_obj.state |= 0x8; @@ -973,6 +981,7 @@ static void test_ios(void) ok(ios_obj.fill == (char)0xab, "expected %d got %d\n", (char)0xab, ios_obj.fill); ok(ios_obj.width == (char)0xab, "expected %d got %d\n", (char)0xab, ios_obj.width); ok(ios_obj.do_lock == -1, "expected -1 got %d\n", ios_obj.do_lock); + ok(*p_ios_fLockcInit == 5, "expected 5 got %d\n", *p_ios_fLockcInit); /* assignment */ ios_obj.state = 0x8; @@ -1137,6 +1146,7 @@ static void test_ios(void) ios_obj.delbuf = 1; call_func1(p_ios_dtor, &ios_obj); ok(ios_obj.state == IOSTATE_badbit, "expected %x got %x\n", IOSTATE_badbit, ios_obj.state); + ok(*p_ios_fLockcInit == 4, "expected 4 got %d\n", *p_ios_fLockcInit); CloseHandle(lock_arg.lock); CloseHandle(lock_arg.release[0]); CloseHandle(lock_arg.release[1]); diff --git a/dlls/msvcrt20/msvcrt20.spec b/dlls/msvcrt20/msvcrt20.spec index d110d28..45b7b02 100644 --- a/dlls/msvcrt20/msvcrt20.spec +++ b/dlls/msvcrt20/msvcrt20.spec @@ -453,7 +453,7 @@ @ cdecl -arch=win64 ?eof@ios@@QEBAHXZ(ptr) msvcirt.?eof@ios@@QEBAHXZ @ thiscall -arch=win32 ?epptr@streambuf@@IBEPADXZ(ptr) msvcirt.?epptr@streambuf@@IBEPADXZ @ cdecl -arch=win64 ?epptr@streambuf@@IEBAPEADXZ(ptr) msvcirt.?epptr@streambuf@@IEBAPEADXZ -# @ extern ?fLockcInit@ios@@0HA +@ extern ?fLockcInit@ios@@0HA msvcirt.?fLockcInit@ios@@0HA @ thiscall -arch=win32 ?fail@ios@@QBEHXZ(ptr) msvcirt.?fail@ios@@QBEHXZ @ cdecl -arch=win64 ?fail@ios@@QEBAHXZ(ptr) msvcirt.?fail@ios@@QEBAHXZ @ stub -arch=win32 ?fd@filebuf@@QBEHXZ diff --git a/dlls/msvcrt40/msvcrt40.spec b/dlls/msvcrt40/msvcrt40.spec index afd9894..7d02b2e 100644 --- a/dlls/msvcrt40/msvcrt40.spec +++ b/dlls/msvcrt40/msvcrt40.spec @@ -518,7 +518,7 @@ @ cdecl -arch=win64 ?eof@ios@@QEBAHXZ(ptr) msvcirt.?eof@ios@@QEBAHXZ @ thiscall -arch=win32 ?epptr@streambuf@@IBEPADXZ(ptr) msvcirt.?epptr@streambuf@@IBEPADXZ @ cdecl -arch=win64 ?epptr@streambuf@@IEBAPEADXZ(ptr) msvcirt.?epptr@streambuf@@IEBAPEADXZ -# @ extern ?fLockcInit@ios@@0HA +@ extern ?fLockcInit@ios@@0HA msvcirt.?fLockcInit@ios@@0HA @ thiscall -arch=win32 ?fail@ios@@QBEHXZ(ptr) msvcirt.?fail@ios@@QBEHXZ @ cdecl -arch=win64 ?fail@ios@@QEBAHXZ(ptr) msvcirt.?fail@ios@@QEBAHXZ @ stub -arch=win32 ?fd@filebuf@@QBEHXZ
1
0
0
0
Iván Matellanes : msvcirt: Add support for ios state variables.
by Alexandre Julliard
20 Jul '15
20 Jul '15
Module: wine Branch: master Commit: b6c5bd15c488bfb89f5f4b55721f5af87db49ca1 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b6c5bd15c488bfb89f5f4b557…
Author: Iván Matellanes <matellanesivan(a)gmail.com> Date: Fri Jul 17 16:37:18 2015 +0200 msvcirt: Add support for ios state variables. --- dlls/msvcirt/msvcirt.c | 23 +++++++++++++++++------ dlls/msvcirt/msvcirt.spec | 4 ++-- dlls/msvcirt/tests/msvcirt.c | 33 ++++++++++++++++++++++++++++++++- dlls/msvcrt20/msvcrt20.spec | 4 ++-- dlls/msvcrt40/msvcrt40.spec | 4 ++-- 5 files changed, 55 insertions(+), 13 deletions(-) diff --git a/dlls/msvcirt/msvcirt.c b/dlls/msvcirt/msvcirt.c index 0ce9fff..eb4e3e4 100644 --- a/dlls/msvcirt/msvcirt.c +++ b/dlls/msvcirt/msvcirt.c @@ -30,6 +30,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(msvcirt); #define RESERVE_SIZE 512 +#define STATEBUF_SIZE 8 /* ?adjustfield@ios@@2JB */ const LONG ios_adjustfield = FLAGS_left | FLAGS_right | FLAGS_internal; @@ -48,6 +49,10 @@ CRITICAL_SECTION_DEBUG ios_static_lock_debug = CRITICAL_SECTION ios_static_lock = { &ios_static_lock_debug, -1, 0, 0, 0, 0 }; /* ?x_maxbit@ios@@0JA */ LONG ios_maxbit = 0x8000; +/* ?x_curindex@ios@@0HA */ +int ios_curindex = -1; +/* ?x_statebuf@ios@@0PAJA */ +LONG ios_statebuf[STATEBUF_SIZE] = {0}; /* class streambuf */ typedef struct { @@ -1018,8 +1023,8 @@ void __thiscall ios_init(ios *this, streambuf *sb) DEFINE_THISCALL_WRAPPER(ios_iword, 8) LONG* __thiscall ios_iword(const ios *this, int index) { - FIXME("(%p %d) stub\n", this, index); - return NULL; + TRACE("(%p %d)\n", this, index); + return &ios_statebuf[index]; } /* ?lock@ios@@QAAXXZ */ @@ -1091,8 +1096,8 @@ int __thiscall ios_precision_get(const ios *this) DEFINE_THISCALL_WRAPPER(ios_pword, 8) void** __thiscall ios_pword(const ios *this, int index) { - FIXME("(%p %d) stub\n", this, index); - return NULL; + TRACE("(%p %d)\n", this, index); + return (void**)&ios_statebuf[index]; } /* ?rdbuf@ios@@QBEPAVstreambuf@@XZ */ @@ -1245,8 +1250,14 @@ int __thiscall ios_width_get(const ios *this) /* ?xalloc@ios@@SAHXZ */ int __cdecl ios_xalloc(void) { - FIXME("() stub\n"); - return 0; + int ret; + + TRACE("()\n"); + + ios_lockc(); + ret = (ios_curindex < STATEBUF_SIZE-1) ? ++ios_curindex : -1; + ios_unlockc(); + return ret; } /****************************************************************** diff --git a/dlls/msvcirt/msvcirt.spec b/dlls/msvcirt/msvcirt.spec index b4dcdc2..4d15bdb 100644 --- a/dlls/msvcirt/msvcirt.spec +++ b/dlls/msvcirt/msvcirt.spec @@ -776,10 +776,10 @@ @ stub -arch=win64 ?writepad@ostream@@AEAAAEAV1@PEBD0@Z @ stub -arch=win32 ?ws@@YAAAVistream@@AAV1@@Z # class istream & __cdecl ws(class istream &) @ stub -arch=win64 ?ws@@YAAEAVistream@@AEAV1@@Z -# @ extern ?x_curindex@ios@@0HA # static int ios::x_curindex +@ extern ?x_curindex@ios@@0HA ios_curindex @ extern ?x_lockc@ios@@0U_CRT_CRITICAL_SECTION@@A ios_static_lock @ extern ?x_maxbit@ios@@0JA ios_maxbit -# @ extern ?x_statebuf@ios@@0PAJA # static long * ios::x_statebuf +@ extern ?x_statebuf@ios@@0PAJA ios_statebuf @ cdecl ?xalloc@ios@@SAHXZ() ios_xalloc @ thiscall -arch=win32 ?xsgetn@streambuf@@UAEHPADH@Z(ptr ptr long) streambuf_xsgetn @ cdecl -arch=win64 ?xsgetn@streambuf@@UEAAHPEADH@Z(ptr ptr long) streambuf_xsgetn diff --git a/dlls/msvcirt/tests/msvcirt.c b/dlls/msvcirt/tests/msvcirt.c index 5fac801..e1390b5 100644 --- a/dlls/msvcirt/tests/msvcirt.c +++ b/dlls/msvcirt/tests/msvcirt.c @@ -149,6 +149,11 @@ static int (*__thiscall p_ios_fail)(const ios*); static void (*__thiscall p_ios_clear)(ios*, int); static LONG *p_ios_maxbit; static LONG (*__cdecl p_ios_bitalloc)(void); +static int *p_ios_curindex; +static LONG *p_ios_statebuf; +static LONG* (*__thiscall p_ios_iword)(const ios*, int); +static void** (*__thiscall p_ios_pword)(const ios*, int); +static int (*__cdecl p_ios_xalloc)(void); /* Emulate a __thiscall */ #ifdef __i386__ @@ -267,6 +272,8 @@ static BOOL init(void) SET(p_ios_eof, "?eof@ios@@QEBAHXZ"); SET(p_ios_fail, "?fail@ios@@QEBAHXZ"); SET(p_ios_clear, "?clear@ios@@QEAAXH@Z"); + SET(p_ios_iword, "?iword@ios@@QEBAAEAJH@Z"); + SET(p_ios_pword, "?pword@ios@@QEBAAEAPEAXH@Z"); } else { p_operator_new = (void*)GetProcAddress(msvcrt, "??2@YAPAXI@Z"); @@ -315,12 +322,17 @@ static BOOL init(void) SET(p_ios_eof, "?eof@ios@@QBEHXZ"); SET(p_ios_fail, "?fail@ios@@QBEHXZ"); SET(p_ios_clear, "?clear@ios@@QAEXH@Z"); + SET(p_ios_iword, "?iword@ios@@QBEAAJH@Z"); + SET(p_ios_pword, "?pword@ios@@QBEAAPAXH@Z"); } SET(p_ios_static_lock, "?x_lockc@ios@@0U_CRT_CRITICAL_SECTION@@A"); SET(p_ios_lockc, "?lockc@ios@@KAXXZ"); SET(p_ios_unlockc, "?unlockc@ios@@KAXXZ"); SET(p_ios_maxbit, "?x_maxbit@ios@@0JA"); SET(p_ios_bitalloc, "?bitalloc@ios@@SAJXZ"); + SET(p_ios_curindex, "?x_curindex@ios@@0HA"); + SET(p_ios_statebuf, "?x_statebuf@ios@@0PAJA"); + SET(p_ios_xalloc, "?xalloc@ios@@SAHXZ"); init_thiscall_thunk(); return TRUE; @@ -893,7 +905,8 @@ static void test_ios(void) struct ios_lock_arg lock_arg; HANDLE thread; BOOL locked; - LONG expected, ret; + LONG *pret, expected, ret; + void **pret2; int i; memset(&ios_obj, 0xab, sizeof(ios)); @@ -1099,6 +1112,24 @@ static void test_ios(void) expected <<= 1; } + /* xalloc/pword/iword */ + ok(*p_ios_curindex == -1, "expected -1 got %d\n", *p_ios_curindex); + expected = 0; + for (i = 0; i < 8; i++) { + ret = p_ios_xalloc(); + ok(ret == expected, "expected %d got %d\n", expected, ret); + ok(*p_ios_curindex == expected, "expected %d got %d\n", expected, *p_ios_curindex); + pret = (LONG*) call_func2(p_ios_iword, &ios_obj, ret); + ok(pret == &p_ios_statebuf[ret], "expected %p got %p\n", &p_ios_statebuf[ret], pret); + ok(*pret == 0, "expected 0 got %d\n", *pret); + pret2 = (void**) call_func2(p_ios_pword, &ios_obj, ret); + ok(pret2 == (void**)&p_ios_statebuf[ret], "expected %p got %p\n", (void**)&p_ios_statebuf[ret], pret2); + expected++; + } + ret = p_ios_xalloc(); + ok(ret == -1, "expected -1 got %d\n", ret); + ok(*p_ios_curindex == 7, "expected 7 got %d\n", *p_ios_curindex); + SetEvent(lock_arg.release[1]); SetEvent(lock_arg.release[2]); WaitForSingleObject(thread, INFINITE); diff --git a/dlls/msvcrt20/msvcrt20.spec b/dlls/msvcrt20/msvcrt20.spec index 529c0d9..d110d28 100644 --- a/dlls/msvcrt20/msvcrt20.spec +++ b/dlls/msvcrt20/msvcrt20.spec @@ -764,10 +764,10 @@ @ stub -arch=win64 ?writepad@ostream@@AEAAAEAV1@PEBD0@Z @ stub -arch=win32 ?ws@@YAAAVistream@@AAV1@@Z @ stub -arch=win64 ?ws@@YAAEAVistream@@AEAV1@@Z -# @ extern ?x_curindex@ios@@0HA +@ extern ?x_curindex@ios@@0HA msvcirt.?x_curindex@ios@@0HA @ extern ?x_lockc@ios@@0U_CRT_CRITICAL_SECTION@@A msvcirt.?x_lockc@ios@@0U_CRT_CRITICAL_SECTION@@A @ extern ?x_maxbit@ios@@0JA msvcirt.?x_maxbit@ios@@0JA -# @ extern ?x_statebuf@ios@@0QAJA +@ extern ?x_statebuf@ios@@0QAJA msvcrt40.?x_statebuf@ios@@0QAJA @ cdecl ?xalloc@ios@@SAHXZ() msvcirt.?xalloc@ios@@SAHXZ @ thiscall -arch=win32 ?xsgetn@streambuf@@UAEHPADH@Z(ptr ptr long) msvcirt.?xsgetn@streambuf@@UAEHPADH@Z @ cdecl -arch=win64 ?xsgetn@streambuf@@UEAAHPEADH@Z(ptr ptr long) msvcirt.?xsgetn@streambuf@@UEAAHPEADH@Z diff --git a/dlls/msvcrt40/msvcrt40.spec b/dlls/msvcrt40/msvcrt40.spec index e5a2852..afd9894 100644 --- a/dlls/msvcrt40/msvcrt40.spec +++ b/dlls/msvcrt40/msvcrt40.spec @@ -838,10 +838,10 @@ @ stub -arch=win64 ?writepad@ostream@@AEAAAEAV1@PEBD0@Z @ stub -arch=win32 ?ws@@YAAAVistream@@AAV1@@Z @ stub -arch=win64 ?ws@@YAAEAVistream@@AEAV1@@Z -# @ extern ?x_curindex@ios@@0HA +@ extern ?x_curindex@ios@@0HA msvcirt.?x_curindex@ios@@0HA @ extern ?x_lockc@ios@@0U_CRT_CRITICAL_SECTION@@A msvcirt.?x_lockc@ios@@0U_CRT_CRITICAL_SECTION@@A @ extern ?x_maxbit@ios@@0JA msvcirt.?x_maxbit@ios@@0JA -# @ extern ?x_statebuf@ios@@0PAJA +@ extern ?x_statebuf@ios@@0QAJA msvcirt.?x_statebuf@ios@@0QAJA @ cdecl ?xalloc@ios@@SAHXZ() msvcirt.?xalloc@ios@@SAHXZ @ thiscall -arch=win32 ?xsgetn@streambuf@@UAEHPADH@Z(ptr ptr long) msvcirt.?xsgetn@streambuf@@UAEHPADH@Z @ cdecl -arch=win64 ?xsgetn@streambuf@@UEAAHPEADH@Z(ptr ptr long) msvcirt.?xsgetn@streambuf@@UEAAHPEADH@Z
1
0
0
0
Iván Matellanes : msvcirt: Implement ios::bitalloc.
by Alexandre Julliard
20 Jul '15
20 Jul '15
Module: wine Branch: master Commit: f2037e2e96e5ec79902ed5ef80527bf2e05f2c15 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f2037e2e96e5ec79902ed5ef8…
Author: Iván Matellanes <matellanesivan(a)gmail.com> Date: Fri Jul 17 16:37:14 2015 +0200 msvcirt: Implement ios::bitalloc. --- dlls/msvcirt/msvcirt.c | 11 +++++++++-- dlls/msvcirt/msvcirt.spec | 2 +- dlls/msvcirt/tests/msvcirt.c | 17 ++++++++++++++++- dlls/msvcrt20/msvcrt20.spec | 2 +- dlls/msvcrt40/msvcrt40.spec | 2 +- 5 files changed, 28 insertions(+), 6 deletions(-) diff --git a/dlls/msvcirt/msvcirt.c b/dlls/msvcirt/msvcirt.c index bbcefbf..0ce9fff 100644 --- a/dlls/msvcirt/msvcirt.c +++ b/dlls/msvcirt/msvcirt.c @@ -46,6 +46,8 @@ CRITICAL_SECTION_DEBUG ios_static_lock_debug = 0, 0, { (DWORD_PTR)(__FILE__ ": ios_static_lock") } }; CRITICAL_SECTION ios_static_lock = { &ios_static_lock_debug, -1, 0, 0, 0, 0 }; +/* ?x_maxbit@ios@@0JA */ +LONG ios_maxbit = 0x8000; /* class streambuf */ typedef struct { @@ -90,8 +92,10 @@ typedef struct { ios* __thiscall ios_assign(ios*, const ios*); int __thiscall ios_fail(const ios*); void __cdecl ios_lock(ios*); +void __cdecl ios_lockc(void); LONG __thiscall ios_setf_mask(ios*, LONG, LONG); void __cdecl ios_unlock(ios*); +void __cdecl ios_unlockc(void); /* class ostream */ typedef struct _ostream { @@ -858,8 +862,11 @@ int __thiscall ios_bad(const ios *this) /* ?bitalloc@ios@@SAJXZ */ LONG __cdecl ios_bitalloc(void) { - FIXME("() stub\n"); - return 0; + TRACE("()\n"); + ios_lockc(); + ios_maxbit <<= 1; + ios_unlockc(); + return ios_maxbit; } /* ?clear@ios@@QAEXH@Z */ diff --git a/dlls/msvcirt/msvcirt.spec b/dlls/msvcirt/msvcirt.spec index b64b41a..b4dcdc2 100644 --- a/dlls/msvcirt/msvcirt.spec +++ b/dlls/msvcirt/msvcirt.spec @@ -778,7 +778,7 @@ @ stub -arch=win64 ?ws@@YAAEAVistream@@AEAV1@@Z # @ extern ?x_curindex@ios@@0HA # static int ios::x_curindex @ extern ?x_lockc@ios@@0U_CRT_CRITICAL_SECTION@@A ios_static_lock -# @ extern ?x_maxbit@ios@@0JA # static long ios::x_maxbit +@ extern ?x_maxbit@ios@@0JA ios_maxbit # @ extern ?x_statebuf@ios@@0PAJA # static long * ios::x_statebuf @ cdecl ?xalloc@ios@@SAHXZ() ios_xalloc @ thiscall -arch=win32 ?xsgetn@streambuf@@UAEHPADH@Z(ptr ptr long) streambuf_xsgetn diff --git a/dlls/msvcirt/tests/msvcirt.c b/dlls/msvcirt/tests/msvcirt.c index c65d419..5fac801 100644 --- a/dlls/msvcirt/tests/msvcirt.c +++ b/dlls/msvcirt/tests/msvcirt.c @@ -147,6 +147,8 @@ static int (*__thiscall p_ios_bad)(const ios*); static int (*__thiscall p_ios_eof)(const ios*); static int (*__thiscall p_ios_fail)(const ios*); static void (*__thiscall p_ios_clear)(ios*, int); +static LONG *p_ios_maxbit; +static LONG (*__cdecl p_ios_bitalloc)(void); /* Emulate a __thiscall */ #ifdef __i386__ @@ -317,6 +319,8 @@ static BOOL init(void) SET(p_ios_static_lock, "?x_lockc@ios@@0U_CRT_CRITICAL_SECTION@@A"); SET(p_ios_lockc, "?lockc@ios@@KAXXZ"); SET(p_ios_unlockc, "?unlockc@ios@@KAXXZ"); + SET(p_ios_maxbit, "?x_maxbit@ios@@0JA"); + SET(p_ios_bitalloc, "?bitalloc@ios@@SAJXZ"); init_thiscall_thunk(); return TRUE; @@ -889,7 +893,8 @@ static void test_ios(void) struct ios_lock_arg lock_arg; HANDLE thread; BOOL locked; - LONG ret; + LONG expected, ret; + int i; memset(&ios_obj, 0xab, sizeof(ios)); memset(&ios_obj2, 0xab, sizeof(ios)); @@ -1084,6 +1089,16 @@ static void test_ios(void) ios_obj.do_lock = -1; SetEvent(lock_arg.release[0]); + + /* bitalloc */ + expected = 0x10000; + for (i = 0; i < 20; i++) { + ret = p_ios_bitalloc(); + ok(ret == expected, "expected %x got %x\n", expected, ret); + ok(*p_ios_maxbit == expected, "expected %x got %x\n", expected, *p_ios_maxbit); + expected <<= 1; + } + SetEvent(lock_arg.release[1]); SetEvent(lock_arg.release[2]); WaitForSingleObject(thread, INFINITE); diff --git a/dlls/msvcrt20/msvcrt20.spec b/dlls/msvcrt20/msvcrt20.spec index aa6f5bc..529c0d9 100644 --- a/dlls/msvcrt20/msvcrt20.spec +++ b/dlls/msvcrt20/msvcrt20.spec @@ -766,7 +766,7 @@ @ stub -arch=win64 ?ws@@YAAEAVistream@@AEAV1@@Z # @ extern ?x_curindex@ios@@0HA @ extern ?x_lockc@ios@@0U_CRT_CRITICAL_SECTION@@A msvcirt.?x_lockc@ios@@0U_CRT_CRITICAL_SECTION@@A -# @ extern ?x_maxbit@ios@@0JA +@ extern ?x_maxbit@ios@@0JA msvcirt.?x_maxbit@ios@@0JA # @ extern ?x_statebuf@ios@@0QAJA @ cdecl ?xalloc@ios@@SAHXZ() msvcirt.?xalloc@ios@@SAHXZ @ thiscall -arch=win32 ?xsgetn@streambuf@@UAEHPADH@Z(ptr ptr long) msvcirt.?xsgetn@streambuf@@UAEHPADH@Z diff --git a/dlls/msvcrt40/msvcrt40.spec b/dlls/msvcrt40/msvcrt40.spec index a80fd20..e5a2852 100644 --- a/dlls/msvcrt40/msvcrt40.spec +++ b/dlls/msvcrt40/msvcrt40.spec @@ -840,7 +840,7 @@ @ stub -arch=win64 ?ws@@YAAEAVistream@@AEAV1@@Z # @ extern ?x_curindex@ios@@0HA @ extern ?x_lockc@ios@@0U_CRT_CRITICAL_SECTION@@A msvcirt.?x_lockc@ios@@0U_CRT_CRITICAL_SECTION@@A -# @ extern ?x_maxbit@ios@@0JA +@ extern ?x_maxbit@ios@@0JA msvcirt.?x_maxbit@ios@@0JA # @ extern ?x_statebuf@ios@@0PAJA @ cdecl ?xalloc@ios@@SAHXZ() msvcirt.?xalloc@ios@@SAHXZ @ thiscall -arch=win32 ?xsgetn@streambuf@@UAEHPADH@Z(ptr ptr long) msvcirt.?xsgetn@streambuf@@UAEHPADH@Z
1
0
0
0
← Newer
1
...
14
15
16
17
18
19
20
...
57
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
Results per page:
10
25
50
100
200