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
March 2022
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
2 participants
1138 discussions
Start a n
N
ew thread
Alexandre Julliard : ntdll: Support UTF-8 codepage in RtlInitCodePageTable().
by Alexandre Julliard
23 Mar '22
23 Mar '22
Module: wine Branch: master Commit: b5561c8bba9a613c53ae4669c4adb7450e5f458d URL:
https://source.winehq.org/git/wine.git/?a=commit;h=b5561c8bba9a613c53ae4669…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Mar 23 11:02:57 2022 +0100 ntdll: Support UTF-8 codepage in RtlInitCodePageTable(). Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/kernel32/tests/locale.c | 25 +++++++++++++++++++++++++ dlls/ntdll/locale.c | 7 +++++++ 2 files changed, 32 insertions(+) diff --git a/dlls/kernel32/tests/locale.c b/dlls/kernel32/tests/locale.c index c910c348d45..2bc368c8bc1 100644 --- a/dlls/kernel32/tests/locale.c +++ b/dlls/kernel32/tests/locale.c @@ -4212,6 +4212,31 @@ static void test_GetCPInfo(void) ret = UnmapViewOfFile( ptr ); ok( ret, "UnmapViewOfFile failed err %lu\n", GetLastError() ); + status = pNtGetNlsSectionPtr( 11, 65001, NULL, &ptr, &size ); + ok( status == STATUS_OBJECT_NAME_NOT_FOUND, "failed %lx\n", status ); + if (pRtlInitCodePageTable) + { + static USHORT utf8[20] = { 0, CP_UTF8 }; + + memset( &table, 0xcc, sizeof(table) ); + pRtlInitCodePageTable( utf8, &table ); + ok( table.CodePage == CP_UTF8, "wrong codepage %u\n", table.CodePage ); + if (table.MaximumCharacterSize) + { + ok( table.MaximumCharacterSize == 4, "wrong char size %u\n", table.MaximumCharacterSize ); + ok( table.DefaultChar == '?', "wrong default char %x\n", table.DefaultChar ); + ok( table.UniDefaultChar == 0xfffd, "wrong default char %x\n", table.UniDefaultChar ); + ok( table.TransDefaultChar == '?', "wrong default char %x\n", table.TransDefaultChar ); + ok( table.TransUniDefaultChar == '?', "wrong default char %x\n", table.TransUniDefaultChar ); + ok( !table.DBCSCodePage, "wrong dbcs %u\n", table.DBCSCodePage ); + ok( !table.MultiByteTable, "wrong mbtable %p\n", table.MultiByteTable ); + ok( !table.WideCharTable, "wrong wctable %p\n", table.WideCharTable ); + ok( !table.DBCSRanges, "wrong ranges %p\n", table.DBCSRanges ); + ok( !table.DBCSOffsets, "wrong offsets %p\n", table.DBCSOffsets ); + } + else win_skip( "utf-8 codepage not supported\n" ); + } + /* normalization tables */ for (i = 0; i < 100; i++) diff --git a/dlls/ntdll/locale.c b/dlls/ntdll/locale.c index b4a14c0d68f..74c395cbd85 100644 --- a/dlls/ntdll/locale.c +++ b/dlls/ntdll/locale.c @@ -745,6 +745,13 @@ void WINAPI RtlInitCodePageTable( USHORT *ptr, CPTABLEINFO *info ) { USHORT hdr_size = ptr[0]; + if (ptr[1] == CP_UTF8) + { + static const CPTABLEINFO utf8_cpinfo = { CP_UTF8, 4, '?', 0xfffd, '?', '?' }; + *info = utf8_cpinfo; + return; + } + info->CodePage = ptr[1]; info->MaximumCharacterSize = ptr[2]; info->DefaultChar = ptr[3];
1
0
0
0
Alexandre Julliard : ntdll: Move user/system locale initialization to ntdll.
by Alexandre Julliard
23 Mar '22
23 Mar '22
Module: wine Branch: master Commit: 8ccb24b15162e15ad3bad993c8800365d02714fe URL:
https://source.winehq.org/git/wine.git/?a=commit;h=8ccb24b15162e15ad3bad993…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Mar 23 11:02:19 2022 +0100 ntdll: Move user/system locale initialization to ntdll. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/kernelbase/locale.c | 34 ++-------------------------------- dlls/ntdll/locale.c | 24 +++++++++++++++++++++++- 2 files changed, 25 insertions(+), 33 deletions(-) diff --git a/dlls/kernelbase/locale.c b/dlls/kernelbase/locale.c index 2f2154a0e7c..9ef8fbe8f44 100644 --- a/dlls/kernelbase/locale.c +++ b/dlls/kernelbase/locale.c @@ -699,27 +699,6 @@ done: } -static LCID locale_to_lcid( WCHAR *win_name ) -{ - WCHAR *p; - LCID lcid; - - if (!RtlLocaleNameToLcid( win_name, &lcid, 0 )) return lcid; - - /* try neutral name */ - if ((p = wcsrchr( win_name, '-' ))) - { - *p = 0; - if (!RtlLocaleNameToLcid( win_name, &lcid, 2 )) - { - if (SUBLANGID(lcid) == SUBLANG_NEUTRAL) - lcid = MAKELANGID( PRIMARYLANGID(lcid), SUBLANG_DEFAULT ); - return lcid; - } - } - return 0; -} - /*********************************************************************** * init_locale */ @@ -728,7 +707,7 @@ void init_locale(void) UINT ansi_cp = 0, oem_cp = 0; USHORT *ansi_ptr, *oem_ptr; void *sort_ptr; - LCID user_lcid = 0, system_lcid = 0; + LCID user_lcid; WCHAR bufferW[LOCALE_NAME_MAX_LENGTH]; DYNAMIC_TIME_ZONE_INFORMATION timezone; GEOID geoid = GEOID_NOT_AVAILABLE; @@ -738,16 +717,6 @@ void init_locale(void) if (GetEnvironmentVariableW( L"WINEUNIXCP", bufferW, ARRAY_SIZE(bufferW) )) unix_cp = wcstoul( bufferW, NULL, 10 ); - if (GetEnvironmentVariableW( L"WINELOCALE", bufferW, ARRAY_SIZE(bufferW) )) - system_lcid = locale_to_lcid( bufferW ); - if (GetEnvironmentVariableW( L"WINEUSERLOCALE", bufferW, ARRAY_SIZE(bufferW) )) - user_lcid = locale_to_lcid( bufferW ); - if (!system_lcid) system_lcid = MAKELCID( MAKELANGID(LANG_ENGLISH,SUBLANG_DEFAULT), SORT_DEFAULT ); - if (!user_lcid) user_lcid = system_lcid; - - NtSetDefaultUILanguage( LANGIDFROMLCID(user_lcid) ); - NtSetDefaultLocale( TRUE, user_lcid ); - NtSetDefaultLocale( FALSE, system_lcid ); kernel32_handle = GetModuleHandleW( L"kernel32.dll" ); @@ -806,6 +775,7 @@ void init_locale(void) /* Update registry contents if the user locale has changed. * This simulates the action of the Windows control panel. */ + user_lcid = GetUserDefaultLCID(); count = sizeof(bufferW); if (!RegQueryValueExW( intl_key, L"Locale", NULL, NULL, (BYTE *)bufferW, &count )) { diff --git a/dlls/ntdll/locale.c b/dlls/ntdll/locale.c index 158f068b03d..b4a14c0d68f 100644 --- a/dlls/ntdll/locale.c +++ b/dlls/ntdll/locale.c @@ -273,8 +273,10 @@ static const NLS_LOCALE_DATA *get_locale_data( UINT idx ) void locale_init(void) { + WCHAR locale[LOCALE_NAME_MAX_LENGTH]; + UNICODE_STRING name, value; LARGE_INTEGER unused; - LCID system_lcid; + LCID system_lcid, user_lcid = 0; NTSTATUS status; struct { @@ -298,6 +300,26 @@ void locale_init(void) lcids_index = (const NLS_LOCALE_LCID_INDEX *)((char *)locale_table + locale_table->lcids_offset); lcnames_index = (const NLS_LOCALE_LCNAME_INDEX *)((char *)locale_table + locale_table->lcnames_offset); locale_strings = (const WCHAR *)((char *)locale_table + locale_table->strings_offset); + + value.Buffer = locale; + value.MaximumLength = sizeof(locale); + RtlInitUnicodeString( &name, L"WINELOCALE" ); + if (!RtlQueryEnvironmentVariable_U( NULL, &name, &value )) + { + const NLS_LOCALE_LCNAME_INDEX *entry = find_lcname_entry( locale ); + if (entry) system_lcid = get_locale_data( entry->idx )->idefaultlanguage; + } + RtlInitUnicodeString( &name, L"WINEUSERLOCALE" ); + if (!RtlQueryEnvironmentVariable_U( NULL, &name, &value )) + { + const NLS_LOCALE_LCNAME_INDEX *entry = find_lcname_entry( locale ); + if (entry) user_lcid = get_locale_data( entry->idx )->idefaultlanguage; + } + if (!system_lcid) system_lcid = MAKELANGID( LANG_ENGLISH, SUBLANG_DEFAULT ); + if (!user_lcid) user_lcid = system_lcid; + NtSetDefaultUILanguage( user_lcid ); + NtSetDefaultLocale( TRUE, user_lcid ); + NtSetDefaultLocale( FALSE, system_lcid ); }
1
0
0
0
Eric Pouech : ntdll/tests: Enable compilation with long types in rtl.c.
by Alexandre Julliard
23 Mar '22
23 Mar '22
Module: wine Branch: master Commit: d66d642d74846d5d04abe31286c8e424b91ba741 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=d66d642d74846d5d04abe312…
Author: Eric Pouech <eric.pouech(a)gmail.com> Date: Wed Mar 23 08:13:32 2022 +0100 ntdll/tests: Enable compilation with long types in rtl.c. Signed-off-by: Eric Pouech <eric.pouech(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/tests/rtl.c | 543 +++++++++++++++++++++++++------------------------ 1 file changed, 272 insertions(+), 271 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=d66d642d74846d5d04ab…
1
0
0
0
Eric Pouech : ntdll/tests: Enable compilation with long types in rtlstr.c.
by Alexandre Julliard
23 Mar '22
23 Mar '22
Module: wine Branch: master Commit: baf08a0d04bcffedf553d302eba17dada01b2026 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=baf08a0d04bcffedf553d302…
Author: Eric Pouech <eric.pouech(a)gmail.com> Date: Wed Mar 23 08:13:40 2022 +0100 ntdll/tests: Enable compilation with long types in rtlstr.c. Signed-off-by: Eric Pouech <eric.pouech(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/tests/rtlstr.c | 265 +++++++++++++++++++++++----------------------- 1 file changed, 133 insertions(+), 132 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=baf08a0d04bcffedf553…
1
0
0
0
Eric Pouech : ntdll/tests: Enable compilation with long types in sync.c.
by Alexandre Julliard
23 Mar '22
23 Mar '22
Module: wine Branch: master Commit: efd4e097291986d51b46bb744f4d53d755eeb4b2 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=efd4e097291986d51b46bb74…
Author: Eric Pouech <eric.pouech(a)gmail.com> Date: Wed Mar 23 08:13:47 2022 +0100 ntdll/tests: Enable compilation with long types in sync.c. Signed-off-by: Eric Pouech <eric.pouech(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/tests/sync.c | 291 ++++++++++++++++++++++++------------------------ 1 file changed, 146 insertions(+), 145 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=efd4e097291986d51b46…
1
0
0
0
Eric Pouech : ntdll/tests: Enable compilation with long types in rtlbitmap.c.
by Alexandre Julliard
23 Mar '22
23 Mar '22
Module: wine Branch: master Commit: b4b75634d60704faf183c097c7dbf2a3c689c4dd URL:
https://source.winehq.org/git/wine.git/?a=commit;h=b4b75634d60704faf183c097…
Author: Eric Pouech <eric.pouech(a)gmail.com> Date: Wed Mar 23 08:13:37 2022 +0100 ntdll/tests: Enable compilation with long types in rtlbitmap.c. Signed-off-by: Eric Pouech <eric.pouech(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/tests/rtlbitmap.c | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/dlls/ntdll/tests/rtlbitmap.c b/dlls/ntdll/tests/rtlbitmap.c index 3c3992e8fc9..7cb046a105a 100644 --- a/dlls/ntdll/tests/rtlbitmap.c +++ b/dlls/ntdll/tests/rtlbitmap.c @@ -20,6 +20,7 @@ * We use function pointers here as some of the bitmap functions exist only * in later versions of ntdll. */ +#undef WINE_NO_LONG_TYPES /* temporary for migration */ #include "ntdll_test.h" @@ -501,7 +502,7 @@ static void test_RtlFindSetRuns(void) /* Get first 2 */ ulCount = pRtlFindSetRuns(&bm, runs, 2, FALSE); - ok(ulCount == 2, "RtlFindClearRuns returned %d, expected 2\n", ulCount); + ok(ulCount == 2, "RtlFindClearRuns returned %ld, expected 2\n", ulCount); ok (runs[0].StartingIndex == 7 || runs[0].StartingIndex == 101,"bad find\n"); ok (runs[1].StartingIndex == 7 || runs[1].StartingIndex == 101,"bad find\n"); ok (runs[0].NumberOfBits + runs[1].NumberOfBits == 19 + 3,"bad size\n"); @@ -511,7 +512,7 @@ static void test_RtlFindSetRuns(void) /* Get longest 3 */ memset(runs, 0, sizeof(runs)); ulCount = pRtlFindSetRuns(&bm, runs, 2, TRUE); - ok(ulCount == 2, "RtlFindClearRuns returned %d, expected 2\n", ulCount); + ok(ulCount == 2, "RtlFindClearRuns returned %ld, expected 2\n", ulCount); ok (runs[0].StartingIndex == 7 || runs[0].StartingIndex == 1877,"bad find\n"); ok (runs[1].StartingIndex == 7 || runs[1].StartingIndex == 1877,"bad find\n"); ok (runs[0].NumberOfBits + runs[1].NumberOfBits == 33 + 19,"bad size\n"); @@ -521,7 +522,7 @@ static void test_RtlFindSetRuns(void) /* Get all 3 */ memset(runs, 0, sizeof(runs)); ulCount = pRtlFindSetRuns(&bm, runs, 3, TRUE); - ok(ulCount == 3, "RtlFindClearRuns returned %d, expected 3\n", ulCount); + ok(ulCount == 3, "RtlFindClearRuns returned %ld, expected 3\n", ulCount); ok (runs[0].StartingIndex == 7 || runs[0].StartingIndex == 101 || runs[0].StartingIndex == 1877,"bad find\n"); ok (runs[1].StartingIndex == 7 || runs[1].StartingIndex == 101 || @@ -539,7 +540,7 @@ static void test_RtlFindSetRuns(void) ULONG ulStart = 0; ulCount = pRtlFindLongestRunSet(&bm, &ulStart); - ok(ulCount == 33 && ulStart == 1877,"didn't find longest %d %d\n",ulCount,ulStart); + ok(ulCount == 33 && ulStart == 1877,"didn't find longest %ld %ld\n",ulCount,ulStart); memset(buff, 0, sizeof(buff)); ulCount = pRtlFindLongestRunSet(&bm, &ulStart); @@ -578,7 +579,7 @@ static void test_RtlFindClearRuns(void) /* Get first 2 */ ulCount = pRtlFindClearRuns(&bm, runs, 2, FALSE); - ok(ulCount == 2, "RtlFindClearRuns returned %d, expected 2\n", ulCount); + ok(ulCount == 2, "RtlFindClearRuns returned %ld, expected 2\n", ulCount); ok (runs[0].StartingIndex == 7 || runs[0].StartingIndex == 101,"bad find\n"); ok (runs[1].StartingIndex == 7 || runs[1].StartingIndex == 101,"bad find\n"); ok (runs[0].NumberOfBits + runs[1].NumberOfBits == 19 + 3,"bad size\n"); @@ -588,7 +589,7 @@ static void test_RtlFindClearRuns(void) /* Get longest 3 */ memset(runs, 0, sizeof(runs)); ulCount = pRtlFindClearRuns(&bm, runs, 2, TRUE); - ok(ulCount == 2, "RtlFindClearRuns returned %d, expected 2\n", ulCount); + ok(ulCount == 2, "RtlFindClearRuns returned %ld, expected 2\n", ulCount); ok (runs[0].StartingIndex == 7 || runs[0].StartingIndex == 1877,"bad find\n"); ok (runs[1].StartingIndex == 7 || runs[1].StartingIndex == 1877,"bad find\n"); ok (runs[0].NumberOfBits + runs[1].NumberOfBits == 33 + 19,"bad size\n"); @@ -598,7 +599,7 @@ static void test_RtlFindClearRuns(void) /* Get all 3 */ memset(runs, 0, sizeof(runs)); ulCount = pRtlFindClearRuns(&bm, runs, 3, TRUE); - ok(ulCount == 3, "RtlFindClearRuns returned %d, expected 3\n", ulCount); + ok(ulCount == 3, "RtlFindClearRuns returned %ld, expected 3\n", ulCount); ok (runs[0].StartingIndex == 7 || runs[0].StartingIndex == 101 || runs[0].StartingIndex == 1877,"bad find\n"); ok (runs[1].StartingIndex == 7 || runs[1].StartingIndex == 101 || @@ -635,8 +636,8 @@ static void test_RtlFindNextForwardRunSet(void) pRtlInitializeBitMap(&bm, mask, 62); ulCount = pRtlFindNextForwardRunSet(&bm, ulStart, &lpPos); - ok(ulCount == 6, "Invalid length of found set run: %d, expected 6\n", ulCount); - ok(lpPos == 56, "Invalid position of found set run: %d, expected 56\n", lpPos); + ok(ulCount == 6, "Invalid length of found set run: %ld, expected 6\n", ulCount); + ok(lpPos == 56, "Invalid position of found set run: %ld, expected 56\n", lpPos); } static void test_RtlFindNextForwardRunClear(void) @@ -649,8 +650,8 @@ static void test_RtlFindNextForwardRunClear(void) pRtlInitializeBitMap(&bm, mask, 62); ulCount = pRtlFindNextForwardRunClear(&bm, ulStart, &lpPos); - ok(ulCount == 6, "Invalid length of found clear run: %d, expected 6\n", ulCount); - ok(lpPos == 56, "Invalid position of found clear run: %d, expected 56\n", lpPos); + ok(ulCount == 6, "Invalid length of found clear run: %ld, expected 6\n", ulCount); + ok(lpPos == 56, "Invalid position of found clear run: %ld, expected 56\n", lpPos); } #endif
1
0
0
0
Eric Pouech : ntdll/tests: Enable compilation with long types in string.c.
by Alexandre Julliard
23 Mar '22
23 Mar '22
Module: wine Branch: master Commit: 4eded62d2a26a99ded2514666f685d3bea7c4dde URL:
https://source.winehq.org/git/wine.git/?a=commit;h=4eded62d2a26a99ded251466…
Author: Eric Pouech <eric.pouech(a)gmail.com> Date: Wed Mar 23 08:13:44 2022 +0100 ntdll/tests: Enable compilation with long types in string.c. Signed-off-by: Eric Pouech <eric.pouech(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/tests/string.c | 47 ++++++++++++++++++++++++----------------------- 1 file changed, 24 insertions(+), 23 deletions(-) diff --git a/dlls/ntdll/tests/string.c b/dlls/ntdll/tests/string.c index 6939dd3c15e..eabbe86792b 100644 --- a/dlls/ntdll/tests/string.c +++ b/dlls/ntdll/tests/string.c @@ -20,6 +20,7 @@ * We use function pointers here as there is no import library for NTDLL on * windows. */ +#undef WINE_NO_LONG_TYPES /* temporary for migration */ #include <stdlib.h> #include <limits.h> @@ -308,10 +309,10 @@ static void one_ltoa_test(int test_num, const ulong2str_t *ulong2str) value = ulong2str->value; result = p_ltoa(ulong2str->value, dest_str, ulong2str->base); ok(result == dest_str, - "(test %d): _ltoa(%d, [out], %d) has result %p, expected: %p\n", + "(test %d): _ltoa(%ld, [out], %d) has result %p, expected: %p\n", test_num, value, ulong2str->base, result, dest_str); ok(memcmp(dest_str, ulong2str->Buffer, LARGE_STRI_BUFFER_LENGTH) == 0, - "(test %d): _ltoa(%d, [out], %d) assigns string \"%s\", expected: \"%s\"\n", + "(test %d): _ltoa(%ld, [out], %d) assigns string \"%s\", expected: \"%s\"\n", test_num, value, ulong2str->base, dest_str, ulong2str->Buffer); } @@ -327,10 +328,10 @@ static void one_ultoa_test(int test_num, const ulong2str_t *ulong2str) value = ulong2str->value; result = p_ultoa(ulong2str->value, dest_str, ulong2str->base); ok(result == dest_str, - "(test %d): _ultoa(%u, [out], %d) has result %p, expected: %p\n", + "(test %d): _ultoa(%lu, [out], %d) has result %p, expected: %p\n", test_num, value, ulong2str->base, result, dest_str); ok(memcmp(dest_str, ulong2str->Buffer, LARGE_STRI_BUFFER_LENGTH) == 0, - "(test %d): _ultoa(%u, [out], %d) assigns string \"%s\", expected: \"%s\"\n", + "(test %d): _ultoa(%lu, [out], %d) assigns string \"%s\", expected: \"%s\"\n", test_num, value, ulong2str->base, dest_str, ulong2str->Buffer); } @@ -415,10 +416,10 @@ static void one_ltow_test(int test_num, const ulong2str_t *ulong2str) result = p_ltow(value, dest_wstr, ulong2str->base); pRtlUnicodeStringToAnsiString(&ansi_str, &unicode_string, 1); ok(result == dest_wstr, - "(test %d): _ltow(%d, [out], %d) has result %p, expected: %p\n", + "(test %d): _ltow(%ld, [out], %d) has result %p, expected: %p\n", test_num, value, ulong2str->base, result, dest_wstr); ok(memcmp(dest_wstr, expected_wstr, LARGE_STRI_BUFFER_LENGTH * sizeof(WCHAR)) == 0, - "(test %d): _ltow(%d, [out], %d) assigns string \"%s\", expected: \"%s\"\n", + "(test %d): _ltow(%ld, [out], %d) assigns string \"%s\", expected: \"%s\"\n", test_num, value, ulong2str->base, ansi_str.Buffer, ulong2str->Buffer); pRtlFreeAnsiString(&ansi_str); } @@ -451,10 +452,10 @@ static void one_ultow_test(int test_num, const ulong2str_t *ulong2str) result = p_ultow(value, dest_wstr, ulong2str->base); pRtlUnicodeStringToAnsiString(&ansi_str, &unicode_string, 1); ok(result == dest_wstr, - "(test %d): _ultow(%u, [out], %d) has result %p, expected: %p\n", + "(test %d): _ultow(%lu, [out], %d) has result %p, expected: %p\n", test_num, value, ulong2str->base, result, dest_wstr); ok(memcmp(dest_wstr, expected_wstr, LARGE_STRI_BUFFER_LENGTH * sizeof(WCHAR)) == 0, - "(test %d): _ultow(%u, [out], %d) assigns string \"%s\", expected: \"%s\"\n", + "(test %d): _ultow(%lu, [out], %d) assigns string \"%s\", expected: \"%s\"\n", test_num, value, ulong2str->base, ansi_str.Buffer, ulong2str->Buffer); pRtlFreeAnsiString(&ansi_str); } @@ -481,7 +482,7 @@ static void test_ulongtow(void) /* Crashes on XP and W2K3 */ result = p_itow(ulong2str[0].value, NULL, 10); ok(result == NULL, - "(test a): _itow(%d, NULL, 10) has result %p, expected: NULL\n", + "(test a): _itow(%ld, NULL, 10) has result %p, expected: NULL\n", ulong2str[0].value, result); } @@ -489,7 +490,7 @@ static void test_ulongtow(void) /* Crashes on XP and W2K3 */ result = p_ltow(ulong2str[0].value, NULL, 10); ok(result == NULL, - "(test b): _ltow(%d, NULL, 10) has result %p, expected: NULL\n", + "(test b): _ltow(%ld, NULL, 10) has result %p, expected: NULL\n", ulong2str[0].value, result); } @@ -497,7 +498,7 @@ static void test_ulongtow(void) /* Crashes on XP and W2K3 */ result = p_ultow(ulong2str[0].value, NULL, 10); ok(result == NULL, - "(test c): _ultow(%d, NULL, 10) has result %p, expected: NULL\n", + "(test c): _ultow(%ld, NULL, 10) has result %p, expected: NULL\n", ulong2str[0].value, result); } } @@ -959,7 +960,7 @@ static void test_wtoi(void) pRtlCreateUnicodeStringFromAsciiz(&uni, str2long[test_num].str); result = p_wtoi(uni.Buffer); ok(result == str2long[test_num].value, - "(test %d): call failed: _wtoi(\"%s\") has result %d, expected: %d\n", + "(test %d): call failed: _wtoi(\"%s\") has result %d, expected: %ld\n", test_num, str2long[test_num].str, result, str2long[test_num].value); pRtlFreeUnicodeString(&uni); } /* for */ @@ -973,7 +974,7 @@ static void test_atoi(void) for (test_num = 0; test_num < ARRAY_SIZE(str2long); test_num++) { result = patoi(str2long[test_num].str); ok(result == str2long[test_num].value, - "(test %d): call failed: _atoi(\"%s\") has result %d, expected: %d\n", + "(test %d): call failed: _atoi(\"%s\") has result %d, expected: %ld\n", test_num, str2long[test_num].str, result, str2long[test_num].value); } } @@ -986,7 +987,7 @@ static void test_atol(void) for (test_num = 0; test_num < ARRAY_SIZE(str2long); test_num++) { result = patol(str2long[test_num].str); ok(result == str2long[test_num].value, - "(test %d): call failed: _atol(\"%s\") has result %d, expected: %d\n", + "(test %d): call failed: _atol(\"%s\") has result %d, expected: %ld\n", test_num, str2long[test_num].str, result, str2long[test_num].value); } } @@ -1001,14 +1002,14 @@ static void test_wtol(void) pRtlCreateUnicodeStringFromAsciiz(&uni, str2long[test_num].str); result = p_wtol(uni.Buffer); ok(result == str2long[test_num].value, - "(test %d): call failed: _wtol(\"%s\") has result %d, expected: %d\n", + "(test %d): call failed: _wtol(\"%s\") has result %ld, expected: %ld\n", test_num, str2long[test_num].str, result, str2long[test_num].value); pRtlFreeUnicodeString(&uni); } result = p_wtol( L"\t\xa0\n 12" ); - ok( result == 12, "got %d\n", result ); + ok( result == 12, "got %ld\n", result ); result = p_wtol( L"\x3000 12" ); - ok( result == 0, "got %d\n", result ); + ok( result == 0, "got %ld\n", result ); } @@ -1231,10 +1232,10 @@ static void test_wcstol(void) for (i = 0; i < ARRAY_SIZE(tests); i++) { res = pwcstol( tests[i].str, &endpos, tests[i].base ); - ok( res == tests[i].res, "%u: %s res %08x\n", i, wine_dbgstr_w(tests[i].str), res ); + ok( res == tests[i].res, "%u: %s res %08lx\n", i, wine_dbgstr_w(tests[i].str), res ); if (!res) ok( endpos == tests[i].str, "%u: wrong endpos %p/%p\n", i, endpos, tests[i].str ); ures = pwcstoul( tests[i].str, &endpos, tests[i].base ); - ok( ures == tests[i].ures, "%u: %s res %08x\n", i, wine_dbgstr_w(tests[i].str), ures ); + ok( ures == tests[i].ures, "%u: %s res %08lx\n", i, wine_dbgstr_w(tests[i].str), ures ); } /* Test various unicode digits */ @@ -1242,14 +1243,14 @@ static void test_wcstol(void) { WCHAR tmp[] = { zeros[i] + 4, zeros[i], zeros[i] + 5, 0 }; res = pwcstol(tmp, NULL, 0); - ok(res == 405, "with zero = U+%04X: got %d, expected 405\n", zeros[i], res); + ok(res == 405, "with zero = U+%04X: got %ld, expected 405\n", zeros[i], res); ures = pwcstoul(tmp, NULL, 0); - ok(ures == 405, "with zero = U+%04X: got %u, expected 405\n", zeros[i], ures); + ok(ures == 405, "with zero = U+%04X: got %lu, expected 405\n", zeros[i], ures); tmp[1] = zeros[i] + 10; res = pwcstol(tmp, NULL, 16); - ok(res == 4, "with zero = U+%04X: got %d, expected 4\n", zeros[i], res); + ok(res == 4, "with zero = U+%04X: got %ld, expected 4\n", zeros[i], res); ures = pwcstoul(tmp, NULL, 16); - ok(ures == 4, "with zero = U+%04X: got %u, expected 4\n", zeros[i], ures); + ok(ures == 4, "with zero = U+%04X: got %lu, expected 4\n", zeros[i], ures); } }
1
0
0
0
Paul Gofman : iphlpapi: Don't request redundant static data in get_extended_tcp_table().
by Alexandre Julliard
23 Mar '22
23 Mar '22
Module: wine Branch: master Commit: 3c19c54aa0016e2bfcc17a3f2f2b460e2f2d063b URL:
https://source.winehq.org/git/wine.git/?a=commit;h=3c19c54aa0016e2bfcc17a3f…
Author: Paul Gofman <pgofman(a)codeweavers.com> Date: Wed Mar 23 09:07:25 2022 +0000 iphlpapi: Don't request redundant static data in get_extended_tcp_table(). Signed-off-by: Paul Gofman <pgofman(a)codeweavers.com> Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/iphlpapi/iphlpapi_main.c | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/dlls/iphlpapi/iphlpapi_main.c b/dlls/iphlpapi/iphlpapi_main.c index 041e712f44f..afc400d26c1 100644 --- a/dlls/iphlpapi/iphlpapi_main.c +++ b/dlls/iphlpapi/iphlpapi_main.c @@ -3082,6 +3082,19 @@ static int tcp6_row_owner_cmp( const void *a, const void *b ) return RtlUshortByteSwap( rowA->dwRemotePort ) - RtlUshortByteSwap( rowB->dwRemotePort ); } +static BOOL tcp_table_needs_pids( ULONG table_class ) +{ + switch (table_class) + { + case TCP_TABLE_BASIC_LISTENER: + case TCP_TABLE_BASIC_CONNECTIONS: + case TCP_TABLE_BASIC_ALL: + return FALSE; + + } + return TRUE; +} + /************************************************************************************* * get_extended_tcp_table * @@ -3093,13 +3106,19 @@ static DWORD get_extended_tcp_table( void *table, DWORD *size, BOOL sort, ULONG DWORD err, count, needed, i, num = 0, row_size = 0; struct nsi_tcp_conn_key *key; struct nsi_tcp_conn_dynamic *dyn; - struct nsi_tcp_conn_static *stat; + struct nsi_tcp_conn_static *stat = NULL; if (!size) return ERROR_INVALID_PARAMETER; - err = NsiAllocateAndGetTable( 1, &NPI_MS_TCP_MODULEID, tcp_table_id( table_class ), (void **)&key, sizeof(*key), - NULL, 0, (void **)&dyn, sizeof(*dyn), - (void **)&stat, sizeof(*stat), &count, 0 ); + if (tcp_table_needs_pids( table_class )) + err = NsiAllocateAndGetTable( 1, &NPI_MS_TCP_MODULEID, tcp_table_id( table_class ), (void **)&key, sizeof(*key), + NULL, 0, (void **)&dyn, sizeof(*dyn), + (void **)&stat, sizeof(*stat), &count, 0 ); + else /* Don't retrieve the static data if not required as this is expensive to compute */ + err = NsiAllocateAndGetTable( 1, &NPI_MS_TCP_MODULEID, tcp_table_id( table_class ), (void **)&key, sizeof(*key), + NULL, 0, (void **)&dyn, sizeof(*dyn), + NULL, 0, &count, 0 ); + if (err) return err; for (i = 0; i < count; i++)
1
0
0
0
Paul Gofman : nsiproxy: Avoid redundant pid mapping in tcp_conns_enumerate_all().
by Alexandre Julliard
23 Mar '22
23 Mar '22
Module: wine Branch: master Commit: 6ba4c31e9d9033a1477df94149b31d531cff7327 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=6ba4c31e9d9033a1477df941…
Author: Paul Gofman <pgofman(a)codeweavers.com> Date: Wed Mar 23 09:07:24 2022 +0000 nsiproxy: Avoid redundant pid mapping in tcp_conns_enumerate_all(). Signed-off-by: Paul Gofman <pgofman(a)codeweavers.com> Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/nsiproxy.sys/tcp.c | 41 +++++++++++++++++++++++------------------ 1 file changed, 23 insertions(+), 18 deletions(-) diff --git a/dlls/nsiproxy.sys/tcp.c b/dlls/nsiproxy.sys/tcp.c index 0cd81ae86e5..491ac797100 100644 --- a/dlls/nsiproxy.sys/tcp.c +++ b/dlls/nsiproxy.sys/tcp.c @@ -540,7 +540,7 @@ static NTSTATUS tcp_conns_enumerate_all( DWORD filter, struct nsi_tcp_conn_key * memset( &key, 0, sizeof(key) ); memset( &dyn, 0, sizeof(dyn) ); memset( &stat, 0, sizeof(stat) ); - pid_map = get_pid_map( &pid_map_size ); + if (static_data) pid_map = get_pid_map( &pid_map_size ); /* skip header line */ ptr = fgets( buf, sizeof(buf), fp ); @@ -558,15 +558,17 @@ static NTSTATUS tcp_conns_enumerate_all( DWORD filter, struct nsi_tcp_conn_key * key.local.Ipv4.sin_port = htons( key.local.Ipv4.sin_port ); key.remote.Ipv4.sin_port = htons( key.remote.Ipv4.sin_port ); - stat.pid = find_owning_pid( pid_map, pid_map_size, inode ); - stat.create_time = 0; /* FIXME */ - stat.mod_info = 0; /* FIXME */ - if (num < *count) { if (key_data) *key_data++ = key; if (dynamic_data) *dynamic_data++ = dyn; - if (static_data) *static_data++ = stat; + if (static_data) + { + stat.pid = find_owning_pid( pid_map, pid_map_size, inode ); + stat.create_time = 0; /* FIXME */ + stat.mod_info = 0; /* FIXME */ + *static_data++ = stat; + } } num++; } @@ -601,16 +603,17 @@ static NTSTATUS tcp_conns_enumerate_all( DWORD filter, struct nsi_tcp_conn_key * addr_scopes_size ); key.remote.Ipv6.sin6_scope_id = find_ipv6_addr_scope( &key.remote.Ipv6.sin6_addr, addr_scopes, addr_scopes_size ); - - stat.pid = find_owning_pid( pid_map, pid_map_size, inode ); - stat.create_time = 0; /* FIXME */ - stat.mod_info = 0; /* FIXME */ - if (num < *count) { if (key_data) *key_data++ = key; if (dynamic_data) *dynamic_data++ = dyn; - if (static_data) *static_data++ = stat; + if (static_data) + { + stat.pid = find_owning_pid( pid_map, pid_map_size, inode ); + stat.create_time = 0; /* FIXME */ + stat.mod_info = 0; /* FIXME */ + *static_data++ = stat; + } } num++; } @@ -649,7 +652,7 @@ static NTSTATUS tcp_conns_enumerate_all( DWORD filter, struct nsi_tcp_conn_key * if (len <= sizeof(struct xinpgen)) goto err; addr_scopes = get_ipv6_addr_scope_table( &addr_scopes_size ); - pid_map = get_pid_map( &pid_map_size ); + if (static_data) pid_map = get_pid_map( &pid_map_size ); orig_xig = (struct xinpgen *)buf; xig = orig_xig; @@ -708,15 +711,17 @@ static NTSTATUS tcp_conns_enumerate_all( DWORD filter, struct nsi_tcp_conn_key * addr_scopes_size ); } - stat.pid = find_owning_pid( pid_map, pid_map_size, (UINT_PTR)sock->so_pcb ); - stat.create_time = 0; /* FIXME */ - stat.mod_info = 0; /* FIXME */ - if (num < *count) { if (key_data) *key_data++ = key; if (dynamic_data) *dynamic_data++ = dyn; - if (static_data) *static_data++ = stat; + if (static_data) + { + stat.pid = find_owning_pid( pid_map, pid_map_size, (UINT_PTR)sock->so_pcb ); + stat.create_time = 0; /* FIXME */ + stat.mod_info = 0; /* FIXME */ + *static_data++ = stat; + } } num++; }
1
0
0
0
Zebediah Figura : kernelbase: Do not parse the hostname of internet URLs if they are missing a double slash.
by Alexandre Julliard
23 Mar '22
23 Mar '22
Module: wine Branch: master Commit: 26a3690796f8d9d17aa57b8bb2ebd4e4f3f6a623 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=26a3690796f8d9d17aa57b8b…
Author: Zebediah Figura <zfigura(a)codeweavers.com> Date: Tue Mar 22 23:28:03 2022 -0500 kernelbase: Do not parse the hostname of internet URLs if they are missing a double slash. Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/kernelbase/path.c | 4 ++++ dlls/shlwapi/tests/url.c | 59 ++++++++++++------------------------------------ 2 files changed, 19 insertions(+), 44 deletions(-) diff --git a/dlls/kernelbase/path.c b/dlls/kernelbase/path.c index fbe4728efda..7eda9bd483c 100644 --- a/dlls/kernelbase/path.c +++ b/dlls/kernelbase/path.c @@ -4204,7 +4204,11 @@ static void parse_url( const WCHAR *url, struct parsed_url *pl ) work++; pl->scheme_number = get_scheme_code(pl->scheme, pl->scheme_len); if (!is_slash( work[0] ) || !is_slash( work[1] )) + { + if (pl->scheme_number != URL_SCHEME_FILE) + pl->scheme_number = URL_SCHEME_UNKNOWN; return; + } work += 2; if (pl->scheme_number != URL_SCHEME_FILE) diff --git a/dlls/shlwapi/tests/url.c b/dlls/shlwapi/tests/url.c index 7cf7097a9ba..6957e244213 100644 --- a/dlls/shlwapi/tests/url.c +++ b/dlls/shlwapi/tests/url.c @@ -596,7 +596,6 @@ static void test_UrlGetPart(void) DWORD flags; HRESULT hr; const char *expect; - BOOL todo_hr; } tests[] = { @@ -657,8 +656,8 @@ static void test_UrlGetPart(void) {"
http://user@host@q
", URL_PART_USERNAME, 0, S_OK, "user"}, {"
http://user@host@q
", URL_PART_HOSTNAME, 0, S_OK, "host@q"}, - {"http:localhost/index.html", URL_PART_HOSTNAME, 0, E_FAIL, .todo_hr = TRUE}, - {"http:/localhost/index.html", URL_PART_HOSTNAME, 0, E_FAIL, .todo_hr = TRUE}, + {"http:localhost/index.html", URL_PART_HOSTNAME, 0, E_FAIL}, + {"http:/localhost/index.html", URL_PART_HOSTNAME, 0, E_FAIL}, {"
http://localhost\\index.html
", URL_PART_HOSTNAME, 0, S_OK, "localhost"}, {"http:/\\localhost/index.html", URL_PART_HOSTNAME, 0, S_OK, "localhost"}, @@ -780,13 +779,10 @@ static void test_UrlGetPart(void) size = 1; strcpy(buffer, "x"); hr = UrlGetPartA(url, buffer, &size, part, flags); - todo_wine_if (tests[i].todo_hr) - { - if (tests[i].hr == S_OK) - ok(hr == E_POINTER, "Got hr %#lx.\n", hr); - else - ok(hr == tests[i].hr, "Got hr %#lx.\n", hr); - } + if (tests[i].hr == S_OK) + ok(hr == E_POINTER, "Got hr %#lx.\n", hr); + else + ok(hr == tests[i].hr, "Got hr %#lx.\n", hr); if (hr == S_FALSE) { @@ -796,33 +792,20 @@ static void test_UrlGetPart(void) else { if (hr == E_POINTER) - { - if (expect) - { - todo_wine_if (tests[i].todo_hr) - ok(size == strlen(expect) + 1, "Got size %lu.\n", size); - } - } + ok(size == strlen(expect) + 1, "Got size %lu.\n", size); else - { ok(size == 1, "Got size %lu.\n", size); - } ok(!strcmp(buffer, "x"), "Got result %s.\n", debugstr_a(buffer)); } size = sizeof(buffer); strcpy(buffer, "x"); hr = UrlGetPartA(url, buffer, &size, part, flags); - todo_wine_if (tests[i].todo_hr) - ok(hr == tests[i].hr, "Got hr %#lx.\n", hr); + ok(hr == tests[i].hr, "Got hr %#lx.\n", hr); if (SUCCEEDED(hr)) { ok(size == strlen(buffer), "Got size %lu.\n", size); - if (expect) - { - todo_wine_if (tests[i].todo_hr) - ok(!strcmp(buffer, expect), "Got result %s.\n", debugstr_a(buffer)); - } + ok(!strcmp(buffer, expect), "Got result %s.\n", debugstr_a(buffer)); } else { @@ -835,13 +818,10 @@ static void test_UrlGetPart(void) size = 1; wcscpy(bufferW, L"x"); hr = UrlGetPartW(urlW, bufferW, &size, part, flags); - todo_wine_if (tests[i].todo_hr) - { - if (tests[i].hr == S_OK) - ok(hr == E_POINTER, "Got hr %#lx.\n", hr); - else - ok(hr == (tests[i].hr == S_FALSE ? S_OK : tests[i].hr), "Got hr %#lx.\n", hr); - } + if (tests[i].hr == S_OK) + ok(hr == E_POINTER, "Got hr %#lx.\n", hr); + else + ok(hr == (tests[i].hr == S_FALSE ? S_OK : tests[i].hr), "Got hr %#lx.\n", hr); if (SUCCEEDED(hr)) { @@ -851,25 +831,16 @@ static void test_UrlGetPart(void) else { if (hr == E_POINTER) - { - if (expect) - { - todo_wine_if (tests[i].todo_hr) - ok(size == strlen(expect) + 1, "Got size %lu.\n", size); - } - } + ok(size == strlen(expect) + 1, "Got size %lu.\n", size); else - { ok(size == 1, "Got size %lu.\n", size); - } ok(!wcscmp(bufferW, L"x"), "Got result %s.\n", debugstr_w(bufferW)); } size = ARRAY_SIZE(bufferW); wcscpy(bufferW, L"x"); hr = UrlGetPartW(urlW, bufferW, &size, part, flags); - todo_wine_if (tests[i].todo_hr) - ok(hr == (tests[i].hr == S_FALSE ? S_OK : tests[i].hr), "Got hr %#lx.\n", hr); + ok(hr == (tests[i].hr == S_FALSE ? S_OK : tests[i].hr), "Got hr %#lx.\n", hr); if (SUCCEEDED(hr)) { ok(size == wcslen(bufferW), "Got size %lu.\n", size);
1
0
0
0
← Newer
1
...
26
27
28
29
30
31
32
...
114
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
Results per page:
10
25
50
100
200