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
January 2024
----- 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
711 discussions
Start a n
N
ew thread
Piotr Caban : msvcrt: Store _unDName function parameter backreferences in parsed_symbol structure.
by Alexandre Julliard
29 Jan '24
29 Jan '24
Module: wine Branch: master Commit: 779ba03bcda26895fab21d396442b302c004cd4c URL:
https://gitlab.winehq.org/wine/wine/-/commit/779ba03bcda26895fab21d396442b3…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Mon Jan 29 13:45:06 2024 +0100 msvcrt: Store _unDName function parameter backreferences in parsed_symbol structure. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=53934
--- dlls/msvcrt/tests/cpp.c | 6 ++++++ dlls/msvcrt/undname.c | 29 +++++++++++++++++++++-------- 2 files changed, 27 insertions(+), 8 deletions(-) diff --git a/dlls/msvcrt/tests/cpp.c b/dlls/msvcrt/tests/cpp.c index d230659404d..5716455424a 100644 --- a/dlls/msvcrt/tests/cpp.c +++ b/dlls/msvcrt/tests/cpp.c @@ -1324,6 +1324,12 @@ static void test_demangle(void) "void __cdecl <CrtImplementationDetails>::RegisterModuleUninitializer(class System::EventHandler ^)"}, /* 151 */ {"?RegisterModuleUninitializer@<CrtImplementationDetails>@@YAXBE$AAVEventHandler@System@@@Z", "void __cdecl <CrtImplementationDetails>::RegisterModuleUninitializer(class System::EventHandler % __ptr64 volatile)"}, +/* 152 */ {"??$forward@AEAUFFIValue@?1??call@FFIFunctionBinder@@CAHPEAUlua_State@@@Z@@std@@YAAEAUFFIValue@?1??call@" + "FFIFunctionBinder@@CAHPEAUxlua_State@@@Z@AEAU1?1??23@CAH0@Z@@Z", + "struct `private: static int __cdecl FFIFunctionBinder::call(struct xlua_State * __ptr64)'::`2'::FFIValue & " + "__ptr64 __cdecl std::forward<struct `private: static int __cdecl FFIFunctionBinder::call(struct lua_State " + "* __ptr64)'::`2'::FFIValue & __ptr64>(struct `private: static int __cdecl FFIFunctionBinder::call(struct " + "xlua_State * __ptr64)'::`2'::FFIValue & __ptr64)"}, }; int i, num_test = ARRAY_SIZE(test); char* name; diff --git a/dlls/msvcrt/undname.c b/dlls/msvcrt/undname.c index 91d4fdbc3eb..21a4924b6a4 100644 --- a/dlls/msvcrt/undname.c +++ b/dlls/msvcrt/undname.c @@ -70,6 +70,7 @@ struct parsed_symbol char* result; /* demangled string */ struct array names; /* array of names for back reference */ + struct array args; /* array of arguments for back reference */ struct array stack; /* stack of parsed strings */ void* alloc_list; /* linked list of allocated blocks */ @@ -362,12 +363,15 @@ static char* get_args(struct parsed_symbol* sym, struct array* pmt_ref, BOOL z_t char* args_str = NULL; char* last; unsigned int i; + const char *p; str_array_init(&arg_collect); /* Now come the function arguments */ while (*sym->current) { + p = sym->current; + /* Decode each data type and append it to the argument list */ if (*sym->current == '@') { @@ -382,14 +386,20 @@ static char* get_args(struct parsed_symbol* sym, struct array* pmt_ref, BOOL z_t &arg_collect)) return NULL; if (!strcmp(ct.left, "...")) break; + if (z_term && sym->current - p > 1 && sym->args.num < 20) + { + if (!str_array_push(sym, ct.left ? ct.left : "", -1, &sym->args) || + !str_array_push(sym, ct.right ? ct.right : "", -1, &sym->args)) + return NULL; + } } /* Functions are always terminated by 'Z'. If we made it this far and * don't find it, we have incorrectly identified a data type. */ if (z_term && *sym->current++ != 'Z') return NULL; - if (arg_collect.num == 0 || - (arg_collect.num == 1 && !strcmp(arg_collect.elts[0], "void"))) + if (arg_collect.num == 0 || + (arg_collect.num == 1 && !strcmp(arg_collect.elts[0], "void"))) return str_printf(sym, "%cvoid%c", open_char, close_char); for (i = 1; i < arg_collect.num; i++) { @@ -398,12 +408,12 @@ static char* get_args(struct parsed_symbol* sym, struct array* pmt_ref, BOOL z_t last = args_str ? args_str : arg_collect.elts[0]; if (close_char == '>' && last[strlen(last) - 1] == '>') - args_str = str_printf(sym, "%c%s%s %c", + args_str = str_printf(sym, "%c%s%s %c", open_char, arg_collect.elts[0], args_str, close_char); else - args_str = str_printf(sym, "%c%s%s%c", + args_str = str_printf(sym, "%c%s%s%c", open_char, arg_collect.elts[0], args_str, close_char); - + return args_str; } @@ -642,6 +652,7 @@ static char* get_template_name(struct parsed_symbol* sym) unsigned num_mark = sym->names.num; unsigned start_mark = sym->names.start; unsigned stack_mark = sym->stack.num; + unsigned args_mark = sym->args.num; struct array array_pmt; sym->names.start = sym->names.num; @@ -656,6 +667,7 @@ static char* get_template_name(struct parsed_symbol* sym) sym->names.num = num_mark; sym->names.start = start_mark; sym->stack.num = stack_mark; + sym->args.num = args_mark; return name; } @@ -1043,9 +1055,8 @@ static BOOL demangle_datatype(struct parsed_symbol* sym, struct datatype_t* ct, case '5': case '6': case '7': case '8': case '9': /* Referring back to previously parsed type */ /* left and right are pushed as two separate strings */ - if (!pmt_ref) goto done; - ct->left = str_array_get_ref(pmt_ref, (dt - '0') * 2); - ct->right = str_array_get_ref(pmt_ref, (dt - '0') * 2 + 1); + ct->left = str_array_get_ref(&sym->args, (dt - '0') * 2); + ct->right = str_array_get_ref(&sym->args, (dt - '0') * 2 + 1); if (!ct->left) goto done; add_pmt = FALSE; break; @@ -1636,12 +1647,14 @@ static BOOL symbol_demangle(struct parsed_symbol* sym) sym->current++; if (in_template) { + unsigned args_mark = sym->args.num; const char *args; struct array array_pmt; str_array_init(&array_pmt); args = get_args(sym, &array_pmt, FALSE, '<', '>'); if (args) function_name = function_name ? str_printf(sym, "%s%s", function_name, args) : args; + sym->args.num = args_mark; sym->names.num = 0; } if (!str_array_push(sym, function_name, -1, &sym->stack))
1
0
0
0
Rémi Bernon : explorer: Restore a per-desktop ShowSystray registry setting.
by Alexandre Julliard
29 Jan '24
29 Jan '24
Module: wine Branch: master Commit: 852c4d0a8a39da4df72358d6e30773a93bc8778d URL:
https://gitlab.winehq.org/wine/wine/-/commit/852c4d0a8a39da4df72358d6e30773…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Mon Jan 29 12:02:14 2024 +0100 explorer: Restore a per-desktop ShowSystray registry setting. With a global fallback setting under HKCU\Software\Wine\Explorer. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=56243
--- programs/explorer/desktop.c | 37 ++++++++++++++++++++++++++++++++---- programs/explorer/explorer_private.h | 2 +- programs/explorer/systray.c | 4 +++- 3 files changed, 37 insertions(+), 6 deletions(-) diff --git a/programs/explorer/desktop.c b/programs/explorer/desktop.c index 9a58f13d887..65a89862190 100644 --- a/programs/explorer/desktop.c +++ b/programs/explorer/desktop.c @@ -841,6 +841,35 @@ static BOOL get_default_enable_shell( const WCHAR *name ) return result; } +static BOOL get_default_show_systray( const WCHAR *name ) +{ + HKEY hkey; + BOOL found = FALSE; + BOOL result; + DWORD size = sizeof(result); + + /* @@ Wine registry key: HKCU\Software\Wine\Explorer\Desktops */ + if (name && !RegOpenKeyW( HKEY_CURRENT_USER, L"Software\\Wine\\Explorer\\Desktops", &hkey )) + { + if (!RegGetValueW( hkey, name, L"ShowSystray", RRF_RT_REG_DWORD, NULL, &result, &size )) + found = TRUE; + RegCloseKey( hkey ); + } + + /* Try again with a global Explorer setting */ + /* @@ Wine registry key: HKCU\Software\Wine\Explorer */ + if (!found && !RegOpenKeyW( HKEY_CURRENT_USER, L"Software\\Wine\\Explorer", &hkey )) + { + if (!RegGetValueW( hkey, NULL, L"ShowSystray", RRF_RT_REG_DWORD, NULL, &result, &size )) + found = TRUE; + RegCloseKey( hkey ); + } + + /* Default on */ + if (!found) result = TRUE; + return result; +} + static void load_graphics_driver( const WCHAR *driver, GUID *guid ) { static const WCHAR device_keyW[] = L"System\\CurrentControlSet\\Control\\Video\\{%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}\\0000"; @@ -1020,7 +1049,7 @@ void manage_desktop( WCHAR *arg ) WCHAR *cmdline = NULL, *driver = NULL; WCHAR *p = arg; const WCHAR *name = NULL; - BOOL enable_shell = FALSE; + BOOL enable_shell = FALSE, show_systray = TRUE; void (WINAPI *pShellDDEInit)( BOOL ) = NULL; HMODULE shell32; HANDLE thread; @@ -1054,8 +1083,8 @@ void manage_desktop( WCHAR *arg ) if (!get_default_desktop_size( name, &width, &height )) width = height = 0; } - if (name) - enable_shell = get_default_enable_shell( name ); + if (name) enable_shell = get_default_enable_shell( name ); + show_systray = get_default_show_systray( name ); UuidCreate( &guid ); TRACE( "display guid %s\n", debugstr_guid(&guid) ); @@ -1101,7 +1130,7 @@ void manage_desktop( WCHAR *arg ) if (using_root) enable_shell = FALSE; - initialize_systray( using_root, enable_shell ); + initialize_systray( using_root, enable_shell, show_systray ); if (!using_root) initialize_launchers( hwnd ); if ((shell32 = LoadLibraryW( L"shell32.dll" )) && diff --git a/programs/explorer/explorer_private.h b/programs/explorer/explorer_private.h index 34aa1cf046b..0639e41c9c6 100644 --- a/programs/explorer/explorer_private.h +++ b/programs/explorer/explorer_private.h @@ -22,7 +22,7 @@ #define __WINE_EXPLORER_PRIVATE_H extern void manage_desktop( WCHAR *arg ); -extern void initialize_systray( BOOL using_root, BOOL enable_shell ); +extern void initialize_systray( BOOL using_root, BOOL enable_shell, BOOL show_systray ); extern void initialize_appbar(void); extern void handle_parent_notify( HWND hwnd, WPARAM wp ); extern void do_startmenu( HWND owner ); diff --git a/programs/explorer/systray.c b/programs/explorer/systray.c index b012d3ffe72..3b4e5bdc8ac 100644 --- a/programs/explorer/systray.c +++ b/programs/explorer/systray.c @@ -249,6 +249,7 @@ static void balloon_create_timer( struct icon *icon ) static BOOL show_balloon( struct icon *icon ) { + if (!show_systray) return FALSE; /* systray has been hidden */ if (icon->display == ICON_DISPLAY_HIDDEN) return FALSE; /* not displayed */ if (!icon->info_text[0]) return FALSE; /* no balloon */ balloon_icon = icon; @@ -1114,7 +1115,7 @@ void handle_parent_notify( HWND hwnd, WPARAM wp ) } /* this function creates the listener window */ -void initialize_systray( BOOL using_root, BOOL arg_enable_shell ) +void initialize_systray( BOOL using_root, BOOL arg_enable_shell, BOOL arg_show_systray ) { RECT work_rect, primary_rect, taskbar_rect; @@ -1125,6 +1126,7 @@ void initialize_systray( BOOL using_root, BOOL arg_enable_shell ) icon_cx = GetSystemMetrics( SM_CXSMICON ) + 2*ICON_BORDER; icon_cy = GetSystemMetrics( SM_CYSMICON ) + 2*ICON_BORDER; + show_systray = arg_show_systray; enable_shell = arg_enable_shell; enable_taskbar = enable_shell || !using_root;
1
0
0
0
Nikolay Sivov : mfplat/tests: Skip device manager test if d3d11 device can't be created.
by Alexandre Julliard
29 Jan '24
29 Jan '24
Module: wine Branch: master Commit: 75b9c221b2344bd52300385bb6eefaabdf76eb06 URL:
https://gitlab.winehq.org/wine/wine/-/commit/75b9c221b2344bd52300385bb6eefa…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Mon Jan 29 10:41:16 2024 +0100 mfplat/tests: Skip device manager test if d3d11 device can't be created. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> --- dlls/mfplat/tests/mfplat.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/dlls/mfplat/tests/mfplat.c b/dlls/mfplat/tests/mfplat.c index f8cf51cad3b..42d682be426 100644 --- a/dlls/mfplat/tests/mfplat.c +++ b/dlls/mfplat/tests/mfplat.c @@ -5690,6 +5690,16 @@ static void test_dxgi_device_manager(void) return; } + hr = pD3D11CreateDevice(NULL, D3D_DRIVER_TYPE_HARDWARE, NULL, D3D11_CREATE_DEVICE_VIDEO_SUPPORT, + NULL, 0, D3D11_SDK_VERSION, &d3d11_dev, NULL, NULL); + if (FAILED(hr)) + { + skip("Failed to create D3D11 device object.\n"); + return; + } + ok(hr == S_OK, "D3D11CreateDevice failed: %#lx.\n", hr); + EXPECT_REF(d3d11_dev, 1); + hr = pMFCreateDXGIDeviceManager(NULL, &manager); ok(hr == E_POINTER, "MFCreateDXGIDeviceManager should failed: %#lx.\n", hr); @@ -5721,11 +5731,6 @@ static void test_dxgi_device_manager(void) hr = IMFDXGIDeviceManager_CloseDeviceHandle(manager, 0); ok(hr == E_HANDLE, "Unexpected hr %#lx.\n", hr); - hr = pD3D11CreateDevice(NULL, D3D_DRIVER_TYPE_HARDWARE, NULL, D3D11_CREATE_DEVICE_VIDEO_SUPPORT, - NULL, 0, D3D11_SDK_VERSION, &d3d11_dev, NULL, NULL); - ok(hr == S_OK, "D3D11CreateDevice failed: %#lx.\n", hr); - EXPECT_REF(d3d11_dev, 1); - hr = IMFDXGIDeviceManager_ResetDevice(manager, (IUnknown *)d3d11_dev, token - 1); ok(hr == E_INVALIDARG, "IMFDXGIDeviceManager_ResetDevice should failed: %#lx.\n", hr); EXPECT_REF(d3d11_dev, 1);
1
0
0
0
Jacek Caban : ncrypt/tests: Don't use uninitialized variable in test_get_property.
by Alexandre Julliard
29 Jan '24
29 Jan '24
Module: wine Branch: master Commit: 0db8c0184edd8c4412e484f0e84e08763ecd2321 URL:
https://gitlab.winehq.org/wine/wine/-/commit/0db8c0184edd8c4412e484f0e84e08…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Jan 29 13:52:05 2024 +0100 ncrypt/tests: Don't use uninitialized variable in test_get_property. --- dlls/ncrypt/tests/ncrypt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/ncrypt/tests/ncrypt.c b/dlls/ncrypt/tests/ncrypt.c index d2c53c8d1b3..f5dae649a10 100644 --- a/dlls/ncrypt/tests/ncrypt.c +++ b/dlls/ncrypt/tests/ncrypt.c @@ -382,7 +382,7 @@ static void test_get_property(void) ret = NCryptOpenStorageProvider(&prov, NULL, 0); ok(ret == ERROR_SUCCESS, "got %#lx\n", ret); - ret = NCryptGetProperty(0, NCRYPT_LENGTH_PROPERTY, (BYTE *)&keylength, size, &size, 0); + ret = NCryptGetProperty(0, NCRYPT_LENGTH_PROPERTY, (BYTE *)&keylength, sizeof(keylength), &size, 0); ok(ret == NTE_INVALID_HANDLE, "got %#lx\n", ret); ret = NCryptImportKey(prov, 0, BCRYPT_RSAPUBLIC_BLOB, NULL, &key, rsa_key_blob, sizeof(rsa_key_blob), 0);
1
0
0
0
David Kahurani : msvcrt: Free previous environment variable when clearing.
by Alexandre Julliard
29 Jan '24
29 Jan '24
Module: wine Branch: master Commit: 1580c1133a190f850182ce891f7299a157b1d0fb URL:
https://gitlab.winehq.org/wine/wine/-/commit/1580c1133a190f850182ce891f7299…
Author: David Kahurani <k.kahurani(a)gmail.com> Date: Fri Jan 26 16:08:33 2024 +0300 msvcrt: Free previous environment variable when clearing. Shifting the rest of the variables by one towards indices of lesser value overwrites the variable being cleared and effectively leaks it. Signed-off-by: David Kahurani <k.kahurani(a)gmail.com> --- dlls/msvcrt/environ.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dlls/msvcrt/environ.c b/dlls/msvcrt/environ.c index aa857afa615..a0d2e08c7d0 100644 --- a/dlls/msvcrt/environ.c +++ b/dlls/msvcrt/environ.c @@ -161,6 +161,7 @@ static int env_set(char **env, wchar_t **wenv) *eq = '='; if (!eq[1]) { + free(MSVCRT__environ[idx]); for(; MSVCRT__environ[idx]; idx++) MSVCRT__environ[idx] = MSVCRT__environ[idx + 1]; } @@ -187,6 +188,7 @@ static int env_set(char **env, wchar_t **wenv) *weq = '='; if (!weq[1]) { + free(MSVCRT__wenviron[idx]); for(; MSVCRT__wenviron[idx]; idx++) MSVCRT__wenviron[idx] = MSVCRT__wenviron[idx + 1]; }
1
0
0
0
David Kahurani : gdiplus: Use path_list to path helper in GdipWidenPath.
by Alexandre Julliard
29 Jan '24
29 Jan '24
Module: wine Branch: master Commit: 9164cf8fd9e7e6265474b124235b3a5387a5f105 URL:
https://gitlab.winehq.org/wine/wine/-/commit/9164cf8fd9e7e6265474b124235b3a…
Author: David Kahurani <k.kahurani(a)gmail.com> Date: Sun Jan 7 00:03:36 2024 +0300 gdiplus: Use path_list to path helper in GdipWidenPath. The data is the path is invalid and therefore caution has to be taken when adding data to this path to avoid lengthening it unnecessarily. Also, don't assume there's a head node on the list while counting number of nodes. Signed-off-by: David Kahurani <k.kahurani(a)gmail.com> --- dlls/gdiplus/graphicspath.c | 26 +++++++------------------- 1 file changed, 7 insertions(+), 19 deletions(-) diff --git a/dlls/gdiplus/graphicspath.c b/dlls/gdiplus/graphicspath.c index 502c5c6b645..09cd99e4467 100644 --- a/dlls/gdiplus/graphicspath.c +++ b/dlls/gdiplus/graphicspath.c @@ -95,10 +95,13 @@ static path_list_node_t* add_path_list_node(path_list_node_t *node, REAL x, REAL /* returns element count */ static INT path_list_count(path_list_node_t *node) { - INT count = 1; + INT count = 0; - while((node = node->next)) + while(node) + { ++count; + node = node->next; + } return count; } @@ -2501,7 +2504,7 @@ GpStatus WINGDIPAPI GdipWidenPath(GpPath *path, GpPen *pen, GpMatrix *matrix, GpPath *flat_path=NULL; GpStatus status; path_list_node_t *points=NULL, *last_point=NULL; - int i, subpath_start=0, new_length; + int i, subpath_start=0; TRACE("(%p,%p,%s,%0.2f)\n", path, pen, debugstr_matrix(matrix), flatness); @@ -2584,23 +2587,8 @@ GpStatus WINGDIPAPI GdipWidenPath(GpPath *path, GpPen *pen, GpMatrix *matrix, } } - new_length = path_list_count(points)-1; - - if (!lengthen_path(path, new_length)) + if (!path_list_to_path(points->next, path)) status = OutOfMemory; - } - - if (status == Ok) - { - path->pathdata.Count = new_length; - - last_point = points->next; - for (i = 0; i < new_length; i++) - { - path->pathdata.Points[i] = last_point->pt; - path->pathdata.Types[i] = last_point->type; - last_point = last_point->next; - } path->fill = FillModeWinding; }
1
0
0
0
David Kahurani : gdiplus: Use path_list to path helper in GdipFlattenPath.
by Alexandre Julliard
29 Jan '24
29 Jan '24
Module: wine Branch: master Commit: ccc3568567f544d391429a3704a348fbc1febe9d URL:
https://gitlab.winehq.org/wine/wine/-/commit/ccc3568567f544d391429a3704a348…
Author: David Kahurani <k.kahurani(a)gmail.com> Date: Sat Jan 6 23:19:35 2024 +0300 gdiplus: Use path_list to path helper in GdipFlattenPath. This avoids a situation where the lengthening code, assuming the data in the path is valid proceeds to lengthen the path further while transforming data from a path_list into a path. Signed-off-by: David Kahurani <k.kahurani(a)gmail.com> --- dlls/gdiplus/graphicspath.c | 53 ++++++++++++++++++++++++++++++++++----------- 1 file changed, 40 insertions(+), 13 deletions(-) diff --git a/dlls/gdiplus/graphicspath.c b/dlls/gdiplus/graphicspath.c index dabd458b312..502c5c6b645 100644 --- a/dlls/gdiplus/graphicspath.c +++ b/dlls/gdiplus/graphicspath.c @@ -103,6 +103,45 @@ static INT path_list_count(path_list_node_t *node) return count; } +static BOOL path_list_to_path(path_list_node_t *node, GpPath *path) +{ + INT i, count = path_list_count(node); + GpPointF *Points; + BYTE *Types; + + if (count == 0) + { + path->pathdata.Count = count; + return TRUE; + } + + Points = calloc(count, sizeof(GpPointF)); + Types = calloc(1, count); + + if (!Points || !Types) + { + free(Points); + free(Types); + return FALSE; + } + + for(i = 0; i < count; i++){ + Points[i] = node->pt; + Types[i] = node->type; + node = node->next; + } + + free(path->pathdata.Points); + free(path->pathdata.Types); + + path->pathdata.Points = Points; + path->pathdata.Types = Types; + path->pathdata.Count = count; + path->datalen = count; + + return TRUE; +} + struct flatten_bezier_job { path_list_node_t *start; @@ -1417,19 +1456,7 @@ GpStatus WINGDIPAPI GdipFlattenPath(GpPath *path, GpMatrix* matrix, REAL flatnes ++i; }/* while */ - /* store path data back */ - i = path_list_count(list); - if(!lengthen_path(path, i)) - goto memout; - path->pathdata.Count = i; - - node = list; - for(i = 0; i < path->pathdata.Count; i++){ - path->pathdata.Points[i] = node->pt; - path->pathdata.Types[i] = node->type; - node = node->next; - } - + if (!path_list_to_path(list, path)) goto memout; free_path_list(list); return Ok;
1
0
0
0
David Kahurani : gdiplus: Use GdipCreatePath2 when serializing paths.
by Alexandre Julliard
29 Jan '24
29 Jan '24
Module: wine Branch: master Commit: a430702b41ec084e1855442eadefaabeea56cf2a URL:
https://gitlab.winehq.org/wine/wine/-/commit/a430702b41ec084e1855442eadefaa…
Author: David Kahurani <k.kahurani(a)gmail.com> Date: Wed Jan 24 14:30:26 2024 +0300 gdiplus: Use GdipCreatePath2 when serializing paths. This seems like a better interface and avoids duplicating code. Signed-off-by: David Kahurani <k.kahurani(a)gmail.com> --- dlls/gdiplus/metafile.c | 46 ++++++++++++++++++++-------------------------- 1 file changed, 20 insertions(+), 26 deletions(-) diff --git a/dlls/gdiplus/metafile.c b/dlls/gdiplus/metafile.c index 5c50d0d1d37..6ccfc469c25 100644 --- a/dlls/gdiplus/metafile.c +++ b/dlls/gdiplus/metafile.c @@ -2006,7 +2006,6 @@ static GpStatus metafile_deserialize_image(const BYTE *record_data, UINT data_si static GpStatus metafile_deserialize_path(const BYTE *record_data, UINT data_size, GpPath **path) { EmfPlusPath *data = (EmfPlusPath *)record_data; - GpStatus status; BYTE *types; UINT size; DWORD i; @@ -2035,40 +2034,35 @@ static GpStatus metafile_deserialize_path(const BYTE *record_data, UINT data_siz if (data_size < size) return InvalidParameter; - status = GdipCreatePath(FillModeAlternate, path); - if (status != Ok) - return status; - - (*path)->pathdata.Count = data->PathPointCount; - (*path)->pathdata.Points = malloc(data->PathPointCount * sizeof(*(*path)->pathdata.Points)); - (*path)->pathdata.Types = malloc(data->PathPointCount * sizeof(*(*path)->pathdata.Types)); - (*path)->datalen = (*path)->pathdata.Count; - - if (!(*path)->pathdata.Points || !(*path)->pathdata.Types) + if (data->PathPointCount) { - GdipDeletePath(*path); - return OutOfMemory; - } + if (data->PathPointFlags & 0x4000) /* C */ + { + EmfPlusPoint *points = (EmfPlusPoint *)data->data; + GpPointF *temp = malloc(sizeof(GpPointF) * data->PathPointCount); - if (data->PathPointFlags & 0x4000) /* C */ - { - EmfPlusPoint *points = (EmfPlusPoint *)data->data; - for (i = 0; i < data->PathPointCount; i++) + for (i = 0; i < data->PathPointCount; i++) + { + temp[i].X = points[i].X; + temp[i].Y = points[i].Y; + } + + types = (BYTE *)(points + i); + GdipCreatePath2(temp, types, data->PathPointCount, FillModeAlternate, path); + free(temp); + } + else { - (*path)->pathdata.Points[i].X = points[i].X; - (*path)->pathdata.Points[i].Y = points[i].Y; + EmfPlusPointF *points = (EmfPlusPointF *)data->data; + types = (BYTE *)(points + data->PathPointCount); + return GdipCreatePath2((GpPointF*)points, types, data->PathPointCount, FillModeAlternate, path); } - types = (BYTE *)(points + i); } else { - EmfPlusPointF *points = (EmfPlusPointF *)data->data; - memcpy((*path)->pathdata.Points, points, sizeof(*points) * data->PathPointCount); - types = (BYTE *)(points + data->PathPointCount); + return GdipCreatePath(FillModeAlternate, path); } - memcpy((*path)->pathdata.Types, types, sizeof(*types) * data->PathPointCount); - return Ok; }
1
0
0
0
David Kahurani : gdiplus: Use GdipCreatePath2 in GdipClonePath.
by Alexandre Julliard
29 Jan '24
29 Jan '24
Module: wine Branch: master Commit: 90fb47489e6e720037102f08b9e84df23fa0d211 URL:
https://gitlab.winehq.org/wine/wine/-/commit/90fb47489e6e720037102f08b9e84d…
Author: David Kahurani <k.kahurani(a)gmail.com> Date: Wed Jan 24 12:30:22 2024 +0300 gdiplus: Use GdipCreatePath2 in GdipClonePath. This seems like a more effective interface and avoids code duplication. Signed-off-by: David Kahurani <k.kahurani(a)gmail.com> --- dlls/gdiplus/graphicspath.c | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) diff --git a/dlls/gdiplus/graphicspath.c b/dlls/gdiplus/graphicspath.c index 9e186aa43d1..dabd458b312 100644 --- a/dlls/gdiplus/graphicspath.c +++ b/dlls/gdiplus/graphicspath.c @@ -1185,24 +1185,15 @@ GpStatus WINGDIPAPI GdipClonePath(GpPath* path, GpPath **clone) if(!path || !clone) return InvalidParameter; - *clone = malloc(sizeof(GpPath)); - if(!*clone) return OutOfMemory; - - **clone = *path; - - (*clone)->pathdata.Points = malloc(path->datalen * sizeof(PointF)); - (*clone)->pathdata.Types = malloc(path->datalen); - if(!(*clone)->pathdata.Points || !(*clone)->pathdata.Types){ - free((*clone)->pathdata.Points); - free((*clone)->pathdata.Types); - free(*clone); - return OutOfMemory; + if (path->pathdata.Count) + return GdipCreatePath2(path->pathdata.Points, path->pathdata.Types, path->pathdata.Count, + path->fill, clone); + else + { + *clone = calloc(1, sizeof(GpPath)); + if(!*clone) return OutOfMemory; } - memcpy((*clone)->pathdata.Points, path->pathdata.Points, - path->datalen * sizeof(PointF)); - memcpy((*clone)->pathdata.Types, path->pathdata.Types, path->datalen); - return Ok; }
1
0
0
0
Alexandre Julliard : ntdll: Move DbgUiRemoteBreakin() to the CPU backends.
by Alexandre Julliard
29 Jan '24
29 Jan '24
Module: wine Branch: master Commit: ba6a6d57813fa7a7e1b06bd697f8ddd934adad7a URL:
https://gitlab.winehq.org/wine/wine/-/commit/ba6a6d57813fa7a7e1b06bd697f8dd…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Jan 29 17:07:57 2024 +0100 ntdll: Move DbgUiRemoteBreakin() to the CPU backends. --- dlls/ntdll/process.c | 12 ------------ dlls/ntdll/signal_arm.c | 20 ++++++++++++++++++++ dlls/ntdll/signal_arm64.c | 20 ++++++++++++++++++++ dlls/ntdll/signal_arm64ec.c | 20 ++++++++++++++++++++ dlls/ntdll/signal_i386.c | 21 +++++++++++++++++++++ dlls/ntdll/signal_x86_64.c | 21 +++++++++++++++++++++ 6 files changed, 102 insertions(+), 12 deletions(-) diff --git a/dlls/ntdll/process.c b/dlls/ntdll/process.c index 87090781bbd..dcdb26f81d1 100644 --- a/dlls/ntdll/process.c +++ b/dlls/ntdll/process.c @@ -36,8 +36,6 @@ #include "ntdll_misc.h" #include "wine/exception.h" -WINE_DEFAULT_DEBUG_CHANNEL(process); - /****************************************************************************** * RtlGetCurrentPeb [NTDLL.@] @@ -702,16 +700,6 @@ NTSTATUS WINAPI DbgUiConvertStateChangeStructure( DBGUI_WAIT_STATE_CHANGE *state return STATUS_SUCCESS; } -/*********************************************************************** - * DbgUiRemoteBreakin (NTDLL.@) - */ -void WINAPI DbgUiRemoteBreakin( void *arg ) -{ - TRACE( "\n" ); - if (NtCurrentTeb()->Peb->BeingDebugged) process_breakpoint(); - RtlExitUserThread( STATUS_SUCCESS ); -} - /*********************************************************************** * DbgUiIssueRemoteBreakin (NTDLL.@) */ diff --git a/dlls/ntdll/signal_arm.c b/dlls/ntdll/signal_arm.c index 6eb113fc2c6..80d722ccacb 100644 --- a/dlls/ntdll/signal_arm.c +++ b/dlls/ntdll/signal_arm.c @@ -1685,6 +1685,26 @@ void WINAPI process_breakpoint(void) } #endif +/*********************************************************************** + * DbgUiRemoteBreakin (NTDLL.@) + */ +void WINAPI DbgUiRemoteBreakin( void *arg ) +{ + if (NtCurrentTeb()->Peb->BeingDebugged) + { + __TRY + { + DbgBreakPoint(); + } + __EXCEPT_ALL + { + /* do nothing */ + } + __ENDTRY + } + RtlExitUserThread( STATUS_SUCCESS ); +} + /********************************************************************** * DbgBreakPoint (NTDLL.@) */ diff --git a/dlls/ntdll/signal_arm64.c b/dlls/ntdll/signal_arm64.c index 24afe61533c..477f22029bd 100644 --- a/dlls/ntdll/signal_arm64.c +++ b/dlls/ntdll/signal_arm64.c @@ -1582,6 +1582,26 @@ __ASM_GLOBAL_FUNC( process_breakpoint, "mov w0, #0\n\t" /* ExceptionContinueExecution */ "ret" ) +/*********************************************************************** + * DbgUiRemoteBreakin (NTDLL.@) + */ +void WINAPI DbgUiRemoteBreakin( void *arg ) +{ + if (NtCurrentTeb()->Peb->BeingDebugged) + { + __TRY + { + DbgBreakPoint(); + } + __EXCEPT_ALL + { + /* do nothing */ + } + __ENDTRY + } + RtlExitUserThread( STATUS_SUCCESS ); +} + /********************************************************************** * DbgBreakPoint (NTDLL.@) */ diff --git a/dlls/ntdll/signal_arm64ec.c b/dlls/ntdll/signal_arm64ec.c index 97507d34c4f..8b4fd399c09 100644 --- a/dlls/ntdll/signal_arm64ec.c +++ b/dlls/ntdll/signal_arm64ec.c @@ -2016,6 +2016,26 @@ __ASM_GLOBAL_FUNC( "#process_breakpoint", "mov w0, #0\n\t" /* ExceptionContinueExecution */ "ret" ) +/*********************************************************************** + * DbgUiRemoteBreakin (NTDLL.@) + */ +void WINAPI DbgUiRemoteBreakin( void *arg ) +{ + if (NtCurrentTeb()->Peb->BeingDebugged) + { + __TRY + { + DbgBreakPoint(); + } + __EXCEPT_ALL + { + /* do nothing */ + } + __ENDTRY + } + RtlExitUserThread( STATUS_SUCCESS ); +} + /********************************************************************** * DbgBreakPoint (NTDLL.@) */ diff --git a/dlls/ntdll/signal_i386.c b/dlls/ntdll/signal_i386.c index ee20b5e011e..c4b0c84abfb 100644 --- a/dlls/ntdll/signal_i386.c +++ b/dlls/ntdll/signal_i386.c @@ -646,6 +646,27 @@ void WINAPI process_breakpoint(void) } +/*********************************************************************** + * DbgUiRemoteBreakin (NTDLL.@) + */ +void WINAPI DbgUiRemoteBreakin( void *arg ) +{ + if (NtCurrentTeb()->Peb->BeingDebugged) + { + __TRY + { + DbgBreakPoint(); + } + __EXCEPT_ALL + { + /* do nothing */ + } + __ENDTRY + } + RtlExitUserThread( STATUS_SUCCESS ); +} + + /********************************************************************** * DbgBreakPoint (NTDLL.@) */ diff --git a/dlls/ntdll/signal_x86_64.c b/dlls/ntdll/signal_x86_64.c index 46357897369..be5851b8c31 100644 --- a/dlls/ntdll/signal_x86_64.c +++ b/dlls/ntdll/signal_x86_64.c @@ -1745,6 +1745,27 @@ void WINAPI process_breakpoint(void) #endif +/*********************************************************************** + * DbgUiRemoteBreakin (NTDLL.@) + */ +void WINAPI DbgUiRemoteBreakin( void *arg ) +{ + if (NtCurrentTeb()->Peb->BeingDebugged) + { + __TRY + { + DbgBreakPoint(); + } + __EXCEPT_ALL + { + /* do nothing */ + } + __ENDTRY + } + RtlExitUserThread( STATUS_SUCCESS ); +} + + /********************************************************************** * DbgBreakPoint (NTDLL.@) */
1
0
0
0
← Newer
1
...
5
6
7
8
9
10
11
...
72
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
Results per page:
10
25
50
100
200