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
October 2023
----- 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
702 discussions
Start a n
N
ew thread
Alexandre Julliard : server: Fix returned error when creating an existing symlink.
by Alexandre Julliard
30 Oct '23
30 Oct '23
Module: wine Branch: master Commit: afb16d3ee2cdbc5c7fc6119fa9c805ca0611baa6 URL:
https://gitlab.winehq.org/wine/wine/-/commit/afb16d3ee2cdbc5c7fc6119fa9c805…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Oct 30 13:32:46 2023 +0100 server: Fix returned error when creating an existing symlink. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=55839
--- dlls/ntdll/tests/om.c | 20 ++++++++++++++++++-- server/symlink.c | 15 ++++++++++----- 2 files changed, 28 insertions(+), 7 deletions(-) diff --git a/dlls/ntdll/tests/om.c b/dlls/ntdll/tests/om.c index b612a0844a4..62659fc8cb4 100644 --- a/dlls/ntdll/tests/om.c +++ b/dlls/ntdll/tests/om.c @@ -1408,9 +1408,15 @@ static void test_symboliclink(void) pNtClose(link); RtlInitUnicodeString(&str, L"\\"); + attr.Attributes = OBJ_OPENIF; status = pNtCreateSymbolicLinkObject(&h, SYMBOLIC_LINK_QUERY, &attr, &target); - todo_wine ok(status == STATUS_OBJECT_TYPE_MISMATCH, - "NtCreateSymbolicLinkObject should have failed with STATUS_OBJECT_TYPE_MISMATCH got(%08lx)\n", status); + ok(status == STATUS_OBJECT_TYPE_MISMATCH, + "NtCreateSymbolicLinkObject should have failed with STATUS_OBJECT_TYPE_MISMATCH got(%08lx)\n", status); + attr.Attributes = 0; + status = pNtCreateSymbolicLinkObject(&h, SYMBOLIC_LINK_QUERY, &attr, &target); + todo_wine + ok(status == STATUS_OBJECT_TYPE_MISMATCH, + "NtCreateSymbolicLinkObject should have failed with STATUS_OBJECT_TYPE_MISMATCH got(%08lx)\n", status); RtlInitUnicodeString( &target, L"->Somewhere"); @@ -1480,6 +1486,16 @@ static void test_symboliclink(void) ok(status == STATUS_SUCCESS, "Got unexpected status %#lx.\n", status); pNtClose(h); + attr.Attributes = OBJ_OPENIF; + status = pNtCreateSymbolicLinkObject( &h, SYMBOLIC_LINK_QUERY, &attr, &target ); + ok(status == STATUS_SUCCESS || broken( status == STATUS_OBJECT_NAME_EXISTS ), /* <= win10 1507 */ + "Got unexpected status %#lx.\n", status); + pNtClose(h); + attr.Attributes = 0; + status = pNtCreateSymbolicLinkObject( &h, SYMBOLIC_LINK_QUERY, &attr, &target ); + ok(status == STATUS_OBJECT_NAME_COLLISION, "Got unexpected status %#lx.\n", status); + pNtClose(h); + InitializeObjectAttributes(&attr, &str, 0, 0, NULL); RtlInitUnicodeString( &str, L"\\BaseNamedObjects\\om.c-test\\" ); status = NtCreateFile(&h, GENERIC_READ | SYNCHRONIZE, &attr, &iosb, NULL, 0, diff --git a/server/symlink.c b/server/symlink.c index 27d48e2f994..dd28efd3a75 100644 --- a/server/symlink.c +++ b/server/symlink.c @@ -155,13 +155,18 @@ struct object *create_symlink( struct object *root, const struct unicode_str *na set_error( STATUS_INVALID_PARAMETER ); return NULL; } - if (!(symlink = create_named_object( root, &symlink_ops, name, attr, sd ))) return NULL; - if (get_error() != STATUS_OBJECT_NAME_EXISTS && !(symlink->target = memdup( target->str, target->len ))) + if (!(symlink = create_named_object( root, &symlink_ops, name, attr | OBJ_OPENLINK, sd ))) return NULL; + if (get_error() != STATUS_OBJECT_NAME_EXISTS) { - release_object( symlink ); - return NULL; + symlink->len = target->len; + if (!(symlink->target = memdup( target->str, target->len ))) + { + release_object( symlink ); + return NULL; + } } - symlink->len = target->len; + else clear_error(); + return &symlink->obj; }
1
0
0
0
Alex Henrie : winemenubuilder: Disallow desktop integration for internet shortcuts.
by Alexandre Julliard
30 Oct '23
30 Oct '23
Module: wine Branch: master Commit: 0f88c7c31f7845e939bdf27f14f0385231282063 URL:
https://gitlab.winehq.org/wine/wine/-/commit/0f88c7c31f7845e939bdf27f14f038…
Author: Alex Henrie <alexhenrie24(a)gmail.com> Date: Sun Oct 29 15:14:32 2023 -0600 winemenubuilder: Disallow desktop integration for internet shortcuts. --- programs/winemenubuilder/winemenubuilder.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/programs/winemenubuilder/winemenubuilder.c b/programs/winemenubuilder/winemenubuilder.c index 82fece62eb5..abc8edb2ce9 100644 --- a/programs/winemenubuilder/winemenubuilder.c +++ b/programs/winemenubuilder/winemenubuilder.c @@ -1968,7 +1968,8 @@ static BOOL is_extension_banned(LPCWSTR extension) if (!wcsicmp(extension, L".bat") || !wcsicmp(extension, L".com") || !wcsicmp(extension, L".exe") || - !wcsicmp(extension, L".msi")) + !wcsicmp(extension, L".msi") || + !wcsicmp(extension, L".url")) return TRUE; return FALSE; }
1
0
0
0
Alex Henrie : loader: Associate Wine with internet shortcuts.
by Alexandre Julliard
30 Oct '23
30 Oct '23
Module: wine Branch: master Commit: b520a19fc210d4c640398cdb1207713ec434cd6c URL:
https://gitlab.winehq.org/wine/wine/-/commit/b520a19fc210d4c640398cdb120771…
Author: Alex Henrie <alexhenrie24(a)gmail.com> Date: Sun Oct 29 15:13:49 2023 -0600 loader: Associate Wine with internet shortcuts. --- loader/wine.desktop | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/loader/wine.desktop b/loader/wine.desktop index d232a756b9b..e76dd0df903 100644 --- a/loader/wine.desktop +++ b/loader/wine.desktop @@ -26,7 +26,7 @@ Name[hr]=Wine - dizač Windows programa Name[he]=Wine — מריץ תכניות Windows Name[ja]=Wine Windowsプログラムローダー Exec=wine start /unix %f -MimeType=application/x-ms-dos-executable;application/x-msi;application/x-ms-shortcut;application/x-bat +MimeType=application/x-ms-dos-executable;application/x-msi;application/x-ms-shortcut;application/x-bat;application/x-mswinurl Icon=wine NoDisplay=true StartupNotify=true
1
0
0
0
Alex Henrie : uxtheme/tests: Use CRT allocation functions.
by Alexandre Julliard
30 Oct '23
30 Oct '23
Module: wine Branch: master Commit: da42d96aa81e13688fdc9adccafca4a8ee9e53ab URL:
https://gitlab.winehq.org/wine/wine/-/commit/da42d96aa81e13688fdc9adccafca4…
Author: Alex Henrie <alexhenrie24(a)gmail.com> Date: Sun Oct 29 13:23:19 2023 -0600 uxtheme/tests: Use CRT allocation functions. --- dlls/uxtheme/tests/msg.h | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/dlls/uxtheme/tests/msg.h b/dlls/uxtheme/tests/msg.h index 37699a12213..f967c39d091 100644 --- a/dlls/uxtheme/tests/msg.h +++ b/dlls/uxtheme/tests/msg.h @@ -20,7 +20,6 @@ #include <assert.h> #include <windows.h> -#include "wine/heap.h" #include "wine/test.h" /* undocumented SWP flags - from SDK 3.1 */ @@ -69,13 +68,13 @@ static void add_message(struct msg_sequence **seq, int sequence_index, if (!msg_seq->sequence) { msg_seq->size = 10; - msg_seq->sequence = heap_alloc(msg_seq->size * sizeof (*msg_seq->sequence)); + msg_seq->sequence = malloc(msg_seq->size * sizeof(*msg_seq->sequence)); } if (msg_seq->count == msg_seq->size) { msg_seq->size *= 2; - msg_seq->sequence = heap_realloc(msg_seq->sequence, msg_seq->size * sizeof (*msg_seq->sequence)); + msg_seq->sequence = realloc(msg_seq->sequence, msg_seq->size * sizeof(*msg_seq->sequence)); } assert(msg_seq->sequence); @@ -87,7 +86,7 @@ static void add_message(struct msg_sequence **seq, int sequence_index, static inline void flush_sequence(struct msg_sequence **seg, int sequence_index) { struct msg_sequence *msg_seq = seg[sequence_index]; - heap_free(msg_seq->sequence); + free(msg_seq->sequence); msg_seq->sequence = NULL; msg_seq->count = msg_seq->size = 0; } @@ -405,5 +404,5 @@ static void init_msg_sequences(struct msg_sequence **seq, int n) int i; for (i = 0; i < n; i++) - seq[i] = heap_alloc_zero(sizeof(*seq[i])); + seq[i] = calloc(1, sizeof(*seq[i])); }
1
0
0
0
Alex Henrie : uninstaller: Use CRT allocation functions.
by Alexandre Julliard
30 Oct '23
30 Oct '23
Module: wine Branch: master Commit: 0c3530d69808bc41c5c8f53b96e2afd14686ebab URL:
https://gitlab.winehq.org/wine/wine/-/commit/0c3530d69808bc41c5c8f53b96e2af…
Author: Alex Henrie <alexhenrie24(a)gmail.com> Date: Sun Oct 29 13:19:06 2023 -0600 uninstaller: Use CRT allocation functions. --- programs/uninstaller/main.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/programs/uninstaller/main.c b/programs/uninstaller/main.c index 15f63976838..52e8a0debe9 100644 --- a/programs/uninstaller/main.c +++ b/programs/uninstaller/main.c @@ -61,12 +61,12 @@ static void output_writeconsole(const WCHAR *str, DWORD len) * If this occurs, we should use an OEM codepage and call WriteFile. */ lenA = WideCharToMultiByte(GetOEMCP(), 0, str, len, NULL, 0, NULL, NULL); - strA = HeapAlloc(GetProcessHeap(), 0, lenA); + strA = malloc(lenA); if (strA) { WideCharToMultiByte(GetOEMCP(), 0, str, len, strA, lenA, NULL, NULL); WriteFile(GetStdHandle(STD_OUTPUT_HANDLE), strA, lenA, &written, FALSE); - HeapFree(GetProcessHeap(), 0, strA); + free(strA); } } @@ -257,13 +257,12 @@ static int FetchFromRootKey(HKEY root) if (!RegQueryValueExW(hkeyApp, L"WindowsInstaller", NULL, &type, (BYTE *)&value, &size) && type == REG_DWORD && value == 1) { - command = HeapAlloc(GetProcessHeap(), 0, - sizeof(L"msiexec /x") + wcslen(subKeyName) * sizeof(WCHAR)); + command = malloc(sizeof(L"msiexec /x") + wcslen(subKeyName) * sizeof(WCHAR)); wsprintfW(command, L"msiexec /x%s", subKeyName); } else if (!RegQueryValueExW(hkeyApp, L"UninstallString", NULL, NULL, NULL, &uninstlen)) { - command = HeapAlloc(GetProcessHeap(), 0, uninstlen); + command = malloc(uninstlen); RegQueryValueExW(hkeyApp, L"UninstallString", 0, 0, (BYTE *)command, &uninstlen); } else @@ -273,11 +272,10 @@ static int FetchFromRootKey(HKEY root) continue; } numentries++; - entries = HeapReAlloc(GetProcessHeap(), 0, entries, numentries*sizeof(uninst_entry)); + entries = realloc(entries, numentries * sizeof(uninst_entry)); entries[numentries-1].root = root; - entries[numentries-1].key = HeapAlloc(GetProcessHeap(), 0, (lstrlenW(subKeyName)+1)*sizeof(WCHAR)); - lstrcpyW(entries[numentries-1].key, subKeyName); - entries[numentries-1].descr = HeapAlloc(GetProcessHeap(), 0, displen); + entries[numentries-1].key = wcsdup(subKeyName); + entries[numentries-1].descr = malloc(displen); RegQueryValueExW(hkeyApp, L"DisplayName", 0, 0, (BYTE *)entries[numentries-1].descr, &displen); entries[numentries-1].command = command; entries[numentries-1].active = 0; @@ -302,7 +300,7 @@ static int FetchUninstallInformation(void) numentries = 0; oldsel = -1; if (!entries) - entries = HeapAlloc(GetProcessHeap(), 0, sizeof(uninst_entry)); + entries = malloc(sizeof(uninst_entry)); if (!RegOpenKeyExW(HKEY_LOCAL_MACHINE, PathUninstallW, 0, KEY_READ, &root)) {
1
0
0
0
Alex Henrie : msscript: Use CRT allocation functions.
by Alexandre Julliard
30 Oct '23
30 Oct '23
Module: wine Branch: master Commit: 8418962fa7c7720e6c7f48a9f4fccc0ff85b38bf URL:
https://gitlab.winehq.org/wine/wine/-/commit/8418962fa7c7720e6c7f48a9f4fccc…
Author: Alex Henrie <alexhenrie24(a)gmail.com> Date: Sun Oct 29 13:09:48 2023 -0600 msscript: Use CRT allocation functions. --- dlls/msscript.ocx/msscript.c | 61 ++++++++++++++++++++++---------------------- 1 file changed, 30 insertions(+), 31 deletions(-) diff --git a/dlls/msscript.ocx/msscript.c b/dlls/msscript.ocx/msscript.c index 402d0290fdc..82d411f51e8 100644 --- a/dlls/msscript.ocx/msscript.c +++ b/dlls/msscript.ocx/msscript.c @@ -30,7 +30,6 @@ DEFINE_GUID(GUID_NULL,0,0,0,0,0,0,0,0,0,0,0); #include "wine/debug.h" -#include "wine/heap.h" #include "wine/list.h" WINE_DEFAULT_DEBUG_CHANNEL(msscript); @@ -280,7 +279,7 @@ static void clear_named_items(ScriptHost *host) list_remove(&item->entry); SysFreeString(item->name); IDispatch_Release(item->disp); - heap_free(item); + free(item); } } @@ -388,14 +387,14 @@ static HRESULT add_script_object(ScriptHost *host, BSTR name, IDispatch *object, if (host_get_named_item(host, name)) return E_INVALIDARG; - item = heap_alloc(sizeof(*item)); + item = malloc(sizeof(*item)); if (!item) return E_OUTOFMEMORY; item->name = SysAllocString(name); if (!item->name) { - heap_free(item); + free(item); return E_OUTOFMEMORY; } IDispatch_AddRef(item->disp = object); @@ -407,7 +406,7 @@ static HRESULT add_script_object(ScriptHost *host, BSTR name, IDispatch *object, list_remove(&item->entry); IDispatch_Release(item->disp); SysFreeString(item->name); - heap_free(item); + free(item); return hr; } @@ -498,7 +497,7 @@ static HRESULT run_procedure(ScriptModule *module, BSTR procedure_name, SAFEARRA dp.cArgs = args->rgsabound[0].cElements; dp.rgdispidNamedArgs = NULL; dp.cNamedArgs = 0; - dp.rgvarg = heap_alloc(dp.cArgs * sizeof(*dp.rgvarg)); + dp.rgvarg = malloc(dp.cArgs * sizeof(*dp.rgvarg)); if (!dp.rgvarg) return E_OUTOFMEMORY; hr = SafeArrayLock(args); @@ -522,7 +521,7 @@ static HRESULT run_procedure(ScriptModule *module, BSTR procedure_name, SAFEARRA IDispatchEx_Release(dispex); } } - heap_free(dp.rgvarg); + free(dp.rgvarg); return hr; } @@ -668,7 +667,7 @@ static ULONG WINAPI ActiveScriptSite_Release(IActiveScriptSite *iface) if(!ref) { clear_named_items(This); - heap_free(This); + free(This); } return ref; @@ -908,7 +907,7 @@ static ULONG WINAPI ScriptProcedure_Release(IScriptProcedure *iface) { list_remove(&This->entry); SysFreeString(This->name); - heap_free(This); + free(This); } return ref; } @@ -1054,7 +1053,7 @@ static HRESULT get_script_procedure(ScriptProcedureCollection *procedures, IType } } - if (!(proc = heap_alloc(sizeof(*proc)))) + if (!(proc = malloc(sizeof(*proc)))) { hr = E_OUTOFMEMORY; SysFreeString(str); @@ -1115,7 +1114,7 @@ static ULONG WINAPI procedure_enum_Release(IEnumVARIANT *iface) if (!ref) { IScriptProcedureCollection_Release(&This->procedures->IScriptProcedureCollection_iface); - heap_free(This); + free(This); } return ref; @@ -1200,7 +1199,7 @@ static HRESULT WINAPI procedure_enum_Clone(IEnumVARIANT *iface, IEnumVARIANT **p if (!ppEnum) return E_POINTER; - if (!(clone = heap_alloc(sizeof(*clone)))) + if (!(clone = malloc(sizeof(*clone)))) return E_OUTOFMEMORY; *clone = *This; @@ -1267,7 +1266,7 @@ static ULONG WINAPI ScriptProcedureCollection_Release(IScriptProcedureCollection This->module->procedures = NULL; IScriptModule_Release(&This->module->IScriptModule_iface); - heap_free(This); + free(This); } return ref; } @@ -1359,7 +1358,7 @@ static HRESULT WINAPI ScriptProcedureCollection_get__NewEnum(IScriptProcedureCol count = attr->cFuncs; ITypeInfo_ReleaseTypeAttr(ti, attr); - if (!(proc_enum = heap_alloc(sizeof(*proc_enum)))) + if (!(proc_enum = malloc(sizeof(*proc_enum)))) return E_OUTOFMEMORY; proc_enum->IEnumVARIANT_iface.lpVtbl = &procedure_enum_vtbl; @@ -1572,7 +1571,7 @@ static ULONG WINAPI ScriptModule_Release(IScriptModule *iface) detach_module(This); SysFreeString(This->name); uncache_module_objects(This); - heap_free(This); + free(This); } return ref; @@ -1687,7 +1686,7 @@ static HRESULT WINAPI ScriptModule_get_Procedures(IScriptModule *iface, IScriptP ScriptProcedureCollection *procs; UINT i; - if (!(procs = heap_alloc(sizeof(*procs)))) + if (!(procs = malloc(sizeof(*procs)))) return E_OUTOFMEMORY; procs->IScriptProcedureCollection_iface.lpVtbl = &ScriptProcedureCollectionVtbl; @@ -1819,7 +1818,7 @@ static ULONG WINAPI module_enum_Release(IEnumVARIANT *iface) { IActiveScriptSite_Release(&This->host->IActiveScriptSite_iface); IScriptControl_Release(&This->control->IScriptControl_iface); - heap_free(This); + free(This); } return ref; @@ -1886,7 +1885,7 @@ static HRESULT WINAPI module_enum_Clone(IEnumVARIANT *iface, IEnumVARIANT **ppEn if (!ppEnum) return E_POINTER; if (This->host != This->control->host) return E_FAIL; - if (!(clone = heap_alloc(sizeof(*clone)))) + if (!(clone = malloc(sizeof(*clone)))) return E_OUTOFMEMORY; *clone = *This; @@ -1912,13 +1911,13 @@ static ScriptModule *create_module(ScriptHost *host, BSTR name) { ScriptModule *module; - if (!(module = heap_alloc_zero(sizeof(*module)))) return NULL; + if (!(module = calloc(1, sizeof(*module)))) return NULL; module->IScriptModule_iface.lpVtbl = &ScriptModuleVtbl; module->ref = 1; if (name && !(module->name = SysAllocString(name))) { - heap_free(module); + free(module); return NULL; } module->host = host; @@ -1935,7 +1934,7 @@ static void release_modules(ScriptControl *control, BOOL force_detach) IScriptModule_Release(&control->modules[i]->IScriptModule_iface); } - heap_free(control->modules); + free(control->modules); } static ScriptModule *find_module(ScriptControl *control, BSTR name) @@ -2056,7 +2055,7 @@ static HRESULT WINAPI ScriptModuleCollection_get__NewEnum(IScriptModuleCollectio if (!ppenumContexts) return E_POINTER; if (!This->host) return E_FAIL; - if (!(module_enum = heap_alloc(sizeof(*module_enum)))) + if (!(module_enum = malloc(sizeof(*module_enum)))) return E_OUTOFMEMORY; module_enum->IEnumVARIANT_iface.lpVtbl = &module_enum_vtbl; @@ -2136,7 +2135,7 @@ static HRESULT WINAPI ScriptModuleCollection_Add(IScriptModuleCollection *iface, /* See if we need to grow the array */ if (is_power_of_2(host->module_count)) { - modules = heap_realloc(This->modules, host->module_count * 2 * sizeof(*This->modules)); + modules = realloc(This->modules, host->module_count * 2 * sizeof(*This->modules)); if (!modules) return E_OUTOFMEMORY; This->modules = modules; } @@ -2264,7 +2263,7 @@ static ULONG WINAPI ScriptError_Release(IScriptError *iface) if (!ref) { IScriptError_Clear(&This->IScriptError_iface); - heap_free(This); + free(This); } return ref; @@ -2498,7 +2497,7 @@ static HRESULT init_script_host(ScriptControl *control, const CLSID *clsid, Scri *ret = NULL; - host = heap_alloc(sizeof(*host)); + host = malloc(sizeof(*host)); if (!host) return E_OUTOFMEMORY; @@ -2631,7 +2630,7 @@ static ULONG WINAPI ScriptControl_Release(IScriptControl *iface) IActiveScriptSite_Release(&This->host->IActiveScriptSite_iface); } IScriptError_Release(&This->error->IScriptError_iface); - heap_free(This); + free(This); } return ref; @@ -2742,11 +2741,11 @@ static HRESULT WINAPI ScriptControl_put_Language(IScriptControl *iface, BSTR lan return hres; /* Alloc global module */ - This->modules = heap_alloc_zero(sizeof(*This->modules)); + This->modules = calloc(1, sizeof(*This->modules)); if (This->modules) { This->modules[0] = create_module(This->host, NULL); if (!This->modules[0]) { - heap_free(This->modules); + free(This->modules); This->modules = NULL; hres = E_OUTOFMEMORY; } @@ -3959,14 +3958,14 @@ static HRESULT WINAPI ScriptControl_CreateInstance(IClassFactory *iface, IUnknow TRACE("(%p %s %p)\n", outer, debugstr_guid(riid), ppv); - script_control = heap_alloc_zero(sizeof(*script_control)); + script_control = calloc(1, sizeof(*script_control)); if(!script_control) return E_OUTOFMEMORY; - script_control->error = heap_alloc_zero(sizeof(*script_control->error)); + script_control->error = calloc(1, sizeof(*script_control->error)); if(!script_control->error) { - heap_free(script_control); + free(script_control); return E_OUTOFMEMORY; }
1
0
0
0
Alex Henrie : find/tests: Use CRT allocation functions.
by Alexandre Julliard
30 Oct '23
30 Oct '23
Module: wine Branch: master Commit: a3c3283c177d11b83bb5da2eef3c12d4e8985785 URL:
https://gitlab.winehq.org/wine/wine/-/commit/a3c3283c177d11b83bb5da2eef3c12…
Author: Alex Henrie <alexhenrie24(a)gmail.com> Date: Sun Oct 29 13:08:40 2023 -0600 find/tests: Use CRT allocation functions. --- programs/find/tests/find.c | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/programs/find/tests/find.c b/programs/find/tests/find.c index a85bda85bec..10fd8ad8ae3 100644 --- a/programs/find/tests/find.c +++ b/programs/find/tests/find.c @@ -19,7 +19,6 @@ #include <windows.h> #include <stdio.h> -#include "wine/heap.h" #include "wine/test.h" static void read_all_from_handle(HANDLE handle, BYTE **str, int *len) @@ -27,14 +26,14 @@ static void read_all_from_handle(HANDLE handle, BYTE **str, int *len) char buffer[4096]; DWORD bytes_read; DWORD length = 0; - BYTE *ret = heap_alloc_zero(1); + BYTE *ret = calloc(1, 1); for (;;) { BOOL success = ReadFile(handle, buffer, sizeof(buffer), &bytes_read, NULL); if (!success || !bytes_read) break; - ret = heap_realloc(ret, length + bytes_read); + ret = realloc(ret, length + bytes_read); memcpy((char *)ret + length, buffer, bytes_read); length += bytes_read; } @@ -64,8 +63,8 @@ static void check_find_output(const BYTE *child_output, int child_output_len, co } /* Format strings for debug printing */ - child_output_copy = heap_alloc_zero(child_output_len * 4 + 1); - out_expected_copy = heap_alloc_zero(out_expected_len * 4 + 1); + child_output_copy = calloc(1, child_output_len * 4 + 1); + out_expected_copy = calloc(1, out_expected_len * 4 + 1); for (i = 0, pos = 0; i < child_output_len; i++) { @@ -97,8 +96,8 @@ static void check_find_output(const BYTE *child_output, int child_output_len, co "####################\n", out_expected_copy, child_output_copy); - heap_free(child_output_copy); - heap_free(out_expected_copy); + free(child_output_copy); + free(out_expected_copy); } static void mangle_text(const BYTE *input, int input_len, BYTE *output, int output_max, int *output_len) { @@ -176,7 +175,7 @@ static void run_find_stdin_(const WCHAR *commandline, const BYTE *input, int inp ok_(file, line)(exitcode == exitcode_expected, "Expected exitcode %d, got %ld\n", exitcode_expected, exitcode); - heap_free(child_output); + free(child_output); } static void run_find_file_(const WCHAR *commandline, const BYTE *input, int input_len, const BYTE *out_expected, int out_expected_len, int exitcode_expected, const char *file, int line) @@ -200,12 +199,12 @@ static void run_find_file_(const WCHAR *commandline, const BYTE *input, int inpu CharUpperA(path_temp_file); wsprintfA(header, "\r\n---------- %s\r\n", path_temp_file); header_len = lstrlenA(header); - out_expected_new = heap_alloc(header_len + out_expected_len); + out_expected_new = malloc(header_len + out_expected_len); memcpy(out_expected_new, header, header_len); memcpy(out_expected_new + header_len, out_expected, out_expected_len); run_find_stdin_(commandline_new, (BYTE*)"", 0, out_expected_new, header_len + out_expected_len, exitcode_expected, file, line); - heap_free(out_expected_new); + free(out_expected_new); DeleteFileA(path_temp_file); } @@ -223,14 +222,14 @@ static void run_find_str_(const char *commandline, const char *input, const char /* Turn commandline into WCHAR string */ len_commandlineW = MultiByteToWideChar(CP_UTF8, 0, commandline, -1, 0, 0); - commandlineW = heap_alloc(len_commandlineW * sizeof(WCHAR)); + commandlineW = malloc(len_commandlineW * sizeof(WCHAR)); MultiByteToWideChar(CP_UTF8, 0, commandline, -1, commandlineW, len_commandlineW); if (is_file) run_find_file_(commandlineW, (BYTE *)input, lstrlenA(input), (BYTE *)out_expected, lstrlenA(out_expected), exitcode_expected, file, line); else run_find_stdin_(commandlineW, (BYTE *)input, lstrlenA(input), (BYTE *)out_expected, lstrlenA(out_expected), exitcode_expected, file, line); - heap_free(commandlineW); + free(commandlineW); } #define run_find_stdin_unicode(input, out_expected, exitcode_expected) \
1
0
0
0
Bartosz Kosiorek : gdiplus: Add additional check to GdipSetPenTransform.
by Alexandre Julliard
30 Oct '23
30 Oct '23
Module: wine Branch: master Commit: caec1c249366723050f415d482528f444a57fdfe URL:
https://gitlab.winehq.org/wine/wine/-/commit/caec1c249366723050f415d482528f…
Author: Bartosz Kosiorek <gang65(a)poczta.onet.pl> Date: Sat Oct 28 19:51:19 2023 +0200 gdiplus: Add additional check to GdipSetPenTransform. --- dlls/gdiplus/pen.c | 6 +++++- dlls/gdiplus/tests/pen.c | 14 +++++++------- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/dlls/gdiplus/pen.c b/dlls/gdiplus/pen.c index fac31d6e84e..05acd54b36d 100644 --- a/dlls/gdiplus/pen.c +++ b/dlls/gdiplus/pen.c @@ -445,8 +445,9 @@ GpStatus WINGDIPAPI GdipResetPenTransform(GpPen *pen) GpStatus WINGDIPAPI GdipSetPenTransform(GpPen *pen, GpMatrix *matrix) { static int calls; + BOOL result; - TRACE("(%p,%s)\n", pen, debugstr_matrix(matrix)); + TRACE("(%p, %s)\n", pen, debugstr_matrix(matrix)); if(!pen || !matrix) return InvalidParameter; @@ -454,6 +455,9 @@ GpStatus WINGDIPAPI GdipSetPenTransform(GpPen *pen, GpMatrix *matrix) if(!(calls++)) FIXME("(%p,%p) Semi-stub\n", pen, matrix); + GdipIsMatrixInvertible(matrix, &result); + if (!result) + return InvalidParameter; pen->transform = *matrix; return Ok; diff --git a/dlls/gdiplus/tests/pen.c b/dlls/gdiplus/tests/pen.c index 1ac74123877..445f2dbb5b8 100644 --- a/dlls/gdiplus/tests/pen.c +++ b/dlls/gdiplus/tests/pen.c @@ -472,7 +472,7 @@ static void test_transform(void) GdipCreateMatrix2(3.0, 3.0, 2.0, 2.0, 6.0, 3.0, ¬_invertible_matrix); status = GdipSetPenTransform(pen, not_invertible_matrix); - todo_wine expect(InvalidParameter, status); + expect(InvalidParameter, status); GdipDeleteMatrix(not_invertible_matrix); status = GdipGetPenTransform(pen, matrix); @@ -480,12 +480,12 @@ static void test_transform(void) status = GdipGetMatrixElements(matrix, values); expect(Ok, status); - todo_wine expectf(1.0, values[0]); - todo_wine expectf(0.0, values[1]); - todo_wine expectf(0.0, values[2]); - todo_wine expectf(1.0, values[3]); - todo_wine expectf(0.0, values[4]); - todo_wine expectf(0.0, values[5]); + expectf(1.0, values[0]); + expectf(0.0, values[1]); + expectf(0.0, values[2]); + expectf(1.0, values[3]); + expectf(0.0, values[4]); + expectf(0.0, values[5]); /* Setting Pen Tranformation to invertible matrix, should be successfull */ GdipCreateMatrix2(3.0, -2.0, 5.0, 2.0, 6.0, 3.0, &matrix2);
1
0
0
0
Bartosz Kosiorek : gdiplus/tests: Add tests for GdipSetPenTransform.
by Alexandre Julliard
30 Oct '23
30 Oct '23
Module: wine Branch: master Commit: 04308954790c1a90065ce71b74a1ae3aaf4ed69d URL:
https://gitlab.winehq.org/wine/wine/-/commit/04308954790c1a90065ce71b74a1ae…
Author: Bartosz Kosiorek <gang65(a)poczta.onet.pl> Date: Sat Oct 28 19:51:55 2023 +0200 gdiplus/tests: Add tests for GdipSetPenTransform. --- dlls/gdiplus/tests/pen.c | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/dlls/gdiplus/tests/pen.c b/dlls/gdiplus/tests/pen.c index 874344e9c04..1ac74123877 100644 --- a/dlls/gdiplus/tests/pen.c +++ b/dlls/gdiplus/tests/pen.c @@ -445,9 +445,10 @@ static void test_transform(void) { GpStatus status; GpPen *pen; - GpMatrix *matrix, *matrix2; + GpMatrix *matrix, *matrix2, *not_invertible_matrix; REAL values[6]; + /* Check default Pen Transformation */ status = GdipCreatePen1((ARGB)0xffff00ff, 10.0f, UnitPixel, &pen); expect(Ok, status); @@ -467,6 +468,26 @@ static void test_transform(void) expectf(0.0, values[4]); expectf(0.0, values[5]); + /* Setting Pen Tranformation to Not invertible matrix, should return InvalidParameter */ + GdipCreateMatrix2(3.0, 3.0, 2.0, 2.0, 6.0, 3.0, ¬_invertible_matrix); + + status = GdipSetPenTransform(pen, not_invertible_matrix); + todo_wine expect(InvalidParameter, status); + GdipDeleteMatrix(not_invertible_matrix); + + status = GdipGetPenTransform(pen, matrix); + expect(Ok, status); + status = GdipGetMatrixElements(matrix, values); + expect(Ok, status); + + todo_wine expectf(1.0, values[0]); + todo_wine expectf(0.0, values[1]); + todo_wine expectf(0.0, values[2]); + todo_wine expectf(1.0, values[3]); + todo_wine expectf(0.0, values[4]); + todo_wine expectf(0.0, values[5]); + + /* Setting Pen Tranformation to invertible matrix, should be successfull */ GdipCreateMatrix2(3.0, -2.0, 5.0, 2.0, 6.0, 3.0, &matrix2); status = GdipSetPenTransform(pen, matrix2); expect(Ok, status);
1
0
0
0
Bartosz Kosiorek : gdiplus: Fix default tension for GdipAddPathCurve and GdipAddPathClosedCurve.
by Alexandre Julliard
30 Oct '23
30 Oct '23
Module: wine Branch: master Commit: 86cdcb6994389ad0a89c72001635e8aa6cd6bb80 URL:
https://gitlab.winehq.org/wine/wine/-/commit/86cdcb6994389ad0a89c72001635e8…
Author: Bartosz Kosiorek <gang65(a)poczta.onet.pl> Date: Fri Oct 27 18:11:16 2023 +0200 gdiplus: Fix default tension for GdipAddPathCurve and GdipAddPathClosedCurve. --- dlls/gdiplus/graphicspath.c | 8 ++++---- dlls/gdiplus/tests/graphicspath.c | 28 ++++++++++++++-------------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/dlls/gdiplus/graphicspath.c b/dlls/gdiplus/graphicspath.c index 54234ea0bd6..74fdfa6cf45 100644 --- a/dlls/gdiplus/graphicspath.c +++ b/dlls/gdiplus/graphicspath.c @@ -421,7 +421,7 @@ GpStatus WINGDIPAPI GdipAddPathClosedCurve(GpPath *path, GDIPCONST GpPointF *poi { TRACE("(%p, %p, %d)\n", path, points, count); - return GdipAddPathClosedCurve2(path, points, count, 1.0); + return GdipAddPathClosedCurve2(path, points, count, 0.5); } GpStatus WINGDIPAPI GdipAddPathClosedCurveI(GpPath *path, GDIPCONST GpPoint *points, @@ -429,7 +429,7 @@ GpStatus WINGDIPAPI GdipAddPathClosedCurveI(GpPath *path, GDIPCONST GpPoint *poi { TRACE("(%p, %p, %d)\n", path, points, count); - return GdipAddPathClosedCurve2I(path, points, count, 1.0); + return GdipAddPathClosedCurve2I(path, points, count, 0.5); } GpStatus WINGDIPAPI GdipAddPathClosedCurve2(GpPath *path, GDIPCONST GpPointF *points, @@ -537,7 +537,7 @@ GpStatus WINGDIPAPI GdipAddPathCurve(GpPath *path, GDIPCONST GpPointF *points, I if(!path || !points || count <= 1) return InvalidParameter; - return GdipAddPathCurve2(path, points, count, 1.0); + return GdipAddPathCurve2(path, points, count, 0.5); } GpStatus WINGDIPAPI GdipAddPathCurveI(GpPath *path, GDIPCONST GpPoint *points, INT count) @@ -547,7 +547,7 @@ GpStatus WINGDIPAPI GdipAddPathCurveI(GpPath *path, GDIPCONST GpPoint *points, I if(!path || !points || count <= 1) return InvalidParameter; - return GdipAddPathCurve2I(path, points, count, 1.0); + return GdipAddPathCurve2I(path, points, count, 0.5); } GpStatus WINGDIPAPI GdipAddPathCurve2(GpPath *path, GDIPCONST GpPointF *points, INT count, diff --git a/dlls/gdiplus/tests/graphicspath.c b/dlls/gdiplus/tests/graphicspath.c index 5e37d0a2f18..238305c3c24 100644 --- a/dlls/gdiplus/tests/graphicspath.c +++ b/dlls/gdiplus/tests/graphicspath.c @@ -921,14 +921,14 @@ static path_test_t addcurve_path[] = { }; static path_test_t addcurve_path_default_tension[] = { {0.0, 0.0, PathPointTypeStart, 0, 0}, /*0*/ - {1.66, 1.66, PathPointTypeBezier, 0, 1}, /*1*/ - {8.33, 6.66, PathPointTypeBezier, 0, 1}, /*2*/ + {1.66, 1.66, PathPointTypeBezier, 0, 0}, /*1*/ + {8.33, 6.66, PathPointTypeBezier, 0, 0}, /*2*/ {10.0, 10.0, PathPointTypeBezier, 0, 0}, /*3*/ - {11.6, 13.3, PathPointTypeBezier, 0, 1}, /*4*/ - {6.66, 20.0, PathPointTypeBezier, 0, 1}, /*5*/ + {11.6, 13.3, PathPointTypeBezier, 0, 0}, /*4*/ + {6.66, 20.0, PathPointTypeBezier, 0, 0}, /*5*/ {10.0, 20.0, PathPointTypeBezier, 0, 0}, /*6*/ - {13.3, 20.0, PathPointTypeBezier, 0, 1}, /*7*/ - {26.6, 11.6, PathPointTypeBezier, 0, 1}, /*8*/ + {13.3, 20.0, PathPointTypeBezier, 0, 0}, /*7*/ + {26.6, 11.6, PathPointTypeBezier, 0, 0}, /*8*/ {30.0, 10.0, PathPointTypeBezier, 0, 0} /*9*/ }; static path_test_t addcurve_path2[] = { @@ -1051,17 +1051,17 @@ static path_test_t addclosedcurve_path[] = { }; static path_test_t addclosedcurve_path_default_tension[] = { {0.0, 0.0, PathPointTypeStart, 0, 0}, /*0*/ - {-3.33, 0.0, PathPointTypeBezier, 0, 1}, /*1*/ - {8.33, 6.66, PathPointTypeBezier, 0, 1}, /*2*/ + {-3.33, 0.0, PathPointTypeBezier, 0, 0}, /*1*/ + {8.33, 6.66, PathPointTypeBezier, 0, 0}, /*2*/ {10.0, 10.0, PathPointTypeBezier, 0, 0}, /*3*/ - {11.6, 13.3, PathPointTypeBezier, 0, 1}, /*4*/ - {6.66, 20.0, PathPointTypeBezier, 0, 1}, /*5*/ + {11.6, 13.3, PathPointTypeBezier, 0, 0}, /*4*/ + {6.66, 20.0, PathPointTypeBezier, 0, 0}, /*5*/ {10.0, 20.0, PathPointTypeBezier, 0, 0}, /*6*/ - {13.3, 20.0, PathPointTypeBezier, 0, 1}, /*7*/ - {31.6, 13.3, PathPointTypeBezier, 0, 1}, /*8*/ + {13.3, 20.0, PathPointTypeBezier, 0, 0}, /*7*/ + {31.6, 13.3, PathPointTypeBezier, 0, 0}, /*8*/ {30.0, 10.0, PathPointTypeBezier, 0, 0}, /*9*/ - {28.3, 6.66, PathPointTypeBezier, 0, 1}, /*10*/ - {3.33, 0.0, PathPointTypeBezier, 0, 1}, /*11*/ + {28.3, 6.66, PathPointTypeBezier, 0, 0}, /*10*/ + {3.33, 0.0, PathPointTypeBezier, 0, 0}, /*11*/ {0.0, 0.0, PathPointTypeBezier | PathPointTypeCloseSubpath, 0, 0} /*12*/ }; static void test_addclosedcurve(void)
1
0
0
0
← Newer
1
...
7
8
9
10
11
12
13
...
71
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
Results per page:
10
25
50
100
200