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
June 2017
----- 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
595 discussions
Start a n
N
ew thread
Nikolay Sivov : d3drm: Implement object name property.
by Alexandre Julliard
22 Jun '17
22 Jun '17
Module: wine Branch: master Commit: e2090c5c6d422461cb8470e482af50d557e4c091 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e2090c5c6d422461cb8470e48…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Wed Jun 21 15:39:30 2017 +0300 d3drm: Implement object name property. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/d3drm/d3drm_main.c | 46 ++++++++++++++++++++++++ dlls/d3drm/d3drm_private.h | 4 ++- dlls/d3drm/device.c | 12 ++++--- dlls/d3drm/face.c | 44 +++++++++++++---------- dlls/d3drm/frame.c | 36 ++++++++++++------- dlls/d3drm/light.c | 12 ++++--- dlls/d3drm/material.c | 12 ++++--- dlls/d3drm/meshbuilder.c | 54 +++++++++------------------- dlls/d3drm/tests/d3drm.c | 89 ++++++++++++++++++++++++++++++++++++++++++++++ dlls/d3drm/texture.c | 12 ++++--- dlls/d3drm/viewport.c | 24 ++++++++----- 11 files changed, 253 insertions(+), 92 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=e2090c5c6d422461cb847…
1
0
0
0
Nikolay Sivov : d3drm: Make it possible to create material objects with CreateObject().
by Alexandre Julliard
22 Jun '17
22 Jun '17
Module: wine Branch: master Commit: 48a047027bc644d898c4ef5db5bf5b465b3dfc97 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=48a047027bc644d898c4ef5db…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Wed Jun 21 15:39:29 2017 +0300 d3drm: Make it possible to create material objects with CreateObject(). Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/d3drm/d3drm.c | 22 ++++++++++++++++++++-- dlls/d3drm/d3drm_private.h | 21 ++++++++++++++++++++- dlls/d3drm/material.c | 43 ++++++++++++++++++------------------------- dlls/d3drm/meshbuilder.c | 4 +++- dlls/d3drm/tests/d3drm.c | 5 ++++- 5 files changed, 65 insertions(+), 30 deletions(-) diff --git a/dlls/d3drm/d3drm.c b/dlls/d3drm/d3drm.c index bf5721c..8ee3d56 100644 --- a/dlls/d3drm/d3drm.c +++ b/dlls/d3drm/d3drm.c @@ -136,6 +136,19 @@ static HRESULT d3drm_create_light_object(void **object, IDirect3DRM *d3drm) return hr; } +static HRESULT d3drm_create_material_object(void **object, IDirect3DRM *d3drm) +{ + struct d3drm_material *material; + HRESULT hr; + + if (FAILED(hr = d3drm_material_create(&material, d3drm))) + return hr; + + *object = &material->IDirect3DRMMaterial2_iface; + + return hr; +} + struct d3drm { IDirect3DRM IDirect3DRM_iface; @@ -1285,6 +1298,7 @@ static HRESULT WINAPI d3drm3_CreateObject(IDirect3DRM3 *iface, {&CLSID_CDirect3DRMMeshBuilder, d3drm_create_mesh_builder_object}, {&CLSID_CDirect3DRMFrame, d3drm_create_frame_object}, {&CLSID_CDirect3DRMLight, d3drm_create_light_object}, + {&CLSID_CDirect3DRMMaterial, d3drm_create_material_object}, }; TRACE("iface %p, clsid %s, outer %p, iid %s, out %p.\n", @@ -1474,12 +1488,16 @@ static HRESULT WINAPI d3drm3_CreateLightRGB(IDirect3DRM3 *iface, D3DRMLIGHTTYPE static HRESULT WINAPI d3drm3_CreateMaterial(IDirect3DRM3 *iface, D3DVALUE power, IDirect3DRMMaterial2 **material) { + struct d3drm *d3drm = impl_from_IDirect3DRM3(iface); + struct d3drm_material *object; HRESULT hr; TRACE("iface %p, power %.8e, material %p.\n", iface, power, material); - if (SUCCEEDED(hr = Direct3DRMMaterial_create(material))) - IDirect3DRMMaterial2_SetPower(*material, power); + if (SUCCEEDED(hr = d3drm_material_create(&object, &d3drm->IDirect3DRM_iface))) + IDirect3DRMMaterial2_SetPower(&object->IDirect3DRMMaterial2_iface, power); + + *material = &object->IDirect3DRMMaterial2_iface; return hr; } diff --git a/dlls/d3drm/d3drm_private.h b/dlls/d3drm/d3drm_private.h index 41f0c50..d6b884f 100644 --- a/dlls/d3drm/d3drm_private.h +++ b/dlls/d3drm/d3drm_private.h @@ -163,6 +163,25 @@ struct d3drm_light D3DVALUE penumbra; }; +struct color_rgb +{ + D3DVALUE r; + D3DVALUE g; + D3DVALUE b; +}; + +struct d3drm_material +{ + struct d3drm_object obj; + IDirect3DRMMaterial2 IDirect3DRMMaterial2_iface; + LONG ref; + IDirect3DRM *d3drm; + struct color_rgb emissive; + struct color_rgb specular; + D3DVALUE power; + struct color_rgb ambient; +}; + HRESULT d3drm_device_create(struct d3drm_device **device, IDirect3DRM *d3drm) DECLSPEC_HIDDEN; HRESULT d3drm_device_create_surfaces_from_clipper(struct d3drm_device *object, IDirectDraw *ddraw, IDirectDrawClipper *clipper, int width, int height, IDirectDrawSurface **surface) DECLSPEC_HIDDEN; @@ -185,8 +204,8 @@ HRESULT d3drm_face_create(struct d3drm_face **face) DECLSPEC_HIDDEN; HRESULT d3drm_viewport_create(struct d3drm_viewport **viewport, IDirect3DRM *d3drm) DECLSPEC_HIDDEN; HRESULT d3drm_mesh_builder_create(struct d3drm_mesh_builder **mesh_builder, IDirect3DRM *d3drm) DECLSPEC_HIDDEN; HRESULT d3drm_light_create(struct d3drm_light **light, IDirect3DRM *d3drm) DECLSPEC_HIDDEN; +HRESULT d3drm_material_create(struct d3drm_material **material, IDirect3DRM *d3drm) DECLSPEC_HIDDEN; HRESULT Direct3DRMMesh_create(IDirect3DRMMesh** obj) DECLSPEC_HIDDEN; -HRESULT Direct3DRMMaterial_create(IDirect3DRMMaterial2** ret_iface) DECLSPEC_HIDDEN; HRESULT load_mesh_data(IDirect3DRMMeshBuilder3 *iface, IDirectXFileData *data, D3DRMLOADTEXTURECALLBACK load_texture_proc, void *arg) DECLSPEC_HIDDEN; diff --git a/dlls/d3drm/material.c b/dlls/d3drm/material.c index 6020600..699fedd 100644 --- a/dlls/d3drm/material.c +++ b/dlls/d3drm/material.c @@ -25,24 +25,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3drm); -struct color_rgb -{ - D3DVALUE r; - D3DVALUE g; - D3DVALUE b; -}; - -struct d3drm_material -{ - struct d3drm_object obj; - IDirect3DRMMaterial2 IDirect3DRMMaterial2_iface; - LONG ref; - struct color_rgb emissive; - struct color_rgb specular; - D3DVALUE power; - struct color_rgb ambient; -}; - static inline struct d3drm_material *impl_from_IDirect3DRMMaterial2(IDirect3DRMMaterial2 *iface) { return CONTAINING_RECORD(iface, struct d3drm_material, IDirect3DRMMaterial2_iface); @@ -54,6 +36,7 @@ static HRESULT WINAPI d3drm_material_QueryInterface(IDirect3DRMMaterial2 *iface, if (IsEqualGUID(riid, &IID_IDirect3DRMMaterial2) || IsEqualGUID(riid, &IID_IDirect3DRMMaterial) + || IsEqualGUID(riid, &IID_IDirect3DRMObject) || IsEqualGUID(riid, &IID_IUnknown)) { IDirect3DRMMaterial2_AddRef(iface); @@ -85,7 +68,11 @@ static ULONG WINAPI d3drm_material_Release(IDirect3DRMMaterial2 *iface) TRACE("%p decreasing refcount to %u.\n", iface, refcount); if (!refcount) + { + d3drm_object_cleanup((IDirect3DRMObject *)iface, &material->obj); + IDirect3DRM_Release(material->d3drm); HeapFree(GetProcessHeap(), 0, material); + } return refcount; } @@ -101,17 +88,21 @@ static HRESULT WINAPI d3drm_material_Clone(IDirect3DRMMaterial2 *iface, static HRESULT WINAPI d3drm_material_AddDestroyCallback(IDirect3DRMMaterial2 *iface, D3DRMOBJECTCALLBACK cb, void *ctx) { - FIXME("iface %p, cb %p, ctx %p stub!\n", iface, cb, ctx); + struct d3drm_material *material = impl_from_IDirect3DRMMaterial2(iface); - return E_NOTIMPL; + TRACE("iface %p, cb %p, ctx %p.\n", iface, cb, ctx); + + return d3drm_object_add_destroy_callback(&material->obj, cb, ctx); } static HRESULT WINAPI d3drm_material_DeleteDestroyCallback(IDirect3DRMMaterial2 *iface, D3DRMOBJECTCALLBACK cb, void *ctx) { - FIXME("iface %p, cb %p, ctx %p stub!\n", iface, cb, ctx); + struct d3drm_material *material = impl_from_IDirect3DRMMaterial2(iface); - return E_NOTIMPL; + TRACE("iface %p, cb %p, ctx %p.\n", iface, cb, ctx); + + return d3drm_object_delete_destroy_callback(&material->obj, cb, ctx); } static HRESULT WINAPI d3drm_material_SetAppData(IDirect3DRMMaterial2 *iface, DWORD data) @@ -278,18 +269,20 @@ static const struct IDirect3DRMMaterial2Vtbl d3drm_material_vtbl = d3drm_material_SetAmbient, }; -HRESULT Direct3DRMMaterial_create(IDirect3DRMMaterial2 **out) +HRESULT d3drm_material_create(struct d3drm_material **material, IDirect3DRM *d3drm) { static const char classname[] = "Material"; struct d3drm_material *object; - TRACE("out %p.\n", out); + TRACE("material %p, d3drm %p.\n", material, d3drm); if (!(object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)))) return E_OUTOFMEMORY; object->IDirect3DRMMaterial2_iface.lpVtbl = &d3drm_material_vtbl; object->ref = 1; + object->d3drm = d3drm; + IDirect3DRM_AddRef(object->d3drm); object->specular.r = 1.0f; object->specular.g = 1.0f; @@ -297,7 +290,7 @@ HRESULT Direct3DRMMaterial_create(IDirect3DRMMaterial2 **out) d3drm_object_init(&object->obj, classname); - *out = &object->IDirect3DRMMaterial2_iface; + *material = object; return S_OK; } diff --git a/dlls/d3drm/meshbuilder.c b/dlls/d3drm/meshbuilder.c index eda068c..377d751 100644 --- a/dlls/d3drm/meshbuilder.c +++ b/dlls/d3drm/meshbuilder.c @@ -1232,6 +1232,7 @@ HRESULT load_mesh_data(IDirect3DRMMeshBuilder3 *iface, IDirectXFileData *pData, IDirectXFileData *data; IDirectXFileDataReference *reference; IDirectXFileObject *material_child; + struct d3drm_material *object; hr = IDirectXFileObject_QueryInterface(child, &IID_IDirectXFileData, (void **)&data); if (FAILED(hr)) @@ -1251,12 +1252,13 @@ HRESULT load_mesh_data(IDirect3DRMMeshBuilder3 *iface, IDirectXFileData *pData, IDirectXFileObject_Release(child); } - hr = Direct3DRMMaterial_create(&mesh_builder->materials[i].material); + hr = d3drm_material_create(&object, mesh_builder->d3drm); if (FAILED(hr)) { IDirectXFileData_Release(data); goto end; } + mesh_builder->materials[i].material = &object->IDirect3DRMMaterial2_iface; hr = IDirectXFileData_GetData(data, NULL, &size, (void**)&ptr); if (hr != DXFILE_OK) diff --git a/dlls/d3drm/tests/d3drm.c b/dlls/d3drm/tests/d3drm.c index fc19b97..6c29032 100644 --- a/dlls/d3drm/tests/d3drm.c +++ b/dlls/d3drm/tests/d3drm.c @@ -1404,6 +1404,8 @@ static void test_object(void) { &CLSID_CDirect3DRMFrame, &IID_IDirect3DRMFrame2 }, { &CLSID_CDirect3DRMFrame, &IID_IDirect3DRMFrame3 }, { &CLSID_CDirect3DRMLight, &IID_IDirect3DRMLight }, + { &CLSID_CDirect3DRMMaterial, &IID_IDirect3DRMMaterial }, + { &CLSID_CDirect3DRMMaterial, &IID_IDirect3DRMMaterial2 }, }; IDirect3DRM *d3drm1; IDirect3DRM2 *d3drm2; @@ -1429,7 +1431,8 @@ static void test_object(void) { BOOL takes_ref = IsEqualGUID(tests[i].clsid, &CLSID_CDirect3DRMMeshBuilder) || IsEqualGUID(tests[i].clsid, &CLSID_CDirect3DRMFrame) || - IsEqualGUID(tests[i].clsid, &CLSID_CDirect3DRMLight); + IsEqualGUID(tests[i].clsid, &CLSID_CDirect3DRMLight) || + IsEqualGUID(tests[i].clsid, &CLSID_CDirect3DRMMaterial); unknown = (IUnknown *)0xdeadbeef; hr = IDirect3DRM_CreateObject(d3drm1, NULL, NULL, tests[i].iid, (void **)&unknown);
1
0
0
0
Hans Leidekker : webservices: Add support for dynamic string callbacks.
by Alexandre Julliard
22 Jun '17
22 Jun '17
Module: wine Branch: master Commit: 4019682855e269814dd3ada346d2996779483fc5 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4019682855e269814dd3ada34…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Thu Jun 22 10:43:11 2017 +0200 webservices: Add support for dynamic string callbacks. Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/webservices/tests/writer.c | 81 ++++++++++++++++++++++++++++++++++++++++- dlls/webservices/writer.c | 55 ++++++++++++++++++++-------- 2 files changed, 118 insertions(+), 18 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=4019682855e269814dd3a…
1
0
0
0
Hans Leidekker : webservices: Allow the dictionary functions to be used with any dictionary.
by Alexandre Julliard
22 Jun '17
22 Jun '17
Module: wine Branch: master Commit: f7488ac67d36e525bdf9b5616299dd83a8722308 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f7488ac67d36e525bdf9b5616…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Thu Jun 22 10:43:10 2017 +0200 webservices: Allow the dictionary functions to be used with any dictionary. Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/webservices/reader.c | 4 +- dlls/webservices/string.c | 98 +++++++++++++++++----------------- dlls/webservices/webservices_private.h | 10 +++- 3 files changed, 58 insertions(+), 54 deletions(-) diff --git a/dlls/webservices/reader.c b/dlls/webservices/reader.c index 798bd4f..787f75b 100644 --- a/dlls/webservices/reader.c +++ b/dlls/webservices/reader.c @@ -5870,8 +5870,8 @@ HRESULT WINAPI WsSetInput( WS_XML_READER *handle, const WS_XML_READER_ENCODING * WS_XML_READER_BINARY_ENCODING *bin = (WS_XML_READER_BINARY_ENCODING *)encoding; reader->input_enc = WS_XML_READER_ENCODING_TYPE_BINARY; reader->input_charset = 0; - reader->dict_static = bin->staticDictionary ? bin->staticDictionary : &dict_builtin_static; - reader->dict = bin->dynamicDictionary ? bin->dynamicDictionary : &dict_builtin; + reader->dict_static = bin->staticDictionary ? bin->staticDictionary : &dict_builtin_static.dict; + reader->dict = bin->dynamicDictionary ? bin->dynamicDictionary : &dict_builtin.dict; break; } default: diff --git a/dlls/webservices/string.c b/dlls/webservices/string.c index a2e8685..f9df48f 100644 --- a/dlls/webservices/string.c +++ b/dlls/webservices/string.c @@ -44,10 +44,9 @@ static CRITICAL_SECTION_DEBUG dict_cs_debug = }; static CRITICAL_SECTION dict_cs = { &dict_cs_debug, -1, 0, 0, 0, 0 }; -static ULONG dict_size, *dict_sorted; -WS_XML_DICTIONARY dict_builtin = +struct dictionary dict_builtin = { - {0x82704485,0x222a,0x4f7c,{0xb9,0x7b,0xe9,0xa4,0x62,0xa9,0x66,0x2b}} + {{0x82704485,0x222a,0x4f7c,{0xb9,0x7b,0xe9,0xa4,0x62,0xa9,0x66,0x2b}}} }; static inline int cmp_string( const unsigned char *str, ULONG len, const unsigned char *str2, ULONG len2 ) @@ -63,22 +62,21 @@ static inline int cmp_string( const unsigned char *str, ULONG len, const unsigne } /* return -1 and string id if found, sort index if not found */ -static int find_string( const unsigned char *data, ULONG len, ULONG *id ) +static int find_string( const WS_XML_DICTIONARY *dict, const ULONG *sorted, const unsigned char *data, + ULONG len, ULONG *ret_id ) { - int i, c, min = 0, max = dict_builtin.stringCount - 1; + int i, c, min = 0, max = dict->stringCount - 1; while (min <= max) { i = (min + max) / 2; - c = cmp_string( data, len, - dict_builtin.strings[dict_sorted[i]].bytes, - dict_builtin.strings[dict_sorted[i]].length ); + c = cmp_string( data, len, dict->strings[sorted[i]].bytes, dict->strings[sorted[i]].length ); if (c < 0) max = i - 1; else if (c > 0) min = i + 1; else { - *id = dict_builtin.strings[dict_sorted[i]].id; + *ret_id = dict->strings[sorted[i]].id; return -1; } } @@ -88,50 +86,50 @@ static int find_string( const unsigned char *data, ULONG len, ULONG *id ) #define MIN_DICTIONARY_SIZE 256 #define MAX_DICTIONARY_SIZE 2048 -static BOOL grow_dict( ULONG size ) +static BOOL grow_dict( struct dictionary *dict, ULONG size ) { WS_XML_STRING *tmp; ULONG new_size, *tmp_sorted; - if (dict_size >= dict_builtin.stringCount + size) return TRUE; - if (dict_size + size > MAX_DICTIONARY_SIZE) return FALSE; + if (dict->size >= dict->dict.stringCount + size) return TRUE; + if (dict->size + size > MAX_DICTIONARY_SIZE) return FALSE; - if (!dict_builtin.strings) + if (!dict->dict.strings) { new_size = max( MIN_DICTIONARY_SIZE, size ); - if (!(dict_builtin.strings = heap_alloc( new_size * sizeof(WS_XML_STRING) ))) return FALSE; - if (!(dict_sorted = heap_alloc( new_size * sizeof(ULONG) ))) + if (!(dict->dict.strings = heap_alloc( new_size * sizeof(*dict->dict.strings) ))) return FALSE; + if (!(dict->sorted = heap_alloc( new_size * sizeof(*dict->sorted) ))) { - heap_free( dict_builtin.strings ); - dict_builtin.strings = NULL; + heap_free( dict->dict.strings ); + dict->dict.strings = NULL; return FALSE; } - dict_size = new_size; + dict->size = new_size; return TRUE; } - new_size = max( dict_size * 2, size ); - if (!(tmp = heap_realloc( dict_builtin.strings, new_size * sizeof(*tmp) ))) return FALSE; - dict_builtin.strings = tmp; - if (!(tmp_sorted = heap_realloc( dict_sorted, new_size * sizeof(*tmp_sorted) ))) return FALSE; - dict_sorted = tmp_sorted; + new_size = max( dict->size * 2, size ); + if (!(tmp = heap_realloc( dict->dict.strings, new_size * sizeof(*tmp) ))) return FALSE; + dict->dict.strings = tmp; + if (!(tmp_sorted = heap_realloc( dict->sorted, new_size * sizeof(*tmp_sorted) ))) return FALSE; + dict->sorted = tmp_sorted; - dict_size = new_size; + dict->size = new_size; return TRUE; } -static BOOL insert_string( unsigned char *data, ULONG len, int i, ULONG *ret_id ) +static BOOL insert_string( struct dictionary *dict, unsigned char *data, ULONG len, int i, ULONG *ret_id ) { - ULONG id = dict_builtin.stringCount; - if (!grow_dict( 1 )) return FALSE; - memmove( &dict_sorted[i] + 1, &dict_sorted[i], (dict_builtin.stringCount - i) * sizeof(WS_XML_STRING *) ); - dict_sorted[i] = id; - - dict_builtin.strings[id].length = len; - dict_builtin.strings[id].bytes = data; - dict_builtin.strings[id].dictionary = &dict_builtin; - dict_builtin.strings[id].id = id; - dict_builtin.stringCount++; + ULONG id = dict->dict.stringCount; + if (!grow_dict( dict, 1 )) return FALSE; + memmove( &dict->sorted[i] + 1, &dict->sorted[i], (dict->dict.stringCount - i) * sizeof(*dict->sorted) ); + dict->sorted[i] = id; + + dict->dict.strings[id].length = len; + dict->dict.strings[id].bytes = data; + dict->dict.strings[id].dictionary = &dict->dict; + dict->dict.strings[id].id = id; + dict->dict.stringCount++; *ret_id = id; return TRUE; } @@ -144,16 +142,16 @@ HRESULT add_xml_string( WS_XML_STRING *str ) if (str->dictionary) return S_OK; EnterCriticalSection( &dict_cs ); - if ((index = find_string( str->bytes, str->length, &id )) == -1) + if ((index = find_string( &dict_builtin.dict, dict_builtin.sorted, str->bytes, str->length, &id )) == -1) { heap_free( str->bytes ); - *str = dict_builtin.strings[id]; + *str = dict_builtin.dict.strings[id]; LeaveCriticalSection( &dict_cs ); return S_OK; } - if (insert_string( str->bytes, str->length, index, &id )) + if (insert_string( &dict_builtin, str->bytes, str->length, index, &id )) { - *str = dict_builtin.strings[id]; + *str = dict_builtin.dict.strings[id]; LeaveCriticalSection( &dict_cs ); return S_OK; } @@ -201,9 +199,9 @@ WS_XML_STRING *dup_xml_string( const WS_XML_STRING *src ) } EnterCriticalSection( &dict_cs ); - if ((index = find_string( src->bytes, src->length, &id )) == -1) + if ((index = find_string( &dict_builtin.dict, dict_builtin.sorted, src->bytes, src->length, &id )) == -1) { - *ret = dict_builtin.strings[id]; + *ret = dict_builtin.dict.strings[id]; LeaveCriticalSection( &dict_cs ); return ret; } @@ -214,9 +212,9 @@ WS_XML_STRING *dup_xml_string( const WS_XML_STRING *src ) return NULL; } memcpy( data, src->bytes, src->length ); - if (insert_string( data, src->length, index, &id )) + if (insert_string( &dict_builtin, data, src->length, index, &id )) { - *ret = dict_builtin.strings[id]; + *ret = dict_builtin.dict.strings[id]; LeaveCriticalSection( &dict_cs ); return ret; } @@ -230,10 +228,10 @@ WS_XML_STRING *dup_xml_string( const WS_XML_STRING *src ) return ret; } -const WS_XML_DICTIONARY dict_builtin_static; +const struct dictionary dict_builtin_static; static const WS_XML_STRING dict_strings[] = { -#define X(str, id) { sizeof(str) - 1, (BYTE *)(str), (WS_XML_DICTIONARY *)&dict_builtin_static, id }, +#define X(str, id) { sizeof(str) - 1, (BYTE *)(str), (WS_XML_DICTIONARY *)&dict_builtin_static.dict, id }, X("mustUnderstand", 0) X("Envelope", 1) X("
http://www.w3.org/2003/05/soap-envelope
", 2) @@ -725,12 +723,12 @@ static const WS_XML_STRING dict_strings[] = #undef X }; -const WS_XML_DICTIONARY dict_builtin_static = +const struct dictionary dict_builtin_static = { - {0xf93578f8,0x5852,0x4eb7,{0xa6,0xfc,0xe7,0x2b,0xb7,0x1d,0xb6,0x22}}, - (WS_XML_STRING *)dict_strings, - sizeof(dict_strings) / sizeof(dict_strings[0]), - TRUE + {{0xf93578f8,0x5852,0x4eb7,{0xa6,0xfc,0xe7,0x2b,0xb7,0x1d,0xb6,0x22}}, + (WS_XML_STRING *)dict_strings, + sizeof(dict_strings) / sizeof(dict_strings[0]), + TRUE} }; /************************************************************************** diff --git a/dlls/webservices/webservices_private.h b/dlls/webservices/webservices_private.h index 28bc6fb..cf6e1c4 100644 --- a/dlls/webservices/webservices_private.h +++ b/dlls/webservices/webservices_private.h @@ -35,8 +35,14 @@ void ws_free( WS_HEAP *, void *, SIZE_T ) DECLSPEC_HIDDEN; struct xmlbuf *alloc_xmlbuf( WS_HEAP *, WS_XML_WRITER_ENCODING_TYPE, WS_CHARSET ) DECLSPEC_HIDDEN; void free_xmlbuf( struct xmlbuf * ) DECLSPEC_HIDDEN; -WS_XML_DICTIONARY dict_builtin DECLSPEC_HIDDEN; -const WS_XML_DICTIONARY dict_builtin_static DECLSPEC_HIDDEN; +struct dictionary +{ + WS_XML_DICTIONARY dict; + ULONG size; + ULONG *sorted; +}; +struct dictionary dict_builtin DECLSPEC_HIDDEN; +const struct dictionary dict_builtin_static DECLSPEC_HIDDEN; ULONG format_bool( const BOOL *, unsigned char * ) DECLSPEC_HIDDEN; ULONG format_int8( const INT8 *, unsigned char * ) DECLSPEC_HIDDEN;
1
0
0
0
Alistair Leslie-Hughes : oledb32: Add FIXME for DBTYPE_NUMERIC type.
by Alexandre Julliard
22 Jun '17
22 Jun '17
Module: wine Branch: master Commit: 6e148790f4ae852be437f4cb40d4ef63fa6c0c3e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6e148790f4ae852be437f4cb4…
Author: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Date: Wed Jun 21 00:32:58 2017 +0000 oledb32: Add FIXME for DBTYPE_NUMERIC type. Signed-off-by: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/oledb32/convert.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dlls/oledb32/convert.c b/dlls/oledb32/convert.c index 59b2ecd..d959f65 100644 --- a/dlls/oledb32/convert.c +++ b/dlls/oledb32/convert.c @@ -1081,7 +1081,10 @@ static HRESULT WINAPI convert_DataConvert(IDataConvert* iface, } break; } - break; + + case DBTYPE_NUMERIC: + FIXME("Unimplemented conversion %04x -> DBTYPE_NUMERIC\n", src_type); + return E_NOTIMPL; default: FIXME("Unimplemented conversion %04x -> %04x\n", src_type, dst_type);
1
0
0
0
Alistair Leslie-Hughes : oledb32: Add support for converting to W/ STR types in GetConversionSize.
by Alexandre Julliard
22 Jun '17
22 Jun '17
Module: wine Branch: master Commit: 23b5640b3286e71b9f9ea78aaa131298281469f5 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=23b5640b3286e71b9f9ea78aa…
Author: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Date: Wed Jun 21 00:32:50 2017 +0000 oledb32: Add support for converting to W/STR types in GetConversionSize. Signed-off-by: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/oledb32/convert.c | 24 ++++++++++++ dlls/oledb32/tests/convert.c | 88 ++++++++++++++++++++++---------------------- 2 files changed, 68 insertions(+), 44 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=23b5640b3286e71b9f9ea…
1
0
0
0
Alistair Leslie-Hughes : oledb32: Supply a default dst len in GetConversionSize.
by Alexandre Julliard
22 Jun '17
22 Jun '17
Module: wine Branch: master Commit: b257f29473c2315a2573bf759146afde8a3c4a79 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b257f29473c2315a2573bf759…
Author: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Date: Wed Jun 21 00:32:39 2017 +0000 oledb32: Supply a default dst len in GetConversionSize. Signed-off-by: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/oledb32/convert.c | 2 + dlls/oledb32/tests/convert.c | 94 ++++++++++++++++++++++---------------------- 2 files changed, 49 insertions(+), 47 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=b257f29473c2315a2573b…
1
0
0
0
Piotr Caban : gdi32: Don' t write EMR_EXTSELECTCLIPRGN to emf file on SelectClipPath call.
by Alexandre Julliard
22 Jun '17
22 Jun '17
Module: wine Branch: master Commit: f629e9797dae61fd60ce3a727477caa02fdee22b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f629e9797dae61fd60ce3a727…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Wed Jun 21 10:34:17 2017 +0200 gdi32: Don't write EMR_EXTSELECTCLIPRGN to emf file on SelectClipPath call. Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/gdi32/enhmfdrv/dc.c | 10 +++++++++- dlls/gdi32/tests/metafile.c | 31 ++++++++++++++++++++++--------- 2 files changed, 31 insertions(+), 10 deletions(-) diff --git a/dlls/gdi32/enhmfdrv/dc.c b/dlls/gdi32/enhmfdrv/dc.c index 91fde55..531392b 100644 --- a/dlls/gdi32/enhmfdrv/dc.c +++ b/dlls/gdi32/enhmfdrv/dc.c @@ -479,13 +479,21 @@ BOOL EMFDRV_SelectClipPath( PHYSDEV dev, INT iMode ) { PHYSDEV next = GET_NEXT_PHYSDEV( dev, pSelectClipPath ); EMRSELECTCLIPPATH emr; + BOOL ret = FALSE; + HRGN hrgn; emr.emr.iType = EMR_SELECTCLIPPATH; emr.emr.nSize = sizeof(emr); emr.iMode = iMode; if (!EMFDRV_WriteRecord( dev, &emr.emr )) return FALSE; - return next->funcs->pSelectClipPath( next, iMode ); + hrgn = PathToRegion( dev->hdc ); + if (hrgn) + { + ret = next->funcs->pExtSelectClipRgn( next, hrgn, iMode ); + DeleteObject( hrgn ); + } + return ret; } BOOL EMFDRV_WidenPath( PHYSDEV dev ) diff --git a/dlls/gdi32/tests/metafile.c b/dlls/gdi32/tests/metafile.c index 514e2b4..eeec79c 100644 --- a/dlls/gdi32/tests/metafile.c +++ b/dlls/gdi32/tests/metafile.c @@ -2432,16 +2432,16 @@ static const unsigned char EMF_CLIPPING[] = 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x1e, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, + 0x1a, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00, - 0xd0, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x04, 0x01, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, - 0x7c, 0x01, 0x00, 0x00, 0x2c, 0x01, 0x00, 0x00, + 0x80, 0x07, 0x00, 0x00, 0xb0, 0x04, 0x00, 0x00, + 0xfc, 0x01, 0x00, 0x00, 0x3e, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x60, 0xcc, 0x05, 0x00, - 0xe0, 0x93, 0x04, 0x00, 0x36, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x60, 0xc0, 0x07, 0x00, + 0x30, 0xda, 0x04, 0x00, 0x36, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x4b, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, @@ -2451,9 +2451,16 @@ static const unsigned char EMF_CLIPPING[] = 0x64, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, - 0x00, 0x04, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, - 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x10, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00 + 0x00, 0x04, 0x00, 0x00, 0x3b, 0x00, 0x00, 0x00, + 0x08, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x00, 0x00, + 0x18, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00, + 0x64, 0x00, 0x00, 0x00, 0xff, 0x03, 0x00, 0x00, + 0xff, 0x03, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, + 0x08, 0x00, 0x00, 0x00, 0x43, 0x00, 0x00, 0x00, + 0x0c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x0e, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00 }; static void translate( POINT *pt, UINT count, const XFORM *xform ) @@ -2605,6 +2612,12 @@ static void test_emf_clipping(void) ret = SelectClipRgn(hdc, hrgn); ok(ret == SIMPLEREGION, "expected SIMPLEREGION, got %d\n", ret); + BeginPath(hdc); + Rectangle(hdc, rc_clip.left, rc_clip.top, rc_clip.right, rc_clip.bottom); + EndPath(hdc); + ret = SelectClipPath(hdc, RGN_AND); + ok(ret, "SelectClipPath error %d\n", GetLastError()); + SetLastError(0xdeadbeef); hemf = CloseEnhMetaFile(hdc); ok(hemf != 0, "CloseEnhMetaFile error %d\n", GetLastError());
1
0
0
0
Dmitry Timoshkov : user.exe16: Remove redundant HeapReAlloc.
by Alexandre Julliard
22 Jun '17
22 Jun '17
Module: wine Branch: master Commit: a628412f2b21a003b4b43832cc5fb899ff393aef URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a628412f2b21a003b4b43832c…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Thu Jun 22 15:56:27 2017 +0800 user.exe16: Remove redundant HeapReAlloc. Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/user.exe16/user.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/dlls/user.exe16/user.c b/dlls/user.exe16/user.c index 4a00d58..267714a 100644 --- a/dlls/user.exe16/user.c +++ b/dlls/user.exe16/user.c @@ -3288,9 +3288,6 @@ DWORD WINAPI FormatMessage16( *t='\0'; } talloced = strlen(target)+1; - if (nSize && talloced<nSize) { - target = HeapReAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,target,nSize); - } TRACE("-- %s\n",debugstr_a(target)); if (dwFlags & FORMAT_MESSAGE_ALLOCATE_BUFFER) { /* nSize is the MINIMUM size */
1
0
0
0
Dmitry Timoshkov : user.exe16: Fix memory leak in case when HeapReAlloc fails.
by Alexandre Julliard
22 Jun '17
22 Jun '17
Module: wine Branch: master Commit: 8c3ed829279cb7951688392801e3210abd19d27f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8c3ed829279cb795168839280…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Thu Jun 22 15:56:24 2017 +0800 user.exe16: Fix memory leak in case when HeapReAlloc fails. Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/user.exe16/user.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dlls/user.exe16/user.c b/dlls/user.exe16/user.c index aba797d..4a00d58 100644 --- a/dlls/user.exe16/user.c +++ b/dlls/user.exe16/user.c @@ -3245,8 +3245,11 @@ DWORD WINAPI FormatMessage16( /* CMF - This makes a BIG assumption about va_list */ while ((ret = vsnprintf(b, sz, fmtstr, (va_list) argliststart)) < 0 || ret >= sz) { + LPSTR new_b; sz = (ret == -1 ? sz + 100 : ret + 1); - b = HeapReAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, b, sz); + new_b = HeapReAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, b, sz); + if (!new_b) break; + b = new_b; } for (x=b; *x; x++) ADD_TO_T(*x); HeapFree(GetProcessHeap(), 0, b);
1
0
0
0
← Newer
1
...
14
15
16
17
18
19
20
...
60
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
58
59
60
Results per page:
10
25
50
100
200