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
February 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
1495 discussions
Start a n
N
ew thread
Francois Gouget : oleaut32/tests: Add more VarParseNumFromStr() hexadecimal/octal tests.
by Alexandre Julliard
25 Feb '22
25 Feb '22
Module: wine Branch: oldstable Commit: f82b97c7781be50010e44edc5f837ad26d1fa62a URL:
https://source.winehq.org/git/wine.git/?a=commit;h=f82b97c7781be50010e44edc…
Author: Francois Gouget <fgouget(a)codeweavers.com> Date: Tue Jul 27 01:43:17 2021 +0200 oleaut32/tests: Add more VarParseNumFromStr() hexadecimal/octal tests. Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit a74e2871abd83422f2a152b537dd510ee73b1cbd) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/oleaut32/tests/vartest.c | 49 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 48 insertions(+), 1 deletion(-) diff --git a/dlls/oleaut32/tests/vartest.c b/dlls/oleaut32/tests/vartest.c index ebf4e28d92f..0d42dd7e852 100644 --- a/dlls/oleaut32/tests/vartest.c +++ b/dlls/oleaut32/tests/vartest.c @@ -1494,7 +1494,7 @@ static void test_VarParseNumFromStrEn(void) EXPECTFAIL; EXPECTRGB(0,FAILDIG); - /* Octal */ + /* A leading 0 does not an octal number make */ CONVERT("0100", NUMPRS_HEX_OCT); EXPECT(1,NUMPRS_HEX_OCT,0,4,0,2); EXPECTRGB(0,1); @@ -1545,6 +1545,20 @@ static void test_VarParseNumFromStrEn(void) EXPECTRGB(1,2); EXPECTRGB(3,FAILDIG); + /* Only integers are allowed when using an alternative radix */ + CONVERT("&ha.2", NUMPRS_HEX_OCT|NUMPRS_DECIMAL); + if (broken(1)) /* FIXME Reenable once Wine is less broken */ + EXPECT(1,NUMPRS_HEX_OCT|NUMPRS_DECIMAL,NUMPRS_HEX_OCT,3,4,0); + todo_wine ok(np.dwOutFlags == NUMPRS_HEX_OCT, "Got dwOutFlags=%08x\n", np.dwOutFlags); + EXPECTRGB(0,10); + todo_wine EXPECTRGB(1,FAILDIG); + + /* Except if it looks like a plain decimal number */ + CONVERT("01.2", NUMPRS_HEX_OCT|NUMPRS_DECIMAL); + EXPECT(2,NUMPRS_HEX_OCT|NUMPRS_DECIMAL,NUMPRS_DECIMAL,4,0,-1); + EXPECT2(1,2); + EXPECTRGB(3,FAILDIG); + /** NUMPRS_PARENS **/ /* Empty parens = error */ @@ -1583,6 +1597,14 @@ static void test_VarParseNumFromStrEn(void) */ EXPECTRGB(4,FAILDIG); + /* With flag, thousands sep. and following digits consumed */ + CONVERT("&h1,000", NUMPRS_HEX_OCT|NUMPRS_THOUSANDS); + if (broken(1)) /* FIXME Reenable once Wine is less broken */ + EXPECT(1,NUMPRS_HEX_OCT|NUMPRS_THOUSANDS,NUMPRS_HEX_OCT,3,4,0); + todo_wine ok(np.dwOutFlags == NUMPRS_HEX_OCT, "Got dwOutFlags=%08x\n", np.dwOutFlags); + EXPECTRGB(0,1); + todo_wine EXPECTRGB(1,FAILDIG); + /* With flag and decimal point, thousands sep. but not decimals consumed */ CONVERT("1,001.0", NUMPRS_THOUSANDS); EXPECT(4,NUMPRS_THOUSANDS,NUMPRS_THOUSANDS,5,0,0); @@ -1635,6 +1657,17 @@ static void test_VarParseNumFromStrEn(void) EXPECT2(1,1); EXPECTRGB(2,FAILDIG); + /* With flag, currency amounts cannot be in hexadecimal */ + CONVERT("$&ha", NUMPRS_HEX_OCT|NUMPRS_CURRENCY); + todo_wine EXPECTFAIL; + + CONVERT("&ha$", NUMPRS_HEX_OCT|NUMPRS_CURRENCY); + if (broken(1)) /* FIXME Reenable once Wine is less broken */ + EXPECT(1,NUMPRS_HEX_OCT|NUMPRS_CURRENCY,NUMPRS_HEX_OCT,3,4,0); + todo_wine ok(np.dwOutFlags == NUMPRS_HEX_OCT, "Got dwOutFlags=%08x\n", np.dwOutFlags); + EXPECTRGB(0,10); + EXPECTRGB(1,FAILDIG); + /* With flag, the sign cannot be repeated before the amount */ CONVERT("$$11", NUMPRS_CURRENCY); EXPECTFAIL; @@ -1767,6 +1800,20 @@ static void test_VarParseNumFromStrEn(void) EXPECT(1,NUMPRS_EXPONENT,NUMPRS_EXPONENT,3,0,1); EXPECT2(1,FAILDIG); + /* With flag, incompatible with NUMPRS_HEX_OCT */ + CONVERT("&o1e1", NUMPRS_HEX_OCT|NUMPRS_EXPONENT); + if (broken(1)) /* FIXME Reenable once Wine is less broken */ + EXPECT(1,NUMPRS_HEX_OCT|NUMPRS_EXPONENT,NUMPRS_HEX_OCT,3,3,0); + todo_wine ok(np.dwOutFlags == NUMPRS_HEX_OCT, "Got dwOutFlags=%08x\n", np.dwOutFlags); + EXPECT2(1,FAILDIG); + + /* With flag, even if it sort of looks like an exponent */ + CONVERT("&h1e2", NUMPRS_HEX_OCT|NUMPRS_EXPONENT); + EXPECT(3,NUMPRS_HEX_OCT|NUMPRS_EXPONENT,NUMPRS_HEX_OCT,5,4,0); + EXPECT2(1,0xe); + EXPECTRGB(2,2); + EXPECTRGB(3,FAILDIG); + /* Negative exponents are accepted without flags */ CONVERT("1e-1", NUMPRS_EXPONENT); EXPECT(1,NUMPRS_EXPONENT,NUMPRS_EXPONENT,4,0,-1);
1
0
0
0
Francois Gouget : oleaut32/tests: Test VarParseNumFromStr()'s handling of LOCALE_SMON*.
by Alexandre Julliard
25 Feb '22
25 Feb '22
Module: wine Branch: oldstable Commit: 93971ce3833be913cf5d8b0e457bf8ed6b1177b6 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=93971ce3833be913cf5d8b0e…
Author: Francois Gouget <fgouget(a)codeweavers.com> Date: Tue Jul 27 01:42:08 2021 +0200 oleaut32/tests: Test VarParseNumFromStr()'s handling of LOCALE_SMON*. Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit fd0a55ce4623c982ddcfcb0dc74e13cbaa6aaf3e) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/oleaut32/tests/vartest.c | 276 +++++++++++++++++++++++++++++++++++++++--- 1 file changed, 257 insertions(+), 19 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=93971ce3833be913cf5d…
1
0
0
0
Francois Gouget : oleaut32: Fix VarParseNumFromStr()'s support for trailing thousands separator spaces.
by Alexandre Julliard
25 Feb '22
25 Feb '22
Module: wine Branch: oldstable Commit: c8dc029d412a0360c70ff0fef9ba908b0d0f6eec URL:
https://source.winehq.org/git/wine.git/?a=commit;h=c8dc029d412a0360c70ff0fe…
Author: Francois Gouget <fgouget(a)codeweavers.com> Date: Thu Jul 22 00:03:49 2021 +0200 oleaut32: Fix VarParseNumFromStr()'s support for trailing thousands separator spaces. If a trailing character is a thousands separator, VarParseNumFromStr() only processes it if NUMPRS_THOUSANDS was specified; even if that character is also a space and NUMPRS_TRAILING_WHITE was specified. Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit c2aeb915f4fc05d596aec0ff43f5e5f26569cd21) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/oleaut32/tests/vartest.c | 4 ++-- dlls/oleaut32/variant.c | 17 ++++++++++++++++- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/dlls/oleaut32/tests/vartest.c b/dlls/oleaut32/tests/vartest.c index 7aaec0ef80a..7030771c78f 100644 --- a/dlls/oleaut32/tests/vartest.c +++ b/dlls/oleaut32/tests/vartest.c @@ -1902,7 +1902,7 @@ static void test_VarParseNumFromStrFr(void) if (spaces[i] == ' ' || spaces[i] == 0xa0 /* non-breaking space */) { /* Spaces aliased to the thousands separator are never allowed! */ - todo_wine EXPECTFAIL; + EXPECTFAIL; } else { @@ -2019,7 +2019,7 @@ static void test_VarParseNumFromStrFr(void) if (spaces[i] == ' ' || spaces[i] == 0xa0 /* non-breaking space */) { /* Spaces aliased to thousands separator are never allowed! */ - todo_wine EXPECTFAIL; + EXPECTFAIL; } else { diff --git a/dlls/oleaut32/variant.c b/dlls/oleaut32/variant.c index f3fa5d64caf..0f00384aeb2 100644 --- a/dlls/oleaut32/variant.c +++ b/dlls/oleaut32/variant.c @@ -1922,7 +1922,22 @@ HRESULT WINAPI VarParseNumFromStr(OLECHAR *lpszStr, LCID lcid, ULONG dwFlags, /* Consume any trailing symbols and space */ while (1) { - if ((pNumprs->dwInFlags & NUMPRS_TRAILING_WHITE) && iswspace(*lpszStr)) + if ((chars.cDigitSeparator && *lpszStr == chars.cDigitSeparator) || + (cDigitSeparator2 && *lpszStr == cDigitSeparator2)) + { + if (pNumprs->dwInFlags & NUMPRS_THOUSANDS) + { + pNumprs->dwOutFlags |= NUMPRS_THOUSANDS; + cchUsed++; + lpszStr++; + } + else + { + /* Not allowed, even with NUMPRS_TRAILING_WHITE */ + break; + } + } + else if ((pNumprs->dwInFlags & NUMPRS_TRAILING_WHITE) && iswspace(*lpszStr)) { pNumprs->dwOutFlags |= NUMPRS_TRAILING_WHITE; do
1
0
0
0
Francois Gouget : oleaut32: VarParseNumFromStr() does not allow leading thousands separators.
by Alexandre Julliard
25 Feb '22
25 Feb '22
Module: wine Branch: oldstable Commit: 014c114a2866b610bf8b663f9e2f721ee309f1b2 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=014c114a2866b610bf8b663f…
Author: Francois Gouget <fgouget(a)codeweavers.com> Date: Thu Jul 22 00:03:47 2021 +0200 oleaut32: VarParseNumFromStr() does not allow leading thousands separators. Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit de70f7289e23e895956927e7e3ce2ed23a188e77) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/oleaut32/tests/vartest.c | 4 ++-- dlls/oleaut32/variant.c | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/dlls/oleaut32/tests/vartest.c b/dlls/oleaut32/tests/vartest.c index 575a04bb8e4..7aaec0ef80a 100644 --- a/dlls/oleaut32/tests/vartest.c +++ b/dlls/oleaut32/tests/vartest.c @@ -1605,7 +1605,7 @@ static void test_VarParseNumFromStrEn(void) /* With flag, but leading thousands separators are not allowed */ CONVERT(",1,000", NUMPRS_THOUSANDS); - todo_wine EXPECTFAIL; + EXPECTFAIL; /* With flag, thousands separator not needed but still reported */ CONVERT("1,", NUMPRS_THOUSANDS); @@ -1982,7 +1982,7 @@ static void test_VarParseNumFromStrFr(void) /* With flag, but leading thousands separators are not allowed */ CONVERT(" 1 000", NUMPRS_THOUSANDS); - todo_wine EXPECTFAIL; + EXPECTFAIL; /* With flag, thousands separator not needed but still reported */ CONVERT("1 ", NUMPRS_THOUSANDS|NUMPRS_USE_ALL); diff --git a/dlls/oleaut32/variant.c b/dlls/oleaut32/variant.c index c76656d25a6..f3fa5d64caf 100644 --- a/dlls/oleaut32/variant.c +++ b/dlls/oleaut32/variant.c @@ -1651,6 +1651,12 @@ HRESULT WINAPI VarParseNumFromStr(OLECHAR *lpszStr, LCID lcid, ULONG dwFlags, lpszStr++; } while (iswspace(*lpszStr)); } + else if (pNumprs->dwInFlags & NUMPRS_THOUSANDS && + ((chars.cDigitSeparator && *lpszStr == chars.cDigitSeparator) || + (cDigitSeparator2 && *lpszStr == cDigitSeparator2))) + { + return DISP_E_TYPEMISMATCH; /* Not allowed before the first digit */ + } else if (pNumprs->dwInFlags & NUMPRS_LEADING_PLUS && *lpszStr == chars.cPositiveSymbol && !(pNumprs->dwOutFlags & NUMPRS_LEADING_PLUS))
1
0
0
0
Francois Gouget : oleaut32/tests: Fix the Swiss franc and Moroccan dirham tests.
by Alexandre Julliard
25 Feb '22
25 Feb '22
Module: wine Branch: oldstable Commit: 806b738a11539d54b46a689b27d714275569385a URL:
https://source.winehq.org/git/wine.git/?a=commit;h=806b738a11539d54b46a689b…
Author: Francois Gouget <fgouget(a)codeweavers.com> Date: Wed Jul 21 15:10:59 2021 +0200 oleaut32/tests: Fix the Swiss franc and Moroccan dirham tests. Windows <= 8.1 uses an obsolete currency symbol for the Swiss Franc and Windows 8.1 incorrectly doubled the right-to-left mark in the Moroccan dirham. Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit 5c86b4d201e46a799cef7eef9922df3610b1568a) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/oleaut32/tests/vartest.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/dlls/oleaut32/tests/vartest.c b/dlls/oleaut32/tests/vartest.c index 258b747b03d..575a04bb8e4 100644 --- a/dlls/oleaut32/tests/vartest.c +++ b/dlls/oleaut32/tests/vartest.c @@ -2157,14 +2157,26 @@ static void test_VarParseNumFromStrMisc(void) lcid = MAKELCID(MAKELANGID(LANG_FRENCH,SUBLANG_FRENCH_SWISS),SORT_DEFAULT); WCONVERT(L"3CHF", NUMPRS_CURRENCY|NUMPRS_USE_ALL); - todo_wine EXPECT(1,NUMPRS_CURRENCY|NUMPRS_USE_ALL,NUMPRS_CURRENCY,4,0,0); - EXPECT2(3,FAILDIG); + /* Windows <= 8.1 uses an old currency symbol: "fr. 5" */ + todo_wine ok(hres == S_OK || broken(hres == DISP_E_TYPEMISMATCH), "returned %08x\n", hres); + if (hres == S_OK) + { + todo_wine EXPECT(1,NUMPRS_CURRENCY|NUMPRS_USE_ALL,NUMPRS_CURRENCY,4,0,0); + EXPECT2(3,FAILDIG); + } /* 5 Moroccan dirham */ lcid = MAKELCID(MAKELANGID(LANG_ARABIC,SUBLANG_ARABIC_MOROCCO),SORT_DEFAULT); WCONVERT(L"5\x62f.\x645.\x200f", NUMPRS_CURRENCY|NUMPRS_USE_ALL); - todo_wine EXPECT(1,NUMPRS_CURRENCY|NUMPRS_USE_ALL,NUMPRS_CURRENCY,6,0,0); - EXPECT2(5,FAILDIG); + /* Windows 8.1 incorrectly doubles the right-to-left mark: + * "\x62f.\x645.\x200f\x200f 5" + */ + todo_wine ok(hres == S_OK || broken(hres == DISP_E_TYPEMISMATCH), "returned %08x\n", hres); + if (hres == S_OK) + { + todo_wine EXPECT(1,NUMPRS_CURRENCY|NUMPRS_USE_ALL,NUMPRS_CURRENCY,6,0,0); + EXPECT2(5,FAILDIG); + } /* Test Arabic numerals in an Arabic locale */
1
0
0
0
Francois Gouget : oleaut32: Fix a trace containing a null character.
by Alexandre Julliard
25 Feb '22
25 Feb '22
Module: wine Branch: oldstable Commit: 3b1725678678032a278ab0d55a9acc87c49147be URL:
https://source.winehq.org/git/wine.git/?a=commit;h=3b1725678678032a278ab0d5…
Author: Francois Gouget <fgouget(a)codeweavers.com> Date: Wed Jul 7 19:13:53 2021 +0200 oleaut32: Fix a trace containing a null character. printf("%c Hello\n", 0) works but not TRACE("%c Hello\n", 0) because the string is formatted before printing. Work around the issue with wine_dbgstr_w(). Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit 6763ed84cf0629dd7d1495263e1e3ea9aaf3d663) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/oleaut32/variant.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/oleaut32/variant.c b/dlls/oleaut32/variant.c index 5e71d0a536d..c76656d25a6 100644 --- a/dlls/oleaut32/variant.c +++ b/dlls/oleaut32/variant.c @@ -1553,8 +1553,8 @@ static void VARIANT_GetLocalisedNumberChars(VARIANT_NUMBER_CHARS *lpChars, LCID break; default: WARN("buffer too small for LOCALE_SCURRENCY\n"); } - TRACE("lcid 0x%x, cCurrencyLocal =%d,%d '%c','%c'\n", lcid, lpChars->cCurrencyLocal, - lpChars->cCurrencyLocal2, lpChars->cCurrencyLocal, lpChars->cCurrencyLocal2); + TRACE("lcid 0x%x, cCurrencyLocal=%d,%d %s\n", lcid, lpChars->cCurrencyLocal, + lpChars->cCurrencyLocal2, wine_dbgstr_w(buff)); memcpy(&lastChars, lpChars, sizeof(defaultChars)); lastLcid = lcid;
1
0
0
0
Damjan Jovanovic : msxml3: Use XSD regex quantifier format S{0, m} instead of S{, m}.
by Alexandre Julliard
25 Feb '22
25 Feb '22
Module: wine Branch: oldstable Commit: 2240ac5e27b42150f2e9dcb0e713684078f77415 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=2240ac5e27b42150f2e9dcb0…
Author: Damjan Jovanovic <damjan.jov(a)gmail.com> Date: Wed Aug 11 07:16:53 2021 +0200 msxml3: Use XSD regex quantifier format S{0, m} instead of S{, m}. S{,m} is invalid in libxml2 2.9.11 and later, and was never valid in the XSD specification or any XML implementation tested. We should only use S{0,m} for our internal XSD schema used in XDR validation. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=51358
Signed-off-by: Damjan Jovanovic <damjan.jov(a)gmail.com> Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit 53f3cad7fbb19b489419afae4e1e73486384f98d) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/msxml3/datatypes.xsd | 4 ++-- dlls/msxml3/tests/schema.c | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/dlls/msxml3/datatypes.xsd b/dlls/msxml3/datatypes.xsd index 9e0479d8ca2..ffbe0e2f858 100644 --- a/dlls/msxml3/datatypes.xsd +++ b/dlls/msxml3/datatypes.xsd @@ -200,7 +200,7 @@ </xsd:annotation> <xsd:restriction base="xsd:decimal"> - <xsd:pattern value="([0-9]{,14})([.][0-9]{,4})?"/> + <xsd:pattern value="([0-9]{0,14})([.][0-9]{0,4})?"/> </xsd:restriction> </xsd:simpleType> @@ -539,7 +539,7 @@ </xsd:annotation> <xsd:restriction base="xsd:string"> - <xsd:pattern value="([0-9A-Fa-f]{4})([-]{,1}[0-9A-Fa-f]{4})*"/> + <xsd:pattern value="([0-9A-Fa-f]{4})([-]{0,1}[0-9A-Fa-f]{4})*"/> </xsd:restriction> </xsd:simpleType> diff --git a/dlls/msxml3/tests/schema.c b/dlls/msxml3/tests/schema.c index b66be76c159..8dc9dcd7e22 100644 --- a/dlls/msxml3/tests/schema.c +++ b/dlls/msxml3/tests/schema.c @@ -1115,7 +1115,9 @@ static void test_regex(void) { L"\\~", L"~", TRUE }, { L"\\uCAFE", L"\xCAFE", TRUE }, /* non-BMP character in surrogate pairs: */ - { L"\\uD83D\\uDE00", L"\xD83D\xDE00", TRUE } + { L"\\uD83D\\uDE00", L"\xD83D\xDE00", TRUE }, + /* "x{,2}" is non-standard and only works on libxml2 <= v2.9.10 */ + { L"x{0,2}", L"x", FALSE } }; int i;
1
0
0
0
Damjan Jovanovic : msxml3/tests: Add some regex tests.
by Alexandre Julliard
25 Feb '22
25 Feb '22
Module: wine Branch: oldstable Commit: 9ece53ed3a6a1ec0e98eec1e4a84405788ce3447 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=9ece53ed3a6a1ec0e98eec1e…
Author: Damjan Jovanovic <damjan.jov(a)gmail.com> Date: Thu Jun 3 19:03:20 2021 +0200 msxml3/tests: Add some regex tests. Signed-off-by: Damjan Jovanovic <damjan.jov(a)gmail.com> Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit b5f3b8d07f0d0796e6a4d96addd3ee817ed4c41a) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/msxml3/tests/schema.c | 154 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 154 insertions(+) diff --git a/dlls/msxml3/tests/schema.c b/dlls/msxml3/tests/schema.c index d1622ffc7da..b66be76c159 100644 --- a/dlls/msxml3/tests/schema.c +++ b/dlls/msxml3/tests/schema.c @@ -1012,6 +1012,159 @@ static void test_collection_content(void) free_bstrs(); } +static HRESULT validate_regex_document(IXMLDOMDocument2 *doc, IXMLDOMDocument2 *schema, IXMLDOMSchemaCollection* cache, + const WCHAR *regex, const WCHAR *input) +{ + static const WCHAR regex_doc[] = +L"" +"<?xml version='1.0'?>" +"<root xmlns='urn:test'>%s</root>"; + + static const WCHAR regex_schema[] = +L"<?xml version='1.0'?>" +"<schema xmlns='
http://www.w3.org/2001/XMLSchema
'" +" targetNamespace='urn:test'>" +" <element name='root'>" +" <simpleType>" +" <restriction base='string'>" +" <pattern value='%s'/>" +" </restriction>" +" </simpleType>" +" </element>" +"</schema>"; + + WCHAR buffer[1024]; + IXMLDOMParseError* err; + VARIANT v; + VARIANT_BOOL b; + BSTR namespace; + BSTR bstr; + HRESULT hr; + + VariantInit(&v); + + swprintf(buffer, ARRAY_SIZE(buffer), regex_doc, input); + bstr = SysAllocString(buffer); + ole_check(IXMLDOMDocument2_loadXML(doc, bstr, &b)); + ok(b == VARIANT_TRUE, "failed to load XML\n"); + SysFreeString(bstr); + + swprintf(buffer, ARRAY_SIZE(buffer), regex_schema, regex); + bstr = SysAllocString(buffer); + ole_check(IXMLDOMDocument2_loadXML(schema, bstr, &b)); + ok(b == VARIANT_TRUE, "failed to load XML\n"); + SysFreeString(bstr); + + /* add the schema to the cache */ + V_VT(&v) = VT_DISPATCH; + V_DISPATCH(&v) = NULL; + ole_check(IXMLDOMDocument2_QueryInterface(schema, &IID_IDispatch, (void**)&V_DISPATCH(&v))); + ok(V_DISPATCH(&v) != NULL, "failed to get IDispatch interface\n"); + namespace = alloc_str_from_narrow("urn:test"); + hr = IXMLDOMSchemaCollection_add(cache, namespace, v); + SysFreeString(namespace); + VariantClear(&v); + if (FAILED(hr)) + return hr; + + /* associate the cache to the doc */ + V_VT(&v) = VT_DISPATCH; + V_DISPATCH(&v) = NULL; + ole_check(IXMLDOMSchemaCollection_QueryInterface(cache, &IID_IDispatch, (void**)&V_DISPATCH(&v))); + ok(V_DISPATCH(&v) != NULL, "failed to get IDispatch interface\n"); + ole_check(IXMLDOMDocument2_putref_schemas(doc, v)); + VariantClear(&v); + + /* validate the doc + * only declared elements in the declared order + * this is fine */ + err = NULL; + bstr = NULL; + hr = IXMLDOMDocument2_validate(doc, &err); + ok(err != NULL, "domdoc_validate() should always set err\n"); + if (IXMLDOMParseError_get_reason(err, &bstr) != S_FALSE) + trace("got error: %s\n", wine_dbgstr_w(bstr)); + SysFreeString(bstr); + IXMLDOMParseError_Release(err); + + return hr; +} + +static void test_regex(void) +{ + struct regex_test { + const WCHAR *regex; + const WCHAR *input; + BOOL todo; + }; + + struct regex_test tests[] = { + { L"\\!", L"!", TRUE }, + { L"\\\"", L"\"", TRUE }, + { L"\\#", L"#", TRUE }, + { L"\\$", L"$", TRUE }, + { L"\\%", L"%", TRUE }, + { L"\\,", L",", TRUE }, + { L"\\/", L"/", TRUE }, + { L"\\:", L":", TRUE }, + { L"\\;", L";", TRUE }, + { L"\\=", L"=", TRUE }, + { L"\\>", L">", TRUE }, + { L"\\@", L"@", TRUE }, + { L"\\`", L"`", TRUE }, + { L"\\~", L"~", TRUE }, + { L"\\uCAFE", L"\xCAFE", TRUE }, + /* non-BMP character in surrogate pairs: */ + { L"\\uD83D\\uDE00", L"\xD83D\xDE00", TRUE } + }; + + int i; + + for (i = 0; i < ARRAY_SIZE(tests); i++) + { + IXMLDOMDocument2 *doc40, *doc60; + IXMLDOMDocument2 *schema40, *schema60; + IXMLDOMSchemaCollection *cache40, *cache60; + + doc40 = create_document_version(40, &IID_IXMLDOMDocument2); + doc60 = create_document_version(60, &IID_IXMLDOMDocument2); + schema40 = create_document_version(40, &IID_IXMLDOMDocument2); + schema60 = create_document_version(60, &IID_IXMLDOMDocument2); + cache40 = create_cache_version(40, &IID_IXMLDOMSchemaCollection); + cache60 = create_cache_version(60, &IID_IXMLDOMSchemaCollection); + + if (doc60 && schema60 && cache60) + { + HRESULT hr = validate_regex_document(doc60, schema60, cache60, tests[i].regex, tests[i].input); + todo_wine_if(tests[i].todo) + ok(hr == S_OK, "got 0x%08x for version 60 regex %s input %s\n", + hr, wine_dbgstr_w(tests[i].regex), wine_dbgstr_w(tests[i].input)); + if (doc40 && schema40 && cache40) + { + hr = validate_regex_document(doc40, schema40, cache40, tests[i].regex, tests[i].input); + todo_wine_if(tests[i].todo) + ok(hr == S_OK, "got 0x%08x for version 40 regex %s input %s\n", + hr, wine_dbgstr_w(tests[i].regex), wine_dbgstr_w(tests[i].input)); + } + } + else + ok(0, "out of memory\n"); + + if (doc40) + IXMLDOMDocument2_Release(doc40); + if (doc60) + IXMLDOMDocument2_Release(doc60); + if (schema40) + IXMLDOMDocument2_Release(schema40); + if (schema60) + IXMLDOMDocument2_Release(schema60); + if (cache40) + IXMLDOMSchemaCollection_Release(cache40); + if (cache60) + IXMLDOMSchemaCollection_Release(cache60); + } +} + static void test_XDR_schemas(void) { IXMLDOMDocument2 *doc, *schema; @@ -1669,6 +1822,7 @@ START_TEST(schema) test_collection_refs(); test_length(); test_collection_content(); + test_regex(); test_XDR_schemas(); test_XDR_datatypes(); test_validate_on_load();
1
0
0
0
Alex Henrie : rasapi32: Add RasSetCredentialsA/W stubs.
by Alexandre Julliard
25 Feb '22
25 Feb '22
Module: wine Branch: oldstable Commit: 60284543da6e4112d056da1fa3f2b2c2f8fb00d0 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=60284543da6e4112d056da1f…
Author: Alex Henrie <alexhenrie24(a)gmail.com> Date: Tue Aug 3 23:40:55 2021 -0600 rasapi32: Add RasSetCredentialsA/W stubs. Based on a patch by Oleg Dubinskiy. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=49726
Signed-off-by: Alex Henrie <alexhenrie24(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit 84d85a3d72a12f9f845fa28544999788741cdb06) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/rasapi32/rasapi.c | 12 ++++++++++++ dlls/rasapi32/rasapi32.spec | 4 ++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/dlls/rasapi32/rasapi.c b/dlls/rasapi32/rasapi.c index 791b0dab133..f70f73caa2c 100644 --- a/dlls/rasapi32/rasapi.c +++ b/dlls/rasapi32/rasapi.c @@ -496,6 +496,18 @@ DWORD WINAPI RasRenameEntryW(LPCWSTR lpszPhonebook, LPCWSTR lpszOldEntry, LPCWST return 0; } +DWORD WINAPI RasSetCredentialsA(const char *phonebook, const char *entry, RASCREDENTIALSA *credentials, BOOL clear) +{ + FIXME("(%s,%s,%p,0x%x), stub!\n", debugstr_a(phonebook), debugstr_a(entry), credentials, clear); + return ERROR_UNKNOWN; +} + +DWORD WINAPI RasSetCredentialsW(const WCHAR *phonebook, const WCHAR *entry, RASCREDENTIALSW *credentials, BOOL clear) +{ + FIXME("(%s,%s,%p,0x%x), stub!\n", debugstr_w(phonebook), debugstr_w(entry), credentials, clear); + return ERROR_UNKNOWN; +} + DWORD WINAPI RasSetCustomAuthDataA(const char *phonebook, const char *entry, BYTE *authdata, DWORD size) { FIXME("(%s,%s,%p,0x%08x), stub!\n", debugstr_a(phonebook), debugstr_a(entry), authdata, size); diff --git a/dlls/rasapi32/rasapi32.spec b/dlls/rasapi32/rasapi32.spec index e8a28a8814e..d917c335a7d 100644 --- a/dlls/rasapi32/rasapi32.spec +++ b/dlls/rasapi32/rasapi32.spec @@ -64,8 +64,8 @@ @ stdcall RasSetAutodialEnableW(long long) @ stdcall RasSetAutodialParamA(long ptr long) @ stdcall RasSetAutodialParamW(long ptr long) -@ stub RasSetCredentialsA -@ stub RasSetCredentialsW +@ stdcall RasSetCredentialsA(str str ptr long) +@ stdcall RasSetCredentialsW(wstr wstr ptr long) @ stdcall RasSetCustomAuthDataA(str str ptr long) @ stdcall RasSetCustomAuthDataW(wstr wstr ptr long) @ stdcall RasSetEntryDialParamsA(str ptr long)
1
0
0
0
Oleg Dubinskiy : include: Add RASCREDENTIALSA/W structures.
by Alexandre Julliard
25 Feb '22
25 Feb '22
Module: wine Branch: oldstable Commit: 10646cd4e08f02e59ff27f38f2814426e64efc4a URL:
https://source.winehq.org/git/wine.git/?a=commit;h=10646cd4e08f02e59ff27f38…
Author: Oleg Dubinskiy <oleg.dubinskij2013(a)yandex.ua> Date: Tue Aug 3 23:40:54 2021 -0600 include: Add RASCREDENTIALSA/W structures. Signed-off-by: Oleg Dubinskiy <oleg.dubinskij2013(a)yandex.ua> Signed-off-by: Alex Henrie <alexhenrie24(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit 2d8fa6b4d14792296383af616a387d39a4d1479b) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- include/ras.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/include/ras.h b/include/ras.h index a8c04da2b6d..210a2a45f09 100644 --- a/include/ras.h +++ b/include/ras.h @@ -372,6 +372,27 @@ typedef struct tagRASCONNSTATUSW DECL_WINELIB_TYPE_AW(RASCONNSTATUS) +typedef struct tagRASCREDENTIALSA +{ + DWORD dwSize; + DWORD dwMask; + CHAR szUserName[UNLEN + 1]; + CHAR szPassword[PWLEN + 1]; + CHAR szDomain[DNLEN + 1]; +} RASCREDENTIALSA, *LPRASCREDENTIALSA; + +typedef struct tagRASCREDENTIALSW +{ + DWORD dwSize; + DWORD dwMask; + WCHAR szUserName[UNLEN + 1]; + WCHAR szPassword[PWLEN + 1]; + WCHAR szDomain[DNLEN + 1]; +} RASCREDENTIALSW, *LPRASCREDENTIALSW; + +DECL_WINELIB_TYPE_AW(RASCREDENTIALS) +DECL_WINELIB_TYPE_AW(LPRASCREDENTIALS) + typedef enum tagRASPROJECTION { RASP_Amb = 0x10000,
1
0
0
0
← Newer
1
...
12
13
14
15
16
17
18
...
150
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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
Results per page:
10
25
50
100
200