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
July
June
May
April
March
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 2023
----- 2025 -----
July 2025
June 2025
May 2025
April 2025
March 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
1 participants
865 discussions
Start a n
N
ew thread
Alexandre Julliard : d3drm: Use nameless unions/structs.
by Alexandre Julliard
13 Jul '23
13 Jul '23
Module: wine Branch: master Commit: 2aab642849f329b24a228f530b97bf62c164b369 URL:
https://gitlab.winehq.org/wine/wine/-/commit/2aab642849f329b24a228f530b97bf…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Jul 13 11:55:55 2023 +0200 d3drm: Use nameless unions/structs. --- dlls/d3drm/d3drm_private.h | 2 -- dlls/d3drm/device.c | 2 +- dlls/d3drm/frame.c | 56 +++++++++++++++++++++++----------------------- dlls/d3drm/math.c | 52 +++++++++++++++++++++--------------------- dlls/d3drm/meshbuilder.c | 24 ++++++++++---------- dlls/d3drm/viewport.c | 16 ++++++------- 6 files changed, 75 insertions(+), 77 deletions(-)
1
0
0
0
Connor McAdams : combase: Use correct destination context in CoUnmarshalInterface when using the standard marshaler.
by Alexandre Julliard
13 Jul '23
13 Jul '23
Module: wine Branch: master Commit: a42f5f197093f0942d1c1ee60f1cf0d8a7b610cd URL:
https://gitlab.winehq.org/wine/wine/-/commit/a42f5f197093f0942d1c1ee60f1cf0…
Author: Connor McAdams <cmcadams(a)codeweavers.com> Date: Thu Jun 29 08:36:25 2023 -0400 combase: Use correct destination context in CoUnmarshalInterface when using the standard marshaler. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=54609
Signed-off-by: Connor McAdams <cmcadams(a)codeweavers.com> --- dlls/combase/combase_private.h | 1 + dlls/combase/marshal.c | 8 +++++--- dlls/combase/stubmanager.c | 25 +++++++++++++++++++++++++ dlls/ole32/tests/marshal.c | 2 +- 4 files changed, 32 insertions(+), 4 deletions(-) diff --git a/dlls/combase/combase_private.h b/dlls/combase/combase_private.h index f9c349c3e20..53932e9a357 100644 --- a/dlls/combase/combase_private.h +++ b/dlls/combase/combase_private.h @@ -256,4 +256,5 @@ struct ifstub * stub_manager_new_ifstub(struct stub_manager *m, IRpcStubBuffer * HRESULT ipid_get_dispatch_params(const IPID *ipid, struct apartment **stub_apt, struct stub_manager **manager, IRpcStubBuffer **stub, IRpcChannelBuffer **chan, IID *iid, IUnknown **iface); +HRESULT ipid_get_dest_context(const IPID *ipid, MSHCTX *dest_context, void **dest_context_data); HRESULT start_apartment_remote_unknown(struct apartment *apt); diff --git a/dlls/combase/marshal.c b/dlls/combase/marshal.c index e2f6a57d8e1..84f57b8c1c8 100644 --- a/dlls/combase/marshal.c +++ b/dlls/combase/marshal.c @@ -698,7 +698,7 @@ HRESULT WINAPI CoReleaseMarshalData(IStream *stream) } static HRESULT std_unmarshal_interface(MSHCTX dest_context, void *dest_context_data, - IStream *stream, REFIID riid, void **ppv) + IStream *stream, REFIID riid, void **ppv, BOOL dest_context_known) { struct stub_manager *stubmgr = NULL; struct OR_STANDARD obj; @@ -757,6 +757,8 @@ static HRESULT std_unmarshal_interface(MSHCTX dest_context, void *dest_context_d { if (!stub_manager_notify_unmarshal(stubmgr, &obj.std.ipid)) hres = CO_E_OBJNOTCONNECTED; + if (SUCCEEDED(hres) && !dest_context_known) + hres = ipid_get_dest_context(&obj.std.ipid, &dest_context, &dest_context_data); } else { @@ -803,7 +805,7 @@ HRESULT WINAPI CoUnmarshalInterface(IStream *stream, REFIID riid, void **ppv) hr = get_unmarshaler_from_stream(stream, &marshal, &iid); if (hr == S_FALSE) { - hr = std_unmarshal_interface(0, NULL, stream, &iid, (void **)&object); + hr = std_unmarshal_interface(0, NULL, stream, &iid, (void **)&object, FALSE); if (hr != S_OK) ERR("StdMarshal UnmarshalInterface failed, hr %#lx\n", hr); } @@ -2183,7 +2185,7 @@ static HRESULT WINAPI StdMarshalImpl_UnmarshalInterface(IMarshal *iface, IStream return E_NOTIMPL; } - return std_unmarshal_interface(marshal->dest_context, marshal->dest_context_data, stream, riid, ppv); + return std_unmarshal_interface(marshal->dest_context, marshal->dest_context_data, stream, riid, ppv, TRUE); } static HRESULT WINAPI StdMarshalImpl_ReleaseMarshalData(IMarshal *iface, IStream *stream) diff --git a/dlls/combase/stubmanager.c b/dlls/combase/stubmanager.c index ff8937d7bd7..1b079f22fef 100644 --- a/dlls/combase/stubmanager.c +++ b/dlls/combase/stubmanager.c @@ -554,6 +554,31 @@ HRESULT ipid_get_dispatch_params(const IPID *ipid, struct apartment **stub_apt, return S_OK; } +HRESULT ipid_get_dest_context(const IPID *ipid, MSHCTX *dest_context, void **dest_context_data) +{ + struct stub_manager *stubmgr; + struct ifstub *ifstub; + struct apartment *apt; + void *data; + HRESULT hr; + DWORD ctx; + + hr = ipid_to_ifstub(ipid, &apt, &stubmgr, &ifstub); + if (hr != S_OK) return RPC_E_DISCONNECTED; + + hr = IRpcChannelBuffer_GetDestCtx(ifstub->chan, &ctx, &data); + if (SUCCEEDED(hr)) + { + *dest_context = ctx; + *dest_context_data = data; + } + + stub_manager_int_release(stubmgr); + apartment_release(apt); + + return hr; +} + /* returns TRUE if it is possible to unmarshal, FALSE otherwise. */ BOOL stub_manager_notify_unmarshal(struct stub_manager *m, const IPID *ipid) { diff --git a/dlls/ole32/tests/marshal.c b/dlls/ole32/tests/marshal.c index f76505ea1bf..cbad8c46117 100644 --- a/dlls/ole32/tests/marshal.c +++ b/dlls/ole32/tests/marshal.c @@ -589,7 +589,7 @@ static HRESULT WINAPI RpcProxyBuffer_Connect(IRpcProxyBuffer *iface, IRpcChannel hr = IRpcChannelBuffer_GetDestCtx(pRpcChannelBuffer, &dest_context, &dest_context_data); ok(hr == S_OK, "GetDestCtx failed: %08lx\n", hr); - todo_wine ok(dest_context == MSHCTX_INPROC, "desc_context = %lx\n", dest_context); + ok(dest_context == MSHCTX_INPROC, "desc_context = %lx\n", dest_context); ok(!dest_context_data, "desc_context_data = %p\n", dest_context_data); return IRpcProxyBuffer_Connect(This->buffer, pRpcChannelBuffer);
1
0
0
0
Connor McAdams : ole32/tests: Extend test_marshal_channel_buffer() test to include IRpcProxyBufferWrapper checks.
by Alexandre Julliard
13 Jul '23
13 Jul '23
Module: wine Branch: master Commit: b87c502a4ffbfb3065978e2b852eb2d4e072d347 URL:
https://gitlab.winehq.org/wine/wine/-/commit/b87c502a4ffbfb3065978e2b852eb2…
Author: Connor McAdams <cmcadams(a)codeweavers.com> Date: Wed Jun 28 15:22:18 2023 -0400 ole32/tests: Extend test_marshal_channel_buffer() test to include IRpcProxyBufferWrapper checks. Signed-off-by: Connor McAdams <cmcadams(a)codeweavers.com> --- dlls/ole32/tests/marshal.c | 102 ++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 97 insertions(+), 5 deletions(-) diff --git a/dlls/ole32/tests/marshal.c b/dlls/ole32/tests/marshal.c index 1344cf1d163..f76505ea1bf 100644 --- a/dlls/ole32/tests/marshal.c +++ b/dlls/ole32/tests/marshal.c @@ -351,10 +351,12 @@ static const IClassFactoryVtbl TestClassFactory_Vtbl = static IClassFactory Test_ClassFactory = { &TestClassFactory_Vtbl }; DEFINE_EXPECT(Invoke); +DEFINE_EXPECT(Connect); DEFINE_EXPECT(CreateStub); DEFINE_EXPECT(CreateProxy); DEFINE_EXPECT(GetWindow); -DEFINE_EXPECT(Disconnect); +DEFINE_EXPECT(RpcStubBuffer_Disconnect); +DEFINE_EXPECT(RpcProxyBuffer_Disconnect); static HRESULT WINAPI OleWindow_QueryInterface(IOleWindow *iface, REFIID riid, void **ppv) { @@ -476,7 +478,7 @@ static HRESULT WINAPI RpcStubBuffer_Connect(IRpcStubBuffer *iface, IUnknown *pUn static void WINAPI RpcStubBuffer_Disconnect(IRpcStubBuffer *iface) { - CHECK_EXPECT(Disconnect); + CHECK_EXPECT(RpcStubBuffer_Disconnect); } static HRESULT WINAPI RpcStubBuffer_Invoke(IRpcStubBuffer *iface, RPCOLEMESSAGE *_prpcmsg, @@ -533,6 +535,79 @@ static const IRpcStubBufferVtbl RpcStubBufferVtbl = { RpcStubBuffer_DebugServerRelease }; +typedef struct { + IRpcProxyBuffer IRpcProxyBuffer_iface; + LONG ref; + IRpcProxyBuffer *buffer; +} ProxyBufferWrapper; + +static ProxyBufferWrapper *impl_from_IRpcProxyBuffer(IRpcProxyBuffer *iface) +{ + return CONTAINING_RECORD(iface, ProxyBufferWrapper, IRpcProxyBuffer_iface); +} + +static HRESULT WINAPI RpcProxyBuffer_QueryInterface(IRpcProxyBuffer *iface, REFIID riid, void **ppv) +{ + ProxyBufferWrapper *This = impl_from_IRpcProxyBuffer(iface); + + if(IsEqualGUID(&IID_IUnknown, riid) || IsEqualGUID(&IID_IRpcProxyBuffer, riid)) { + *ppv = &This->IRpcProxyBuffer_iface; + }else { + *ppv = NULL; + return E_NOINTERFACE; + } + + IUnknown_AddRef((IUnknown*)*ppv); + return S_OK; +} + +static ULONG WINAPI RpcProxyBuffer_AddRef(IRpcProxyBuffer *iface) +{ + ProxyBufferWrapper *This = impl_from_IRpcProxyBuffer(iface); + return InterlockedIncrement(&This->ref); +} + +static ULONG WINAPI RpcProxyBuffer_Release(IRpcProxyBuffer *iface) +{ + ProxyBufferWrapper *This = impl_from_IRpcProxyBuffer(iface); + LONG ref = InterlockedDecrement(&This->ref); + if(!ref) { + IRpcProxyBuffer_Release(This->buffer); + heap_free(This); + } + return ref; +} + +static HRESULT WINAPI RpcProxyBuffer_Connect(IRpcProxyBuffer *iface, IRpcChannelBuffer *pRpcChannelBuffer) +{ + ProxyBufferWrapper *This = impl_from_IRpcProxyBuffer(iface); + void *dest_context_data; + DWORD dest_context; + HRESULT hr; + + CHECK_EXPECT(Connect); + + hr = IRpcChannelBuffer_GetDestCtx(pRpcChannelBuffer, &dest_context, &dest_context_data); + ok(hr == S_OK, "GetDestCtx failed: %08lx\n", hr); + todo_wine ok(dest_context == MSHCTX_INPROC, "desc_context = %lx\n", dest_context); + ok(!dest_context_data, "desc_context_data = %p\n", dest_context_data); + + return IRpcProxyBuffer_Connect(This->buffer, pRpcChannelBuffer); +} + +static void WINAPI RpcProxyBuffer_Disconnect(IRpcProxyBuffer *iface) +{ + CHECK_EXPECT(RpcProxyBuffer_Disconnect); +} + +static const IRpcProxyBufferVtbl RpcProxyBufferVtbl = { + RpcProxyBuffer_QueryInterface, + RpcProxyBuffer_AddRef, + RpcProxyBuffer_Release, + RpcProxyBuffer_Connect, + RpcProxyBuffer_Disconnect, +}; + static IPSFactoryBuffer *ps_factory_buffer; static HRESULT WINAPI PSFactoryBuffer_QueryInterface(IPSFactoryBuffer *iface, REFIID riid, void **ppv) @@ -561,8 +636,20 @@ static ULONG WINAPI PSFactoryBuffer_Release(IPSFactoryBuffer *iface) static HRESULT WINAPI PSFactoryBuffer_CreateProxy(IPSFactoryBuffer *iface, IUnknown *outer, REFIID riid, IRpcProxyBuffer **ppProxy, void **ppv) { + ProxyBufferWrapper *proxy; + HRESULT hr; + CHECK_EXPECT(CreateProxy); - return IPSFactoryBuffer_CreateProxy(ps_factory_buffer, outer, riid, ppProxy, ppv); + proxy = heap_alloc(sizeof(*proxy)); + proxy->IRpcProxyBuffer_iface.lpVtbl = &RpcProxyBufferVtbl; + proxy->ref = 1; + + hr = IPSFactoryBuffer_CreateProxy(ps_factory_buffer, outer, riid, &proxy->buffer, ppv); + ok(hr == S_OK, "CreateProxy failed: %08lx\n", hr); + + *ppProxy = &proxy->IRpcProxyBuffer_iface; + + return S_OK; } static HRESULT WINAPI PSFactoryBuffer_CreateStub(IPSFactoryBuffer *iface, REFIID riid, @@ -1327,10 +1414,12 @@ static void test_marshal_channel_buffer(void) SET_EXPECT(CreateStub); SET_EXPECT(CreateProxy); + SET_EXPECT(Connect); hr = IUnknown_QueryInterface(proxy, &IID_IOleWindow, (void**)&ole_window); ok(hr == S_OK, "Could not get IOleWindow iface: %08lx\n", hr); CHECK_CALLED(CreateStub); CHECK_CALLED(CreateProxy); + CHECK_CALLED(Connect); SET_EXPECT(Invoke); SET_EXPECT(GetWindow); @@ -1342,10 +1431,13 @@ static void test_marshal_channel_buffer(void) IOleWindow_Release(ole_window); - SET_EXPECT(Disconnect); + SET_EXPECT(RpcStubBuffer_Disconnect); + SET_EXPECT(RpcProxyBuffer_Disconnect); IUnknown_Release(proxy); todo_wine - CHECK_CALLED(Disconnect); + CHECK_CALLED(RpcStubBuffer_Disconnect); + todo_wine + CHECK_CALLED(RpcProxyBuffer_Disconnect); hr = CoRevokeClassObject(registration_key); ok(hr == S_OK, "CoRevokeClassObject failed: %08lx\n", hr);
1
0
0
0
Eric Pouech : conhost: Fix ctrl-c handling.
by Alexandre Julliard
13 Jul '23
13 Jul '23
Module: wine Branch: master Commit: 10aaff9245509b751553e7c17ec396de279fc746 URL:
https://gitlab.winehq.org/wine/wine/-/commit/10aaff9245509b751553e7c17ec396…
Author: Eric Pouech <epouech(a)codeweavers.com> Date: Wed Jul 12 10:41:00 2023 +0200 conhost: Fix ctrl-c handling. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=55197
Signed-off-by: Eric Pouech <epouech(a)codeweavers.com> --- programs/conhost/conhost.c | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/programs/conhost/conhost.c b/programs/conhost/conhost.c index 21fc8838502..eb3c574789f 100644 --- a/programs/conhost/conhost.c +++ b/programs/conhost/conhost.c @@ -1502,22 +1502,16 @@ NTSTATUS write_console_input( struct console *console, const INPUT_RECORD *recor console->records = new_rec; console->record_size = console->record_size * 2 + count; } - memcpy( console->records + console->record_count, records, count * sizeof(INPUT_RECORD) ); if (console->mode & ENABLE_PROCESSED_INPUT) { - unsigned int i = 0; - while (i < count) + unsigned int i; + for (i = 0; i < count; i++) { unsigned int event; - if (map_to_ctrlevent(console, &records[i], &event)) + if (map_to_ctrlevent( console, &records[i], &event )) { - if (i != count - 1) - memcpy( &console->records[console->record_count + i], - &console->records[console->record_count + i + 1], - (count - i - 1) * sizeof(INPUT_RECORD) ); - count--; if (records[i].Event.KeyEvent.bKeyDown) { struct condrv_ctrl_event ctrl_event; @@ -1527,13 +1521,17 @@ NTSTATUS write_console_input( struct console *console, const INPUT_RECORD *recor ctrl_event.group_id = 0; NtDeviceIoControlFile( console->server, NULL, NULL, NULL, &io, IOCTL_CONDRV_CTRL_EVENT, &ctrl_event, sizeof(ctrl_event), NULL, 0 ); - } } - else i++; + else + console->records[console->record_count++] = records[i]; } } - console->record_count += count; + else + { + memcpy( console->records + console->record_count, records, count * sizeof(INPUT_RECORD) ); + console->record_count += count; + } return flush ? process_console_input( console ) : STATUS_SUCCESS; } @@ -1768,6 +1766,11 @@ static DWORD WINAPI tty_input( void *param ) switch (ch) { case 3: /* end of text */ + if (console->is_unix && (console->mode & ENABLE_PROCESSED_INPUT)) + { + key_press( console, ch, 'C', LEFT_CTRL_PRESSED ); + break; + } LeaveCriticalSection( &console_section ); goto done; case '\n':
1
0
0
0
Zebediah Figura : vkd3d-shader/hlsl: Skip unallocated variables when looking for reservation conflicts.
by Alexandre Julliard
13 Jul '23
13 Jul '23
Module: vkd3d Branch: master Commit: d4b5e79c8b676024c5aee3f8dadbc8eea4c9d9ec URL:
https://gitlab.winehq.org/wine/vkd3d/-/commit/d4b5e79c8b676024c5aee3f8dadbc…
Author: Zebediah Figura <zfigura(a)codeweavers.com> Date: Tue Jun 27 13:14:37 2023 -0500 vkd3d-shader/hlsl: Skip unallocated variables when looking for reservation conflicts. --- libs/vkd3d-shader/hlsl_codegen.c | 13 ++++++++++--- tests/hlsl/register-reservations.shader_test | 4 ++-- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/libs/vkd3d-shader/hlsl_codegen.c b/libs/vkd3d-shader/hlsl_codegen.c index 8927e291..755bc8fa 100644 --- a/libs/vkd3d-shader/hlsl_codegen.c +++ b/libs/vkd3d-shader/hlsl_codegen.c @@ -3689,7 +3689,7 @@ static void allocate_buffers(struct hlsl_ctx *ctx) } static const struct hlsl_ir_var *get_allocated_object(struct hlsl_ctx *ctx, enum hlsl_regset regset, - uint32_t index) + uint32_t index, bool allocated_only) { const struct hlsl_ir_var *var; unsigned int start, count; @@ -3703,6 +3703,9 @@ static const struct hlsl_ir_var *get_allocated_object(struct hlsl_ctx *ctx, enum * bound there even if the reserved vars aren't used. */ start = var->reg_reservation.reg_index; count = var->data_type->reg_size[regset]; + + if (!var->regs[regset].allocated && allocated_only) + continue; } else if (var->regs[regset].allocated) { @@ -3743,6 +3746,7 @@ static void allocate_objects(struct hlsl_ctx *ctx, enum hlsl_regset regset) if (count == 0) continue; + /* The variable was already allocated if it has a reservation. */ if (var->regs[regset].allocated) { const struct hlsl_ir_var *reserved_object, *last_reported = NULL; @@ -3761,7 +3765,10 @@ static void allocate_objects(struct hlsl_ctx *ctx, enum hlsl_regset regset) { index = var->regs[regset].id + i; - reserved_object = get_allocated_object(ctx, regset, index); + /* get_allocated_object() may return "var" itself, but we + * actually want that, otherwise we'll end up reporting the + * same conflict between the same two variables twice. */ + reserved_object = get_allocated_object(ctx, regset, index, true); if (reserved_object && reserved_object != var && reserved_object != last_reported) { hlsl_error(ctx, &var->loc, VKD3D_SHADER_ERROR_HLSL_OVERLAPPING_RESERVATIONS, @@ -3780,7 +3787,7 @@ static void allocate_objects(struct hlsl_ctx *ctx, enum hlsl_regset regset) while (available < count) { - if (get_allocated_object(ctx, regset, index)) + if (get_allocated_object(ctx, regset, index, false)) available = 0; else ++available; diff --git a/tests/hlsl/register-reservations.shader_test b/tests/hlsl/register-reservations.shader_test index d885b209..7e109eca 100644 --- a/tests/hlsl/register-reservations.shader_test +++ b/tests/hlsl/register-reservations.shader_test @@ -144,7 +144,7 @@ draw quad probe all rgba (2.0, 2.0, 2.0, 99.0) -[pixel shader todo] +[pixel shader] Texture2D tex1 : register(t2); Texture2D tex2 : register(t2); @@ -154,5 +154,5 @@ float4 main() : sv_target } [test] -todo draw quad +draw quad probe all rgba (2.0, 2.0, 2.0, 99.0)
1
0
0
0
Maxim Karasev : include: Add missing Kerberos related defines.
by Alexandre Julliard
12 Jul '23
12 Jul '23
Module: wine Branch: master Commit: cb33d402bb7fc44a51cd96adfbe740d4b2d7a134 URL:
https://gitlab.winehq.org/wine/wine/-/commit/cb33d402bb7fc44a51cd96adfbe740…
Author: Maxim Karasev <mxkrsv(a)etersoft.ru> Date: Fri Jul 7 18:52:14 2023 +0300 include: Add missing Kerberos related defines. --- include/ntsecapi.h | 83 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) diff --git a/include/ntsecapi.h b/include/ntsecapi.h index ffaa8028596..2b78156bdfb 100644 --- a/include/ntsecapi.h +++ b/include/ntsecapi.h @@ -427,6 +427,40 @@ typedef struct _KERB_TICKET_CACHE_INFO ULONG TicketFlags; } KERB_TICKET_CACHE_INFO, *PKERB_TICKET_CACHE_INFO; +typedef struct _KERB_CRYPTO_KEY +{ + LONG KeyType; + ULONG Length; + PUCHAR Value; +} KERB_CRYPTO_KEY, *PKERB_CRYPTO_KEY; + +typedef struct _KERB_EXTERNAL_NAME +{ + SHORT NameType; + USHORT NameCount; + UNICODE_STRING Names[ANYSIZE_ARRAY]; +} KERB_EXTERNAL_NAME, *PKERB_EXTERNAL_NAME; + +typedef struct _KERB_EXTERNAL_TICKET +{ + PKERB_EXTERNAL_NAME ServiceName; + PKERB_EXTERNAL_NAME TargetName; + PKERB_EXTERNAL_NAME ClientName; + UNICODE_STRING DomainName; + UNICODE_STRING TargetDomainName; + UNICODE_STRING AltTargetDomainName; + KERB_CRYPTO_KEY SessionKey; + ULONG TicketFlags; + ULONG Flags; + LARGE_INTEGER KeyExpirationTime; + LARGE_INTEGER StartTime; + LARGE_INTEGER EndTime; + LARGE_INTEGER RenewUntil; + LARGE_INTEGER TimeSkew; + ULONG EncodedTicketSize; + PUCHAR EncodedTicket; +} KERB_EXTERNAL_TICKET, *PKERB_EXTERNAL_TICKET; + typedef struct _KERB_QUERY_TKT_CACHE_REQUEST { KERB_PROTOCOL_MESSAGE_TYPE MessageType; @@ -451,6 +485,11 @@ typedef struct _KERB_RETRIEVE_TKT_REQUEST SecHandle CredentialsHandle; } KERB_RETRIEVE_TKT_REQUEST, *PKERB_RETRIEVE_TKT_REQUEST; +typedef struct _KERB_RETRIEVE_TKT_RESPONSE +{ + KERB_EXTERNAL_TICKET Ticket; +} KERB_RETRIEVE_TKT_RESPONSE,*PKERB_RETRIEVE_TKT_RESPONSE; + typedef struct _KERB_PURGE_TKT_CACHE_REQUEST { KERB_PROTOCOL_MESSAGE_TYPE MessageType; @@ -459,6 +498,50 @@ typedef struct _KERB_PURGE_TKT_CACHE_REQUEST UNICODE_STRING RealmName; } KERB_PURGE_TKT_CACHE_REQUEST, *PKERB_PURGE_TKT_CACHE_REQUEST; +#define KERB_ETYPE_NULL 0 +#define KERB_ETYPE_DES_CBC_CRC 1 +#define KERB_ETYPE_DES_CBC_MD4 2 +#define KERB_ETYPE_DES_CBC_MD5 3 +#define KERB_ETYPE_AES128_CTS_HMAC_SHA1_96 17 +#define KERB_ETYPE_AES256_CTS_HMAC_SHA1_96 18 + +#define KERB_ETYPE_RC4_MD4 -128 +#define KERB_ETYPE_RC4_PLAIN2 -129 +#define KERB_ETYPE_RC4_LM -130 +#define KERB_ETYPE_RC4_SHA -131 +#define KERB_ETYPE_DES_PLAIN -132 +#define KERB_ETYPE_RC4_HMAC_OLD -133 +#define KERB_ETYPE_RC4_PLAIN_OLD -134 +#define KERB_ETYPE_RC4_HMAC_OLD_EXP -135 +#define KERB_ETYPE_RC4_PLAIN_OLD_EXP -136 +#define KERB_ETYPE_RC4_PLAIN -140 +#define KERB_ETYPE_RC4_PLAIN_EXP -141 +#define KERB_ETYPE_AES128_CTS_HMAC_SHA1_96_PLAIN -148 +#define KERB_ETYPE_AES256_CTS_HMAC_SHA1_96_PLAIN -149 + +#define KERB_ETYPE_DSA_SHA1_CMS 9 +#define KERB_ETYPE_RSA_MD5_CMS 10 +#define KERB_ETYPE_RSA_SHA1_CMS 11 +#define KERB_ETYPE_RC2_CBC_ENV 12 +#define KERB_ETYPE_RSA_ENV 13 +#define KERB_ETYPE_RSA_ES_OEAP_ENV 14 +#define KERB_ETYPE_DES_EDE3_CBC_ENV 15 + +#define KERB_ETYPE_DSA_SIGN 8 +#define KERB_ETYPE_RSA_PRIV 9 +#define KERB_ETYPE_RSA_PUB 10 +#define KERB_ETYPE_RSA_PUB_MD5 11 +#define KERB_ETYPE_RSA_PUB_SHA1 12 +#define KERB_ETYPE_PKCS7_PUB 13 + +#define KERB_ETYPE_DES3_CBC_MD5 5 +#define KERB_ETYPE_DES3_CBC_SHA1 7 +#define KERB_ETYPE_DES3_CBC_SHA1_KD 16 + +#define KERB_ETYPE_DES_CBC_MD5_NT 20 +#define KERB_ETYPE_RC4_HMAC_NT 23 +#define KERB_ETYPE_RC4_HMAC_NT_EXP 24 + #define RtlGenRandom SystemFunction036 #define RtlEncryptMemory SystemFunction040 #define RtlDecryptMemory SystemFunction041
1
0
0
0
Maxim Karasev : include: Update _SECURITY_INTEGER.
by Alexandre Julliard
12 Jul '23
12 Jul '23
Module: wine Branch: master Commit: cecd03130894af60bd00c5de63d91e26b9813df8 URL:
https://gitlab.winehq.org/wine/wine/-/commit/cecd03130894af60bd00c5de63d91e…
Author: Maxim Karasev <mxkrsv(a)etersoft.ru> Date: Fri Jul 7 18:51:40 2023 +0300 include: Update _SECURITY_INTEGER. In Windows it works that way. --- include/sspi.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/sspi.h b/include/sspi.h index e2da48cd720..6d7ea5a5ef2 100644 --- a/include/sspi.h +++ b/include/sspi.h @@ -69,11 +69,16 @@ typedef SecHandle CtxtHandle; typedef PSecHandle PCtxtHandle; #endif +#if defined(_NTDEF_) || defined(_WINNT_) +typedef LARGE_INTEGER _SECURITY_INTEGER, SECURITY_INTEGER,*PSECURITY_INTEGER; +#else typedef struct _SECURITY_INTEGER { ULONG LowPart; LONG HighPart; } SECURITY_INTEGER, *PSECURITY_INTEGER; +#endif + typedef SECURITY_INTEGER TimeStamp, *PTimeStamp; #ifndef __UNICODE_STRING_DEFINED__
1
0
0
0
Maxim Karasev : include: Add UNICODE_NULL.
by Alexandre Julliard
12 Jul '23
12 Jul '23
Module: wine Branch: master Commit: 062cf6e2f1b943393e9b215010d0e3597ce5f4d8 URL:
https://gitlab.winehq.org/wine/wine/-/commit/062cf6e2f1b943393e9b215010d0e3…
Author: Maxim Karasev <mxkrsv(a)etersoft.ru> Date: Fri Jul 7 18:49:42 2023 +0300 include: Add UNICODE_NULL. --- include/winnt.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/winnt.h b/include/winnt.h index f431753e46a..ab14bcc80d5 100644 --- a/include/winnt.h +++ b/include/winnt.h @@ -871,6 +871,8 @@ typedef struct DECLSPEC_ALIGN(8) MEM_EXTENDED_PARAMETER { #define MAXDWORD 0xffffffff #define MAXLONGLONG (((LONGLONG)0x7fffffff << 32) | 0xffffffff) +#define UNICODE_NULL ((WCHAR)0) + #define UNICODE_STRING_MAX_CHARS 32767 #define FIELD_OFFSET(type, field) ((LONG)offsetof(type, field))
1
0
0
0
Victor Chiletto : msvcrt: Use GetLocaleInfoEx to compare locale info.
by Alexandre Julliard
12 Jul '23
12 Jul '23
Module: wine Branch: master Commit: 8f663f3d5eb0ec6eb7dbb6816294df287c640487 URL:
https://gitlab.winehq.org/wine/wine/-/commit/8f663f3d5eb0ec6eb7dbb6816294df…
Author: Victor Chiletto <vchiletto(a)codeweavers.com> Date: Tue Jun 6 20:12:08 2023 -0300 msvcrt: Use GetLocaleInfoEx to compare locale info. GetLocaleInfoA doesn't return the proper sname for neutral LCIDs. --- dlls/msvcrt/locale.c | 73 ++++++++++++++++++++++++++-------------------------- 1 file changed, 36 insertions(+), 37 deletions(-) diff --git a/dlls/msvcrt/locale.c b/dlls/msvcrt/locale.c index 7e759ddc6c6..9fa6ba76143 100644 --- a/dlls/msvcrt/locale.c +++ b/dlls/msvcrt/locale.c @@ -241,11 +241,11 @@ static BOOL remap_synonym(char *name) #define FOUND_COUNTRY 0x1 typedef struct { - char search_language[MAX_ELEM_LEN]; - char search_country[MAX_ELEM_LEN]; + WCHAR search_language[MAX_ELEM_LEN]; + WCHAR search_country[MAX_ELEM_LEN]; + WCHAR found_lang_sname[LOCALE_NAME_MAX_LENGTH]; DWORD found_codepage; unsigned int match_flags; - LANGID found_lang_id; BOOL allow_sname; } locale_search_t; @@ -253,50 +253,48 @@ typedef struct { #define STOP_LOOKING FALSE /* INTERNAL: Get and compare locale info with a given string */ -static int compare_info(LCID lcid, DWORD flags, char* buff, const char* cmp, BOOL exact) +static int compare_info(WCHAR *name, DWORD flags, WCHAR *buff, const WCHAR *cmp, BOOL exact) { int len; if(!cmp[0]) - return 0; + return 0; buff[0] = 0; - GetLocaleInfoA(lcid, flags|LOCALE_NOUSEROVERRIDE, buff, MAX_ELEM_LEN); + GetLocaleInfoEx(name, flags|LOCALE_NOUSEROVERRIDE, buff, MAX_ELEM_LEN); if (!buff[0]) return 0; /* Partial matches are only allowed on language/country names */ - len = strlen(cmp); + len = wcslen(cmp); + if(exact || len<=3) - return !_stricmp(cmp, buff); + return !_wcsicmp(cmp, buff); else - return !_strnicmp(cmp, buff, len); + return !_wcsnicmp(cmp, buff, len); } static BOOL CALLBACK find_best_locale_proc( WCHAR *name, DWORD locale_flags, LPARAM lParam ) { locale_search_t *res = (locale_search_t *)lParam; - const LCID lcid = LocaleNameToLCID( name, LCID_CONVERSION_FLAGS ); - char buff[MAX_ELEM_LEN]; + WCHAR buff[MAX_ELEM_LEN]; unsigned int flags = 0; - if (lcid == LOCALE_CUSTOM_UNSPECIFIED) return CONTINUE_LOOKING; - - if (res->allow_sname && compare_info(lcid,LOCALE_SNAME,buff,res->search_language, TRUE)) + if (res->allow_sname && compare_info(name,LOCALE_SNAME,buff,res->search_language, TRUE)) { - TRACE(":Found locale: %s->%s\n", res->search_language, buff); + TRACE(":Found locale: %s->%s\n", wine_dbgstr_w(res->search_language), wine_dbgstr_w(buff)); res->match_flags = FOUND_SNAME; - res->found_lang_id = LANGIDFROMLCID(lcid); + wcscpy(res->found_lang_sname, name); return STOP_LOOKING; } /* Check Language */ - if (compare_info(lcid,LOCALE_SISO639LANGNAME,buff,res->search_language, TRUE) || - compare_info(lcid,LOCALE_SABBREVLANGNAME,buff,res->search_language, TRUE) || - compare_info(lcid,LOCALE_SENGLANGUAGE,buff,res->search_language, FALSE)) + if (compare_info(name,LOCALE_SISO639LANGNAME,buff,res->search_language, TRUE) || + compare_info(name,LOCALE_SABBREVLANGNAME,buff,res->search_language, TRUE) || + compare_info(name,LOCALE_SENGLANGUAGE,buff,res->search_language, FALSE)) { - TRACE(":Found language: %s->%s\n", res->search_language, buff); + TRACE(":Found language: %s->%s\n", wine_dbgstr_w(res->search_language), wine_dbgstr_w(buff)); flags |= FOUND_LANGUAGE; } else if (res->match_flags & FOUND_LANGUAGE) @@ -305,11 +303,11 @@ find_best_locale_proc( WCHAR *name, DWORD locale_flags, LPARAM lParam ) } /* Check Country */ - if (compare_info(lcid,LOCALE_SISO3166CTRYNAME,buff,res->search_country, TRUE) || - compare_info(lcid,LOCALE_SABBREVCTRYNAME,buff,res->search_country, TRUE) || - compare_info(lcid,LOCALE_SENGCOUNTRY,buff,res->search_country, FALSE)) + if (compare_info(name,LOCALE_SISO3166CTRYNAME,buff,res->search_country, TRUE) || + compare_info(name,LOCALE_SABBREVCTRYNAME,buff,res->search_country, TRUE) || + compare_info(name,LOCALE_SENGCOUNTRY,buff,res->search_country, FALSE)) { - TRACE("Found country:%s->%s\n", res->search_country, buff); + TRACE("Found country:%s->%s\n", wine_dbgstr_w(res->search_country), wine_dbgstr_w(buff)); flags |= FOUND_COUNTRY; } else if (!flags && (res->match_flags & FOUND_COUNTRY)) @@ -321,7 +319,7 @@ find_best_locale_proc( WCHAR *name, DWORD locale_flags, LPARAM lParam ) { /* Found a better match than previously */ res->match_flags = flags; - res->found_lang_id = LANGIDFROMLCID(lcid); + wcscpy(res->found_lang_sname, name); } if ((flags & (FOUND_LANGUAGE | FOUND_COUNTRY)) == (FOUND_LANGUAGE | FOUND_COUNTRY)) @@ -354,27 +352,27 @@ BOOL locale_to_sname(const char *locale, unsigned short *codepage, BOOL *sname_m if(!locale[0] || (cp == locale && !region)) { GetUserDefaultLocaleName(sname, sname_size); } else { - WCHAR wbuf[LOCALE_NAME_MAX_LENGTH]; + char search_language_buf[MAX_ELEM_LEN] = { 0 }, search_country_buf[MAX_ELEM_LEN] = { 0 }; locale_search_t search; BOOL remapped = FALSE; memset(&search, 0, sizeof(locale_search_t)); - lstrcpynA(search.search_language, locale, MAX_ELEM_LEN); + lstrcpynA(search_language_buf, locale, MAX_ELEM_LEN); if(region) { - lstrcpynA(search.search_country, region+1, MAX_ELEM_LEN); + lstrcpynA(search_country_buf, region+1, MAX_ELEM_LEN); if(region-locale < MAX_ELEM_LEN) - search.search_language[region-locale] = '\0'; + search_language_buf[region-locale] = '\0'; } else - search.search_country[0] = '\0'; + search_country_buf[0] = '\0'; if(cp) { if(region && cp-region-1<MAX_ELEM_LEN) - search.search_country[cp-region-1] = '\0'; + search_country_buf[cp-region-1] = '\0'; if(cp-locale < MAX_ELEM_LEN) - search.search_language[cp-locale] = '\0'; + search_language_buf[cp-locale] = '\0'; } - if ((remapped = remap_synonym(search.search_language))) + if ((remapped = remap_synonym(search_language_buf))) { search.allow_sname = TRUE; } @@ -386,14 +384,15 @@ BOOL locale_to_sname(const char *locale, unsigned short *codepage, BOOL *sname_m } #endif - MultiByteToWideChar(CP_ACP, 0, search.search_language, -1, wbuf, LOCALE_NAME_MAX_LENGTH); - if (search.allow_sname && IsValidLocaleName(wbuf)) + MultiByteToWideChar(CP_ACP, 0, search_language_buf, -1, search.search_language, MAX_ELEM_LEN); + if (search.allow_sname && IsValidLocaleName(search.search_language)) { search.match_flags = FOUND_SNAME; - wcsncpy(sname, wbuf, sname_size); + wcsncpy(sname, search.search_language, sname_size); } else { + MultiByteToWideChar(CP_ACP, 0, search_country_buf, -1, search.search_country, MAX_ELEM_LEN); EnumSystemLocalesEx( find_best_locale_proc, 0, (LPARAM)&search, NULL); if (!search.match_flags) @@ -405,7 +404,7 @@ BOOL locale_to_sname(const char *locale, unsigned short *codepage, BOOL *sname_m if (search.search_country[0] && !(search.match_flags & FOUND_COUNTRY)) return FALSE; - LCIDToLocaleName(search.found_lang_id, sname, sname_size, LOCALE_ALLOW_NEUTRAL_NAMES); + wcsncpy(sname, search.found_lang_sname, sname_size); } is_sname = !remapped && (search.match_flags & FOUND_SNAME) != 0;
1
0
0
0
Victor Chiletto : msvcrt: Remap synonyms to snames.
by Alexandre Julliard
12 Jul '23
12 Jul '23
Module: wine Branch: master Commit: ec7816a42a010443110abef2bf203707623535ec URL:
https://gitlab.winehq.org/wine/wine/-/commit/ec7816a42a010443110abef2bf2037…
Author: Victor Chiletto <vchiletto(a)codeweavers.com> Date: Thu Jun 8 21:43:14 2023 -0300 msvcrt: Remap synonyms to snames. Gives us more control over what we map to which is required due to changes in Chinese locales. --- dlls/msvcrt/locale.c | 98 ++++++++++++++++++++++++++++++---------------------- 1 file changed, 57 insertions(+), 41 deletions(-) diff --git a/dlls/msvcrt/locale.c b/dlls/msvcrt/locale.c index 89118535494..7e759ddc6c6 100644 --- a/dlls/msvcrt/locale.c +++ b/dlls/msvcrt/locale.c @@ -172,43 +172,54 @@ static struct lconv cloc_lconv = /* Friendly country strings & language names abbreviations. */ static const char * const _country_synonyms[] = { - "american", "enu", - "american english", "enu", - "american-english", "enu", - "english-american", "enu", - "english-us", "enu", - "english-usa", "enu", - "us", "enu", - "usa", "enu", - "australian", "ena", - "english-aus", "ena", - "belgian", "nlb", - "french-belgian", "frb", - "canadian", "enc", - "english-can", "enc", - "french-canadian", "frc", - "chinese", "chs", - "chinese-simplified", "chs", - "chinese-traditional", "cht", - "dutch-belgian", "nlb", - "english-nz", "enz", - "uk", "eng", - "english-uk", "eng", - "french-swiss", "frs", - "swiss", "des", - "german-swiss", "des", - "italian-swiss", "its", - "german-austrian", "dea", - "portuguese", "ptb", - "portuguese-brazil", "ptb", - "spanish-mexican", "esm", - "norwegian-bokmal", "nor", - "norwegian-nynorsk", "non", - "spanish-modern", "esn" + "american", "en", + "american english", "en-US", + "american-english", "en-US", + "english-american", "en-US", + "english-us", "en-US", + "english-usa", "en-US", + "us", "en-US", + "usa", "en-US", + "australian", "en-AU", + "english-aus", "en-AU", + "belgian", "nl-BE", + "french-belgian", "fr-BE", + "canadian", "en-CA", + "english-can", "en-CA", + "french-canadian", "fr-CA", +#if _MSVCR_VER >= 110 + "chinese", "zh", + "chinese-simplified", "zh", + "chinese-traditional", "zh-HK", + "chs", "zh", + "cht", "zh-HK", +#else + "chinese", "zh-CN", + "chinese-simplified", "zh-CN", + "chinese-traditional", "zh-TW", + "chs", "zh-CN", + "cht", "zh-TW", +#endif + "dutch-belgian", "nl-BE", + "english-nz", "en-NZ", + "uk", "en-GB", + "english-uk", "en-GB", + "french-swiss", "fr-CH", + "swiss", "de-CH", + "german-swiss", "de-CH", + "italian-swiss", "it-CH", + "german-austrian", "de-AT", + "portuguese", "pt-BR", + "portuguese-brazil", "pt-BR", + "spanish-mexican", "es-MX", + "norwegian-bokmal", "nb", + "norwegian-nynorsk", "nn-NO", + "spanish-modern", "es-ES" }; + /* INTERNAL: Map a synonym to an ISO code */ -static void remap_synonym(char *name) +static BOOL remap_synonym(char *name) { unsigned int i; for (i = 0; i < ARRAY_SIZE(_country_synonyms); i += 2) @@ -217,9 +228,11 @@ static void remap_synonym(char *name) { TRACE(":Mapping synonym %s to %s\n",name,_country_synonyms[i+1]); strcpy(name, _country_synonyms[i+1]); - return; + return TRUE; } } + + return FALSE; } /* Note: Flags are weighted in order of matching importance */ @@ -270,7 +283,6 @@ find_best_locale_proc( WCHAR *name, DWORD locale_flags, LPARAM lParam ) if (lcid == LOCALE_CUSTOM_UNSPECIFIED) return CONTINUE_LOOKING; -#if _MSVCR_VER >= 110 if (res->allow_sname && compare_info(lcid,LOCALE_SNAME,buff,res->search_language, TRUE)) { TRACE(":Found locale: %s->%s\n", res->search_language, buff); @@ -278,7 +290,6 @@ find_best_locale_proc( WCHAR *name, DWORD locale_flags, LPARAM lParam ) res->found_lang_id = LANGIDFROMLCID(lcid); return STOP_LOOKING; } -#endif /* Check Language */ if (compare_info(lcid,LOCALE_SISO639LANGNAME,buff,res->search_language, TRUE) || @@ -345,6 +356,7 @@ BOOL locale_to_sname(const char *locale, unsigned short *codepage, BOOL *sname_m } else { WCHAR wbuf[LOCALE_NAME_MAX_LENGTH]; locale_search_t search; + BOOL remapped = FALSE; memset(&search, 0, sizeof(locale_search_t)); lstrcpynA(search.search_language, locale, MAX_ELEM_LEN); @@ -362,13 +374,17 @@ BOOL locale_to_sname(const char *locale, unsigned short *codepage, BOOL *sname_m search.search_language[cp-locale] = '\0'; } - if(!cp && !region) + if ((remapped = remap_synonym(search.search_language))) { - remap_synonym(search.search_language); + search.allow_sname = TRUE; + } + #if _MSVCR_VER >= 110 + if(!cp && !region) + { search.allow_sname = TRUE; -#endif } +#endif MultiByteToWideChar(CP_ACP, 0, search.search_language, -1, wbuf, LOCALE_NAME_MAX_LENGTH); if (search.allow_sname && IsValidLocaleName(wbuf)) @@ -392,7 +408,7 @@ BOOL locale_to_sname(const char *locale, unsigned short *codepage, BOOL *sname_m LCIDToLocaleName(search.found_lang_id, sname, sname_size, LOCALE_ALLOW_NEUTRAL_NAMES); } - is_sname = (search.match_flags & FOUND_SNAME) != 0; + is_sname = !remapped && (search.match_flags & FOUND_SNAME) != 0; } /* Obtain code page */
1
0
0
0
← Newer
1
...
47
48
49
50
51
52
53
...
87
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
Results per page:
10
25
50
100
200