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
April
March
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
February 2021
----- 2025 -----
April 2025
March 2025
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
2 participants
915 discussions
Start a n
N
ew thread
Nikolay Sivov : oleaut32/tests: Use wide strings in VarFormat* tests.
by Alexandre Julliard
05 Feb '21
05 Feb '21
Module: wine Branch: master Commit: 74f63545dccf446594315c11d83443cd3bb4ff52 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=74f63545dccf446594315c11…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Fri Feb 5 10:30:46 2021 +0300 oleaut32/tests: Use wide strings in VarFormat* tests. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/oleaut32/tests/varformat.c | 47 +++++++++++++++-------------------------- 1 file changed, 17 insertions(+), 30 deletions(-) diff --git a/dlls/oleaut32/tests/varformat.c b/dlls/oleaut32/tests/varformat.c index 1bd1917d209..54fc8a1841f 100644 --- a/dlls/oleaut32/tests/varformat.c +++ b/dlls/oleaut32/tests/varformat.c @@ -49,10 +49,7 @@ static void test_VarFormatNumber(void) { - static const WCHAR szSrc1[] = { '1','\0' }; - static const WCHAR szResult1[] = { '1','.','0','0','\0' }; - static const WCHAR szSrc2[] = { '-','1','\0' }; - static const WCHAR szResult2[] = { '(','1','.','0','0',')','\0' }; + static const WCHAR szResult1[] = L"1.00"; char buff[8]; HRESULT hres; VARIANT v; @@ -78,7 +75,7 @@ static void test_VarFormatNumber(void) FMT_NUMBER(VT_BOOL, V_BOOL); V_VT(&v) = VT_BSTR; - V_BSTR(&v) = SysAllocString(szSrc1); + V_BSTR(&v) = SysAllocString(L"1"); hres = VarFormatNumber(&v,2,0,0,0,0,&str); ok(hres == S_OK, "VarFormatNumber (bstr): returned %8x\n", hres); @@ -87,11 +84,11 @@ static void test_VarFormatNumber(void) SysFreeString(V_BSTR(&v)); SysFreeString(str); - V_BSTR(&v) = SysAllocString(szSrc2); + V_BSTR(&v) = SysAllocString(L"-1"); hres = VarFormatNumber(&v,2,0,-1,0,0,&str); ok(hres == S_OK, "VarFormatNumber (bstr): returned %8x\n", hres); if (hres == S_OK) - ok(str && wcscmp(str, szResult2) == 0, "VarFormatNumber (-bstr): string different\n"); + ok(str && wcscmp(str, L"(1.00)") == 0, "VarFormatNumber (-bstr): string different\n"); SysFreeString(V_BSTR(&v)); SysFreeString(str); } @@ -212,8 +209,6 @@ static const FMTDATERES VarFormat_namedtime_results[] = static void test_VarFormat(void) { - static const WCHAR szTesting[] = { 't','e','s','t','i','n','g','\0' }; - static const WCHAR szNum[] = { '3','9','6','9','7','.','1','1','\0' }; size_t i; WCHAR buffW[256]; char buff[256]; @@ -292,7 +287,7 @@ static void test_VarFormat(void) } /* Strings */ - bstrin = SysAllocString(szTesting); + bstrin = SysAllocString(L"testing"); VARFMT(VT_BSTR,V_BSTR,bstrin,"",S_OK,"testing"); VARFMT(VT_BSTR,V_BSTR,bstrin,"@",S_OK,"testing"); VARFMT(VT_BSTR,V_BSTR,bstrin,"&",S_OK,"testing"); @@ -308,7 +303,7 @@ static void test_VarFormat(void) VARFMT(VT_BSTR,V_BSTR,bstrin,"<&&",S_OK,"testing"); VARFMT(VT_BSTR,V_BSTR,bstrin,"<&>&",S_OK,"testing"); SysFreeString(bstrin); - bstrin = SysAllocString(szNum); + bstrin = SysAllocString(L"39697.11"); todo_wine VARFMT(VT_BSTR,V_BSTR,bstrin,"hh:mm",S_OK,"02:38"); todo_wine VARFMT(VT_BSTR,V_BSTR,bstrin,"mm-dd-yy",S_OK,"09-06-08"); SysFreeString(bstrin); @@ -522,17 +517,9 @@ static void test_VarWeekdayName(void) static void test_VarFormatFromTokens(void) { - static WCHAR number_fmt[] = {'#','#','#',',','#','#','0','.','0','0',0}; - static const WCHAR number[] = {'6',',','9','0',0}; - static const WCHAR number_us[] = {'6','9','0','.','0','0',0}; - - static WCHAR date_fmt[] = {'d','d','-','m','m',0}; - static const WCHAR date[] = {'1','2','-','1','1',0}; - static const WCHAR date_us[] = {'1','1','-','1','2',0}; - - static WCHAR string_fmt[] = {'@',0}; - static const WCHAR string_de[] = {'1',',','5',0}; - static const WCHAR string_us[] = {'1','.','5',0}; + static WCHAR number_fmt[] = L"###,##0.00"; + static WCHAR date_fmt[] = L"dd-mm"; + static WCHAR string_fmt[] = L"@"; BYTE buff[256]; LCID lcid; @@ -541,14 +528,14 @@ static void test_VarFormatFromTokens(void) HRESULT hres; V_VT(&var) = VT_BSTR; - V_BSTR(&var) = SysAllocString(number); + V_BSTR(&var) = SysAllocString(L"6,90"); lcid = MAKELCID(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), SORT_DEFAULT); hres = VarTokenizeFormatString(number_fmt, buff, sizeof(buff), 1, 1, lcid, NULL); ok(hres == S_OK, "VarTokenizeFormatString failed: %x\n", hres); hres = VarFormatFromTokens(&var, number_fmt, buff, 0, &bstr, lcid); ok(hres == S_OK, "VarFormatFromTokens failed: %x\n", hres); - ok(!wcscmp(bstr, number_us), "incorrectly formatted number: %s\n", wine_dbgstr_w(bstr)); + ok(!wcscmp(bstr, L"690.00"), "incorrectly formatted number: %s\n", wine_dbgstr_w(bstr)); SysFreeString(bstr); lcid = MAKELCID(MAKELANGID(LANG_GERMAN, SUBLANG_GERMAN), SORT_DEFAULT); @@ -556,20 +543,20 @@ static void test_VarFormatFromTokens(void) ok(hres == S_OK, "VarTokenizeFormatString failed: %x\n", hres); hres = VarFormatFromTokens(&var, number_fmt, buff, 0, &bstr, lcid); ok(hres == S_OK, "VarFormatFromTokens failed: %x\n", hres); - ok(!wcscmp(bstr, number), "incorrectly formatted number: %s\n", wine_dbgstr_w(bstr)); + ok(!wcscmp(bstr, L"6,90"), "incorrectly formatted number: %s\n", wine_dbgstr_w(bstr)); SysFreeString(bstr); VariantClear(&var); V_VT(&var) = VT_BSTR; - V_BSTR(&var) = SysAllocString(date); + V_BSTR(&var) = SysAllocString(L"12-11"); lcid = MAKELCID(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), SORT_DEFAULT); hres = VarTokenizeFormatString(date_fmt, buff, sizeof(buff), 1, 1, lcid, NULL); ok(hres == S_OK, "VarTokenizeFormatString failed: %x\n", hres); hres = VarFormatFromTokens(&var, date_fmt, buff, 0, &bstr, lcid); ok(hres == S_OK, "VarFormatFromTokens failed: %x\n", hres); - ok(!wcscmp(bstr, date_us), "incorrectly formatted date: %s\n", wine_dbgstr_w(bstr)); + ok(!wcscmp(bstr, L"11-12"), "incorrectly formatted date: %s\n", wine_dbgstr_w(bstr)); SysFreeString(bstr); lcid = MAKELCID(MAKELANGID(LANG_GERMAN, SUBLANG_GERMAN), SORT_DEFAULT); @@ -577,7 +564,7 @@ static void test_VarFormatFromTokens(void) ok(hres == S_OK, "VarTokenizeFormatString failed: %x\n", hres); hres = VarFormatFromTokens(&var, date_fmt, buff, 0, &bstr, lcid); ok(hres == S_OK, "VarFormatFromTokens failed: %x\n", hres); - ok(!wcscmp(bstr, date), "incorrectly formatted date: %s\n", wine_dbgstr_w(bstr)); + ok(!wcscmp(bstr, L"12-11"), "incorrectly formatted date: %s\n", wine_dbgstr_w(bstr)); SysFreeString(bstr); VariantClear(&var); @@ -590,7 +577,7 @@ static void test_VarFormatFromTokens(void) ok(hres == S_OK, "VarTokenizeFormatString failed: %x\n", hres); hres = VarFormatFromTokens(&var, string_fmt, buff, 0, &bstr, lcid); ok(hres == S_OK, "VarFormatFromTokens failed: %x\n", hres); - ok(!wcscmp(bstr, string_us), "incorrectly formatted string: %s\n", wine_dbgstr_w(bstr)); + ok(!wcscmp(bstr, L"1.5"), "incorrectly formatted string: %s\n", wine_dbgstr_w(bstr)); SysFreeString(bstr); lcid = MAKELCID(MAKELANGID(LANG_GERMAN, SUBLANG_GERMAN), SORT_DEFAULT); @@ -598,7 +585,7 @@ static void test_VarFormatFromTokens(void) ok(hres == S_OK, "VarTokenizeFormatString failed: %x\n", hres); hres = VarFormatFromTokens(&var, string_fmt, buff, 0, &bstr, lcid); ok(hres == S_OK, "VarFormatFromTokens failed: %x\n", hres); - ok(!wcscmp(bstr, string_de), "incorrectly formatted string: %s\n", wine_dbgstr_w(bstr)); + ok(!wcscmp(bstr, L"1,5"), "incorrectly formatted string: %s\n", wine_dbgstr_w(bstr)); SysFreeString(bstr); }
1
0
0
0
Nikolay Sivov : oleaut32/tests: Remove workarounds in VarFormat* tests.
by Alexandre Julliard
05 Feb '21
05 Feb '21
Module: wine Branch: master Commit: f1abfc6933b689de249deb90737abbed819e1cf6 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=f1abfc6933b689de249deb90…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Fri Feb 5 10:30:45 2021 +0300 oleaut32/tests: Remove workarounds in VarFormat* tests. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/oleaut32/tests/varformat.c | 70 +++++++++++------------------------------ 1 file changed, 19 insertions(+), 51 deletions(-) diff --git a/dlls/oleaut32/tests/varformat.c b/dlls/oleaut32/tests/varformat.c index 9e4cc063f94..1bd1917d209 100644 --- a/dlls/oleaut32/tests/varformat.c +++ b/dlls/oleaut32/tests/varformat.c @@ -37,22 +37,9 @@ #include "wtypes.h" #include "oleauto.h" -static HMODULE hOleaut32; - -static HRESULT (WINAPI *pVarFormatNumber)(LPVARIANT,int,int,int,int,ULONG,BSTR*); -static HRESULT (WINAPI *pVarFormat)(LPVARIANT,LPOLESTR,int,int,ULONG,BSTR*); -static HRESULT (WINAPI *pVarWeekdayName)(int,int,int,ULONG,BSTR*); - -/* Has I8/UI8 data type? */ -static BOOL has_i8; - -/* Get a conversion function ptr, return if function not available */ -#define CHECKPTR(func) p##func = (void*)GetProcAddress(hOleaut32, #func); \ - if (!p##func) { win_skip("function " # func " not available, not testing it\n"); return; } - #define FMT_NUMBER(vt,val) \ VariantInit(&v); V_VT(&v) = vt; val(&v) = 1; \ - hres = pVarFormatNumber(&v,2,0,0,0,0,&str); \ + hres = VarFormatNumber(&v,2,0,0,0,0,&str); \ ok(hres == S_OK, "VarFormatNumber (vt %d): returned %8x\n", vt, hres); \ if (hres == S_OK) { \ ok(str && wcscmp(str,szResult1) == 0, \ @@ -71,8 +58,6 @@ static void test_VarFormatNumber(void) VARIANT v; BSTR str = NULL; - CHECKPTR(VarFormatNumber); - GetLocaleInfoA(LOCALE_USER_DEFAULT, LOCALE_SDECIMAL, buff, ARRAY_SIZE(buff)); if (buff[0] != '.' || buff[1]) { @@ -86,11 +71,8 @@ static void test_VarFormatNumber(void) FMT_NUMBER(VT_UI2, V_UI2); FMT_NUMBER(VT_I4, V_I4); FMT_NUMBER(VT_UI4, V_UI4); - if (has_i8) - { - FMT_NUMBER(VT_I8, V_I8); - FMT_NUMBER(VT_UI8, V_UI8); - } + FMT_NUMBER(VT_I8, V_I8); + FMT_NUMBER(VT_UI8, V_UI8); FMT_NUMBER(VT_R4, V_R4); FMT_NUMBER(VT_R8, V_R8); FMT_NUMBER(VT_BOOL, V_BOOL); @@ -98,7 +80,7 @@ static void test_VarFormatNumber(void) V_VT(&v) = VT_BSTR; V_BSTR(&v) = SysAllocString(szSrc1); - hres = pVarFormatNumber(&v,2,0,0,0,0,&str); + hres = VarFormatNumber(&v,2,0,0,0,0,&str); ok(hres == S_OK, "VarFormatNumber (bstr): returned %8x\n", hres); if (hres == S_OK) ok(str && wcscmp(str, szResult1) == 0, "VarFormatNumber (bstr): string different\n"); @@ -106,7 +88,7 @@ static void test_VarFormatNumber(void) SysFreeString(str); V_BSTR(&v) = SysAllocString(szSrc2); - hres = pVarFormatNumber(&v,2,0,-1,0,0,&str); + hres = VarFormatNumber(&v,2,0,-1,0,0,&str); ok(hres == S_OK, "VarFormatNumber (bstr): returned %8x\n", hres); if (hres == S_OK) ok(str && wcscmp(str, szResult2) == 0, "VarFormatNumber (-bstr): string different\n"); @@ -121,7 +103,7 @@ static const char *szVarFmtFail = "VT %d|0x%04x Format %s: expected 0x%08x, '%s' out = NULL; \ V_VT(&in) = (vt); v(&in) = val; \ if (fmt) MultiByteToWideChar(CP_ACP, 0, fmt, -1, buffW, ARRAY_SIZE(buffW)); \ - hres = pVarFormat(&in,fmt ? buffW : NULL,fd,fw,flags,&out); \ + hres = VarFormat(&in,fmt ? buffW : NULL,fd,fw,flags,&out); \ if (SUCCEEDED(hres)) WideCharToMultiByte(CP_ACP, 0, out, -1, buff, sizeof(buff),0,0); \ else buff[0] = '\0'; \ ok(hres == ret && (FAILED(ret) || !strcmp(buff, str)), \ @@ -242,8 +224,6 @@ static void test_VarFormat(void) BSTR bstrin, out = NULL; HRESULT hres; - CHECKPTR(VarFormat); - if (PRIMARYLANGID(LANGIDFROMLCID(GetUserDefaultLCID())) != LANG_ENGLISH) { skip("Skipping VarFormat tests for non English language\n"); @@ -268,18 +248,12 @@ static void test_VarFormat(void) VNUMFMT(VT_I1,V_I1); VNUMFMT(VT_I2,V_I2); VNUMFMT(VT_I4,V_I4); - if (has_i8) - { - VNUMFMT(VT_I8,V_I8); - } + VNUMFMT(VT_I8,V_I8); VNUMFMT(VT_INT,V_INT); VNUMFMT(VT_UI1,V_UI1); VNUMFMT(VT_UI2,V_UI2); VNUMFMT(VT_UI4,V_UI4); - if (has_i8) - { - VNUMFMT(VT_UI8,V_UI8); - } + VNUMFMT(VT_UI8,V_UI8); VNUMFMT(VT_UINT,V_UINT); VNUMFMT(VT_R4,V_R4); VNUMFMT(VT_R8,V_R8); @@ -414,21 +388,21 @@ static void test_VarFormat(void) /* 'out' is not cleared */ out = (BSTR)0x1; - hres = pVarFormat(&in,NULL,fd,fw,flags,&out); /* Would crash if out is cleared */ + hres = VarFormat(&in,NULL,fd,fw,flags,&out); /* Would crash if out is cleared */ ok(hres == S_OK, "got %08x\n", hres); SysFreeString(out); out = NULL; /* VT_NULL */ V_VT(&in) = VT_NULL; - hres = pVarFormat(&in,NULL,fd,fw,0,&out); + hres = VarFormat(&in,NULL,fd,fw,0,&out); ok(hres == S_OK, "VarFormat failed with 0x%08x\n", hres); ok(out == NULL, "expected NULL formatted string\n"); /* Invalid args */ - hres = pVarFormat(&in,NULL,fd,fw,flags,NULL); + hres = VarFormat(&in,NULL,fd,fw,flags,NULL); ok(hres == E_INVALIDARG, "Null out: expected E_INVALIDARG, got 0x%08x\n", hres); - hres = pVarFormat(NULL,NULL,fd,fw,flags,&out); + hres = VarFormat(NULL,NULL,fd,fw,flags,&out); ok(hres == E_INVALIDARG, "Null in: expected E_INVALIDARG, got 0x%08x\n", hres); fd = -1; VARFMT(VT_BOOL,V_BOOL,VARIANT_TRUE,"",E_INVALIDARG,""); @@ -444,7 +418,7 @@ static const char *szVarWdnFail = "VarWeekdayName (%d, %d, %d, %d, %x): returned %8x, expected %8x\n"; #define VARWDN(iWeekday, fAbbrev, iFirstDay, dwFlags, ret, buff, out, freeOut) \ do { \ - hres = pVarWeekdayName(iWeekday, fAbbrev, iFirstDay, dwFlags, &out); \ + hres = VarWeekdayName(iWeekday, fAbbrev, iFirstDay, dwFlags, &out); \ if (SUCCEEDED(hres)) { \ WideCharToMultiByte(CP_ACP, 0, out, -1, buff, sizeof(buff), 0, 0); \ if (freeOut) SysFreeString(out); \ @@ -476,8 +450,6 @@ static void test_VarWeekdayName(void) int size; DWORD localeValue; - CHECKPTR(VarWeekdayName); - SetLastError(0xdeadbeef); GetLocaleInfoW(LOCALE_USER_DEFAULT, 0, NULL, 0); if (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) @@ -511,7 +483,7 @@ static void test_VarWeekdayName(void) VARWDN_F(4, 0, -1, 0, E_INVALIDARG); VARWDN_F(4, 0, 8, 0, E_INVALIDARG); - hres = pVarWeekdayName(1, 0, 0, 0, NULL); + hres = VarWeekdayName(1, 0, 0, 0, NULL); ok(E_INVALIDARG == hres, "Null pointer: expected E_INVALIDARG, got 0x%08x\n", hres); @@ -668,13 +640,9 @@ static void test_GetAltMonthNames(void) START_TEST(varformat) { - hOleaut32 = GetModuleHandleA("oleaut32.dll"); - - has_i8 = GetProcAddress(hOleaut32, "VarI8FromI1") != NULL; - - test_VarFormatNumber(); - test_VarFormat(); - test_VarWeekdayName(); - test_VarFormatFromTokens(); - test_GetAltMonthNames(); + test_VarFormatNumber(); + test_VarFormat(); + test_VarWeekdayName(); + test_VarFormatFromTokens(); + test_GetAltMonthNames(); }
1
0
0
0
Sebastian Lackner : ntdll: Return STATUS_INVALID_DEVICE_REQUEST when trying to call NtReadFile on directory.
by Alexandre Julliard
05 Feb '21
05 Feb '21
Module: wine Branch: master Commit: 43de1407e92296882c9c04e095f141a5df968808 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=43de1407e92296882c9c04e0…
Author: Sebastian Lackner <sebastian(a)fds-team.de> Date: Thu Feb 4 18:05:00 2021 -0600 ntdll: Return STATUS_INVALID_DEVICE_REQUEST when trying to call NtReadFile on directory. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/tests/file.c | 1 - dlls/ntdll/unix/file.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/dlls/ntdll/tests/file.c b/dlls/ntdll/tests/file.c index 2507437c8c3..839046a7488 100644 --- a/dlls/ntdll/tests/file.c +++ b/dlls/ntdll/tests/file.c @@ -171,7 +171,6 @@ static void create_file_test(void) U(io).Status = 0xdeadbeef; offset.QuadPart = 0; status = pNtReadFile( dir, NULL, NULL, NULL, &io, buf, sizeof(buf), &offset, NULL ); - todo_wine ok( status == STATUS_INVALID_DEVICE_REQUEST || status == STATUS_PENDING, "NtReadFile error %08x\n", status ); if (status == STATUS_PENDING) { diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c index c41d6bbfa6c..68ce40eb700 100644 --- a/dlls/ntdll/unix/file.c +++ b/dlls/ntdll/unix/file.c @@ -344,7 +344,7 @@ NTSTATUS errno_to_status( int err ) case EACCES: return STATUS_ACCESS_DENIED; case ENOTDIR: return STATUS_OBJECT_PATH_NOT_FOUND; case ENOENT: return STATUS_OBJECT_NAME_NOT_FOUND; - case EISDIR: return STATUS_FILE_IS_A_DIRECTORY; + case EISDIR: return STATUS_INVALID_DEVICE_REQUEST; case EMFILE: case ENFILE: return STATUS_TOO_MANY_OPENED_FILES; case EINVAL: return STATUS_INVALID_PARAMETER;
1
0
0
0
Zebediah Figura : winegstreamer: Factor out free_stream().
by Alexandre Julliard
05 Feb '21
05 Feb '21
Module: wine Branch: master Commit: 41e53a122dc036db084817f56bdd52d3d252eb16 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=41e53a122dc036db084817f5…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Thu Feb 4 20:53:41 2021 -0600 winegstreamer: Factor out free_stream(). Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/winegstreamer/gstdemux.c | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/dlls/winegstreamer/gstdemux.c b/dlls/winegstreamer/gstdemux.c index fdc10f72802..7b3a4fd48bd 100644 --- a/dlls/winegstreamer/gstdemux.c +++ b/dlls/winegstreamer/gstdemux.c @@ -2456,17 +2456,8 @@ static void source_disconnect(struct strmbase_source *iface) stream->enabled = false; } -static void free_source_pin(struct parser_source *pin) +static void free_stream(struct wg_parser_stream *stream) { - struct wg_parser_stream *stream = pin->wg_stream; - - if (pin->pin.pin.peer) - { - if (SUCCEEDED(IMemAllocator_Decommit(pin->pin.pAllocator))) - IPin_Disconnect(pin->pin.pin.peer); - IPin_Disconnect(&pin->pin.pin.IPin_iface); - } - if (stream->their_src) { if (stream->post_sink) @@ -2488,6 +2479,18 @@ static void free_source_pin(struct parser_source *pin) pthread_cond_destroy(&stream->event_empty_cond); free(stream); +} + +static void free_source_pin(struct parser_source *pin) +{ + if (pin->pin.pin.peer) + { + if (SUCCEEDED(IMemAllocator_Decommit(pin->pin.pAllocator))) + IPin_Disconnect(pin->pin.pin.peer); + IPin_Disconnect(&pin->pin.pin.IPin_iface); + } + + free_stream(pin->wg_stream); pin->flushing_cs.DebugInfo->Spare[0] = 0; DeleteCriticalSection(&pin->flushing_cs);
1
0
0
0
Zebediah Figura : winegstreamer: Use the "streams" array in wg_parser code.
by Alexandre Julliard
05 Feb '21
05 Feb '21
Module: wine Branch: master Commit: 45ebc26dcf18aab4c8b56cd4e1d790bf69b0dc55 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=45ebc26dcf18aab4c8b56cd4…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Thu Feb 4 20:53:40 2021 -0600 winegstreamer: Use the "streams" array in wg_parser code. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/winegstreamer/gstdemux.c | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/dlls/winegstreamer/gstdemux.c b/dlls/winegstreamer/gstdemux.c index a63e91c9a65..fdc10f72802 100644 --- a/dlls/winegstreamer/gstdemux.c +++ b/dlls/winegstreamer/gstdemux.c @@ -1228,14 +1228,15 @@ static DWORD CALLBACK read_thread(void *arg) static void removed_decoded_pad(GstElement *bin, GstPad *pad, gpointer user) { struct parser *filter = user; + struct wg_parser *parser = filter->wg_parser; unsigned int i; char *name; GST_LOG("filter %p, bin %p, pad %p.", filter, bin, pad); - for (i = 0; i < filter->source_count; ++i) + for (i = 0; i < parser->stream_count; ++i) { - struct wg_parser_stream *stream = filter->sources[i]->wg_stream; + struct wg_parser_stream *stream = parser->streams[i]; if (stream->their_src == pad) { @@ -1785,14 +1786,12 @@ static HRESULT parser_cleanup_stream(struct strmbase_filter *iface) parser->flushing = true; pthread_mutex_unlock(&parser->mutex); - for (i = 0; i < filter->source_count; ++i) + for (i = 0; i < parser->stream_count; ++i) { - struct parser_source *pin = filter->sources[i]; + struct wg_parser_stream *stream = parser->streams[i]; - if (!pin->pin.pin.peer) - continue; - - pthread_cond_signal(&pin->wg_stream->event_cond); + if (stream->enabled) + pthread_cond_signal(&stream->event_cond); } for (i = 0; i < filter->source_count; ++i) @@ -2573,10 +2572,10 @@ static HRESULT GST_RemoveOutputPins(struct parser *This) /* Unblock all of our streams. */ pthread_mutex_lock(&parser->mutex); - for (i = 0; i < This->source_count; ++i) + for (i = 0; i < parser->stream_count; ++i) { - This->sources[i]->wg_stream->flushing = true; - pthread_cond_signal(&This->sources[i]->wg_stream->event_empty_cond); + parser->streams[i]->flushing = true; + pthread_cond_signal(&parser->streams[i]->event_empty_cond); } pthread_mutex_unlock(&parser->mutex);
1
0
0
0
Zebediah Figura : winegstreamer: Store the stream duration also in the wg_parser_stream structure.
by Alexandre Julliard
05 Feb '21
05 Feb '21
Module: wine Branch: master Commit: 42dc1e93b214bb41e6524d49196e6413b5ffc735 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=42dc1e93b214bb41e6524d49…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Thu Feb 4 20:53:39 2021 -0600 winegstreamer: Store the stream duration also in the wg_parser_stream structure. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/winegstreamer/gstdemux.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dlls/winegstreamer/gstdemux.c b/dlls/winegstreamer/gstdemux.c index d9cc072a8c7..a63e91c9a65 100644 --- a/dlls/winegstreamer/gstdemux.c +++ b/dlls/winegstreamer/gstdemux.c @@ -110,6 +110,8 @@ struct wg_parser_stream struct wg_parser_event event; bool flushing, eos, enabled; + + uint64_t duration; }; struct parser @@ -1638,7 +1640,8 @@ static HRESULT GST_Connect(struct parser *This, IPin *pConnectPin) struct parser_source *pin = This->sources[i]; struct wg_parser_stream *stream = pin->wg_stream; - pin->seek.llDuration = pin->seek.llStop = query_duration(stream->their_src); + stream->duration = query_duration(stream->their_src); + pin->seek.llDuration = pin->seek.llStop = stream->duration; pin->seek.llCurrent = 0; while (!stream->caps && !parser->error) pthread_cond_wait(&parser->init_cond, &parser->mutex);
1
0
0
0
Zebediah Figura : winegstreamer: Store the wg_parser_stream pointers also in struct wg_parser.
by Alexandre Julliard
05 Feb '21
05 Feb '21
Module: wine Branch: master Commit: a03f7350b309ca7025783be1d2478c305d20dbf7 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=a03f7350b309ca7025783be1…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Thu Feb 4 20:53:38 2021 -0600 winegstreamer: Store the wg_parser_stream pointers also in struct wg_parser. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/winegstreamer/gstdemux.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/dlls/winegstreamer/gstdemux.c b/dlls/winegstreamer/gstdemux.c index 31f0a07d93f..d9cc072a8c7 100644 --- a/dlls/winegstreamer/gstdemux.c +++ b/dlls/winegstreamer/gstdemux.c @@ -48,6 +48,9 @@ static const GUID MEDIASUBTYPE_CVID = {mmioFOURCC('c','v','i','d'), 0x0000, 0x00 struct wg_parser { + struct wg_parser_stream **streams; + unsigned int stream_count; + GstElement *container; GstBus *bus; GstPad *my_src, *their_sink; @@ -2505,14 +2508,20 @@ static const struct strmbase_source_ops source_ops = static struct parser_source *create_pin(struct parser *filter, const WCHAR *name) { - struct parser_source *pin, **new_array; + struct wg_parser *parser = filter->wg_parser; struct wg_parser_stream *stream; + struct parser_source *pin; char pad_name[19]; + void *new_array; - if (!(new_array = heap_realloc(filter->sources, (filter->source_count + 1) * sizeof(*new_array)))) + if (!(new_array = heap_realloc(filter->sources, (filter->source_count + 1) * sizeof(*filter->sources)))) return NULL; filter->sources = new_array; + if (!(new_array = realloc(parser->streams, (parser->stream_count + 1) * sizeof(*parser->streams)))) + return NULL; + parser->streams = new_array; + if (!(pin = heap_alloc_zero(sizeof(*pin)))) return NULL; @@ -2544,6 +2553,7 @@ static struct parser_source *create_pin(struct parser *filter, const WCHAR *name gst_pad_set_query_function(stream->my_sink, query_sink_wrapper); filter->sources[filter->source_count++] = pin; + parser->streams[parser->stream_count++] = stream; return pin; } @@ -2589,6 +2599,9 @@ static HRESULT GST_RemoveOutputPins(struct parser *This) This->source_count = 0; heap_free(This->sources); This->sources = NULL; + parser->stream_count = 0; + free(parser->streams); + parser->streams = NULL; gst_element_set_bus(parser->container, NULL); gst_object_unref(parser->container); parser->container = NULL;
1
0
0
0
Zebediah Figura : winegstreamer: Store the wg_parser pointer as our source pad's private data.
by Alexandre Julliard
05 Feb '21
05 Feb '21
Module: wine Branch: master Commit: a2ce39394e2f785b2ea89f5a9592014626e96ea1 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=a2ce39394e2f785b2ea89f5a…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Thu Feb 4 20:53:37 2021 -0600 winegstreamer: Store the wg_parser pointer as our source pad's private data. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/winegstreamer/gstdemux.c | 35 +++++++++++++++-------------------- 1 file changed, 15 insertions(+), 20 deletions(-) diff --git a/dlls/winegstreamer/gstdemux.c b/dlls/winegstreamer/gstdemux.c index 45bd2f9a4a9..31f0a07d93f 100644 --- a/dlls/winegstreamer/gstdemux.c +++ b/dlls/winegstreamer/gstdemux.c @@ -636,9 +636,8 @@ static gboolean query_sink(GstPad *pad, GstObject *parent, GstQuery *query) } } -static gboolean gst_base_src_perform_seek(struct parser *This, GstEvent *event) +static gboolean gst_base_src_perform_seek(struct wg_parser *parser, GstEvent *event) { - struct wg_parser *parser = This->wg_parser; gboolean res = TRUE; gdouble rate; GstFormat seek_format; @@ -687,15 +686,15 @@ static gboolean gst_base_src_perform_seek(struct parser *This, GstEvent *event) static gboolean event_src(GstPad *pad, GstObject *parent, GstEvent *event) { - struct parser *This = gst_pad_get_element_private(pad); + struct wg_parser *parser = gst_pad_get_element_private(pad); gboolean ret = TRUE; - GST_LOG("filter %p, type \"%s\".", This, GST_EVENT_TYPE_NAME(event)); + GST_LOG("parser %p, type \"%s\".", parser, GST_EVENT_TYPE_NAME(event)); switch (event->type) { case GST_EVENT_SEEK: - ret = gst_base_src_perform_seek(This, event); + ret = gst_base_src_perform_seek(parser, event); break; case GST_EVENT_FLUSH_START: @@ -848,10 +847,9 @@ static gboolean event_sink(GstPad *pad, GstObject *parent, GstEvent *event) static GstFlowReturn request_buffer_src(GstPad *pad, GstObject *parent, guint64 offset, guint size, GstBuffer **buffer); -static void *push_data(void *iface) +static void *push_data(void *arg) { - struct parser *This = iface; - struct wg_parser *parser = This->wg_parser; + struct wg_parser *parser = arg; GstBuffer *buffer; LONGLONG maxlen; @@ -1125,8 +1123,7 @@ static DWORD CALLBACK stream_thread(void *arg) static GstFlowReturn request_buffer_src(GstPad *pad, GstObject *parent, guint64 offset, guint size, GstBuffer **buffer) { - struct parser *filter = gst_pad_get_element_private(pad); - struct wg_parser *parser = filter->wg_parser; + struct wg_parser *parser = gst_pad_get_element_private(pad); GstBuffer *new_buffer = NULL; GstFlowReturn ret; @@ -1414,11 +1411,10 @@ static void existing_new_pad(GstElement *bin, GstPad *pad, gpointer user) static gboolean query_function(GstPad *pad, GstObject *parent, GstQuery *query) { - struct parser *This = gst_pad_get_element_private(pad); - struct wg_parser *parser = This->wg_parser; + struct wg_parser *parser = gst_pad_get_element_private(pad); GstFormat format; - GST_LOG("filter %p, type %s.", This, GST_QUERY_TYPE_NAME(query)); + GST_LOG("parser %p, type %s.", parser, GST_QUERY_TYPE_NAME(query)); switch (GST_QUERY_TYPE(query)) { case GST_QUERY_DURATION: @@ -1456,8 +1452,7 @@ static gboolean query_function(GstPad *pad, GstObject *parent, GstQuery *query) static gboolean activate_push(GstPad *pad, gboolean activate) { - struct parser *This = gst_pad_get_element_private(pad); - struct wg_parser *parser = This->wg_parser; + struct wg_parser *parser = gst_pad_get_element_private(pad); if (!activate) { if (parser->push_thread) { @@ -1467,7 +1462,7 @@ static gboolean activate_push(GstPad *pad, gboolean activate) } else if (!parser->push_thread) { int ret; - if ((ret = pthread_create(&parser->push_thread, NULL, push_data, This))) + if ((ret = pthread_create(&parser->push_thread, NULL, push_data, parser))) { GST_ERROR("Failed to create push thread: %s", strerror(errno)); parser->push_thread = 0; @@ -1479,10 +1474,10 @@ static gboolean activate_push(GstPad *pad, gboolean activate) static gboolean activate_mode(GstPad *pad, GstObject *parent, GstPadMode mode, gboolean activate) { - struct parser *filter = gst_pad_get_element_private(pad); + struct wg_parser *parser = gst_pad_get_element_private(pad); - GST_DEBUG("%s source pad for filter %p in %s mode.", - activate ? "Activating" : "Deactivating", filter, gst_pad_mode_get_name(mode)); + GST_DEBUG("%s source pad for parser %p in %s mode.", + activate ? "Activating" : "Deactivating", parser, gst_pad_mode_get_name(mode)); switch (mode) { case GST_PAD_MODE_PULL: @@ -1625,7 +1620,7 @@ static HRESULT GST_Connect(struct parser *This, IPin *pConnectPin) gst_pad_set_query_function(parser->my_src, query_function); gst_pad_set_activatemode_function(parser->my_src, activate_mode); gst_pad_set_event_function(parser->my_src, event_src); - gst_pad_set_element_private (parser->my_src, This); + gst_pad_set_element_private(parser->my_src, parser); parser->start_offset = parser->next_offset = parser->stop_offset = 0; This->next_pull_offset = 0;
1
0
0
0
Daniel Lehman : include: Fix [v]sprintf_s declarations.
by Alexandre Julliard
05 Feb '21
05 Feb '21
Module: wine Branch: master Commit: 3746381e7e8cf2671567712f6d3f17a9823e8c5b URL:
https://source.winehq.org/git/wine.git/?a=commit;h=3746381e7e8cf2671567712f…
Author: Daniel Lehman <dlehman(a)esri.com> Date: Mon Feb 1 17:42:16 2021 -0800 include: Fix [v]sprintf_s declarations. Signed-off-by: Daniel Lehman <dlehman(a)esri.com> Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- include/msvcrt/stdio.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/msvcrt/stdio.h b/include/msvcrt/stdio.h index 7dd177e9052..f78e3b36f2b 100644 --- a/include/msvcrt/stdio.h +++ b/include/msvcrt/stdio.h @@ -218,19 +218,19 @@ static inline int __cdecl vsprintf(char *buffer, const char *format, __ms_va_lis return ret < 0 ? -1 : ret; } -static inline int __cdecl vsprintf_s(char *buffer, const char *format, __ms_va_list args) +static inline int __cdecl vsprintf_s(char *buffer, size_t size, const char *format, __ms_va_list args) { - int ret = __stdio_common_vsprintf_s(_CRT_INTERNAL_LOCAL_PRINTF_OPTIONS, buffer, -1, format, NULL, args); + int ret = __stdio_common_vsprintf_s(_CRT_INTERNAL_LOCAL_PRINTF_OPTIONS, buffer, size, format, NULL, args); return ret < 0 ? -1 : ret; } -static inline int WINAPIV sprintf_s(char *buffer, size_t size, size_t count, const char *format, ...) +static inline int WINAPIV sprintf_s(char *buffer, size_t size, const char *format, ...) { int ret; __ms_va_list args; __ms_va_start(args, format); - ret = __stdio_common_vsprintf_s(_CRT_INTERNAL_LOCAL_PRINTF_OPTIONS, buffer, -1, format, NULL, args); + ret = __stdio_common_vsprintf_s(_CRT_INTERNAL_LOCAL_PRINTF_OPTIONS, buffer, size, format, NULL, args); __ms_va_end(args); return ret; }
1
0
0
0
Francois Gouget : testbot/reporttest: Match the terminology of the rest of the TestBot code.
by Alexandre Julliard
05 Feb '21
05 Feb '21
Module: tools Branch: master Commit: c17e32871e88d47b1fba70b2cd7f757a233b36b1 URL:
https://source.winehq.org/git/tools.git/?a=commit;h=c17e32871e88d47b1fba70b…
Author: Francois Gouget <fgouget(a)codeweavers.com> Date: Fri Feb 5 16:07:24 2021 +0100 testbot/reporttest: Match the terminology of the rest of the TestBot code. Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- testbot/src/reporttest/report.template | 94 +++++++++++++++++----------------- testbot/src/reporttest/reporttest.c | 8 +-- 2 files changed, 51 insertions(+), 51 deletions(-) Diff:
https://source.winehq.org/git/tools.git/?a=commitdiff;h=c17e32871e88d47b1fb…
1
0
0
0
← Newer
1
...
70
71
72
73
74
75
76
...
92
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
Results per page:
10
25
50
100
200