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 2020
----- 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
874 discussions
Start a n
N
ew thread
Michael Stefaniuc : mshtml/tests: Get rid of a2bstr() in events.c.
by Alexandre Julliard
12 Feb '20
12 Feb '20
Module: wine Branch: master Commit: f4f33bc6cdc5d6067b1813a1e1dbe34670160715 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=f4f33bc6cdc5d6067b1813a1…
Author: Michael Stefaniuc <mstefani(a)winehq.org> Date: Wed Feb 12 00:32:46 2020 +0100 mshtml/tests: Get rid of a2bstr() in events.c. Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mshtml/tests/events.c | 136 +++++++++++++++++++++------------------------ 1 file changed, 62 insertions(+), 74 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=f4f33bc6cdc5d6067b18…
1
0
0
0
Michael Stefaniuc : mshtml/tests: Avoid a2bstr() on string literals in dom.c.
by Alexandre Julliard
12 Feb '20
12 Feb '20
Module: wine Branch: master Commit: 8b5dac461f2b43be017090e68d8cc1a673e9751e URL:
https://source.winehq.org/git/wine.git/?a=commit;h=8b5dac461f2b43be017090e6…
Author: Michael Stefaniuc <mstefani(a)winehq.org> Date: Wed Feb 12 00:32:44 2020 +0100 mshtml/tests: Avoid a2bstr() on string literals in dom.c. Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mshtml/tests/dom.c | 134 ++++++++++++++++++++++++------------------------ 1 file changed, 67 insertions(+), 67 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=8b5dac461f2b43be0170…
1
0
0
0
Michael Stefaniuc : mshtml/tests: Get rid of a2bstr() in activex.c.
by Alexandre Julliard
12 Feb '20
12 Feb '20
Module: wine Branch: master Commit: 27b53fb0ca6ce7434887e713572383482c0fb871 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=27b53fb0ca6ce7434887e713…
Author: Michael Stefaniuc <mstefani(a)winehq.org> Date: Wed Feb 12 00:25:19 2020 +0100 mshtml/tests: Get rid of a2bstr() in activex.c. Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mshtml/tests/activex.c | 30 +++++++++--------------------- 1 file changed, 9 insertions(+), 21 deletions(-) diff --git a/dlls/mshtml/tests/activex.c b/dlls/mshtml/tests/activex.c index a9af72d91c..23e4b00cac 100644 --- a/dlls/mshtml/tests/activex.c +++ b/dlls/mshtml/tests/activex.c @@ -195,18 +195,6 @@ static void _test_ifaces(unsigned line, IUnknown *iface, REFIID *iids) } } -static BSTR a2bstr(const char *str) -{ - BSTR ret; - int len; - - len = MultiByteToWideChar(CP_ACP, 0, str, -1, NULL, 0); - ret = SysAllocStringLen(NULL, len); - MultiByteToWideChar(CP_ACP, 0, str, -1, ret, len); - - return ret; -} - static IOleClientSite *client_site; static IDispatch *sink_disp; static READYSTATE plugin_readystate = READYSTATE_UNINITIALIZED; @@ -1527,7 +1515,7 @@ static void test_elem_dispex(IDispatchEx *dispex) BSTR str; HRESULT hres; - str = a2bstr("scriptprop"); + str = SysAllocString(L"scriptprop"); SET_EXPECT(GetIDsOfNames_scriptprop); hres = IDispatchEx_GetDispID(dispex, str, 0, &id); CHECK_CALLED(GetIDsOfNames_scriptprop); @@ -1625,7 +1613,7 @@ static void test_object_elem(IHTMLDocument2 *doc) hres = IHTMLDocument2_QueryInterface(doc, &IID_IHTMLDocument3, (void**)&doc3); ok(hres == S_OK, "Could not get IHTMLDocument3 iface: %08x\n", hres); - str = a2bstr("objid"); + str = SysAllocString(L"objid"); elem = (void*)0xdeadbeef; hres = IHTMLDocument3_getElementById(doc3, str, &elem); IHTMLDocument3_Release(doc3); @@ -2596,7 +2584,7 @@ static void test_nooleobj_ax(void) release_doc(doc); } -static void test_exec_script(IHTMLDocument2 *doc, const char *codea, const char *langa) +static void test_exec_script(IHTMLDocument2 *doc, const WCHAR *codew, const WCHAR *langw) { IHTMLWindow2 *window; BSTR code, lang; @@ -2606,8 +2594,8 @@ static void test_exec_script(IHTMLDocument2 *doc, const char *codea, const char hres = IHTMLDocument2_get_parentWindow(doc, &window); ok(hres == S_OK, "get_parentWindow failed: %08x\n", hres); - code = a2bstr(codea); - lang = a2bstr(langa); + code = SysAllocString(codew); + lang = SysAllocString(langw); hres = IHTMLWindow2_execScript(window, code, lang, &v); ok(hres == S_OK, "execScript failed: %08x\n", hres); @@ -2635,9 +2623,9 @@ static void test_create_element(void) SET_EXPECT(FreezeEvents_FALSE); test_exec_script(doc, - "var test_elem = document.createElement('object');" + L"var test_elem = document.createElement('object');" "test_elem.classid = 'CLSID:178fc163-f585-4e24-9c13-4bb7f6680746';", - "javascript"); + L"javascript"); CHECK_CALLED(CreateInstance); todo_wine CHECK_CALLED(FreezeEvents_TRUE); @@ -2650,8 +2638,8 @@ static void test_create_element(void) SET_EXPECT(DoVerb); test_exec_script(doc, - "document.body.appendChild(test_elem);", - "javascript"); + L"document.body.appendChild(test_elem);", + L"javascript"); todo_wine CHECK_CALLED(DoVerb); SET_EXPECT(InPlaceDeactivate);
1
0
0
0
Michael Stefaniuc : mshtml/tests: Get rid of strcmp_wa() in activex.c.
by Alexandre Julliard
12 Feb '20
12 Feb '20
Module: wine Branch: master Commit: e787d1ac718d26420ab68d7595010348ff1e8819 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=e787d1ac718d26420ab68d75…
Author: Michael Stefaniuc <mstefani(a)winehq.org> Date: Wed Feb 12 00:25:18 2020 +0100 mshtml/tests: Get rid of strcmp_wa() in activex.c. Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mshtml/tests/activex.c | 31 ++++++++++++------------------- 1 file changed, 12 insertions(+), 19 deletions(-) diff --git a/dlls/mshtml/tests/activex.c b/dlls/mshtml/tests/activex.c index 8b6a47c391..a9af72d91c 100644 --- a/dlls/mshtml/tests/activex.c +++ b/dlls/mshtml/tests/activex.c @@ -195,13 +195,6 @@ static void _test_ifaces(unsigned line, IUnknown *iface, REFIID *iids) } } -static int strcmp_wa(LPCWSTR strw, const char *stra) -{ - CHAR buf[512]; - WideCharToMultiByte(CP_ACP, 0, strw, -1, buf, sizeof(buf), NULL, NULL); - return lstrcmpA(stra, buf); -} - static BSTR a2bstr(const char *str) { BSTR ret; @@ -235,7 +228,7 @@ static void set_plugin_readystate(READYSTATE state) IPropertyNotifySink_Release(prop_notif); } -static void test_mon_displayname(IMoniker *mon, const char *exname, const char *broken_name) +static void test_mon_displayname(IMoniker *mon, const WCHAR *exname, const WCHAR *broken_name) { LPOLESTR display_name; DWORD mksys; @@ -243,7 +236,7 @@ static void test_mon_displayname(IMoniker *mon, const char *exname, const char * hres = IMoniker_GetDisplayName(mon, NULL, NULL, &display_name); ok(hres == S_OK, "GetDisplayName failed: %08x\n", hres); - ok(!strcmp_wa(display_name, exname) || broken(broken_name && !strcmp_wa(display_name, broken_name)), + ok(!lstrcmpW(display_name, exname) || broken(broken_name && !lstrcmpW(display_name, broken_name)), "display_name = %s\n", wine_dbgstr_w(display_name)); CoTaskMemFree(display_name); @@ -591,7 +584,7 @@ static HRESULT WINAPI PersistPropertyBag_Load(IPersistPropertyBag *face, IProper hres = IPropertyBag_Read(pPropBag, param_nameW, &v, NULL); ok(hres == S_OK, "Read failed: %08x\n", hres); ok(V_VT(&v) == VT_BSTR, "V_VT(&v) = %d\n", V_VT(&v)); - ok(!strcmp_wa(V_BSTR(&v), "param_value"), "V_BSTR(v) = %s\n", wine_dbgstr_w(V_BSTR(&v))); + ok(!lstrcmpW(V_BSTR(&v), L"param_value"), "V_BSTR(v) = %s\n", wine_dbgstr_w(V_BSTR(&v))); V_VT(&v) = VT_I4; V_I4(&v) = 0xdeadbeef; @@ -604,7 +597,7 @@ static HRESULT WINAPI PersistPropertyBag_Load(IPersistPropertyBag *face, IProper hres = IPropertyBag_Read(pPropBag, num_paramW, &v, NULL); ok(hres == S_OK, "Read failed: %08x\n", hres); ok(V_VT(&v) == VT_BSTR, "V_VT(&v) = %d\n", V_VT(&v)); - ok(!strcmp_wa(V_BSTR(&v), "3"), "V_BSTR(v) = %s\n", wine_dbgstr_w(V_BSTR(&v))); + ok(!lstrcmpW(V_BSTR(&v), L"3"), "V_BSTR(v) = %s\n", wine_dbgstr_w(V_BSTR(&v))); SysFreeString(V_BSTR(&v)); V_VT(&v) = VT_I4; @@ -640,7 +633,7 @@ static HRESULT WINAPI PersistPropertyBag_Load(IPersistPropertyBag *face, IProper hres = IBindHost_CreateMoniker(bind_host, test_swfW, NULL, &mon, 0); ok(hres == S_OK, "CreateMoniker failed: %08x\n", hres); ok(mon != NULL, "mon == NULL\n"); - test_mon_displayname(mon, "about:test.swf", "about:blanktest.swf"); + test_mon_displayname(mon, L"about:test.swf", L"about:blanktest.swf"); IMoniker_Release(mon); IBindHost_Release(bind_host); @@ -649,7 +642,7 @@ static HRESULT WINAPI PersistPropertyBag_Load(IPersistPropertyBag *face, IProper hres = IOleClientSite_GetMoniker(client_site, OLEGETMONIKER_ONLYIFTHERE, OLEWHICHMK_CONTAINER, &mon); ok(hres == S_OK, "GetMoniker failed: %08x\n", hres); ok(mon != NULL, "mon == NULL\n"); - test_mon_displayname(mon, "about:blank", NULL); + test_mon_displayname(mon, L"about:blank", NULL); IMoniker_Release(mon); set_plugin_readystate(READYSTATE_COMPLETE); @@ -715,10 +708,10 @@ static HRESULT WINAPI Dispatch_GetIDsOfNames(IDispatch *iface, REFIID riid, LPOL ok(rgszNames != NULL, "rgszNames == NULL\n"); ok(rgDispId != NULL, "rgDispId == NULL\n"); - if(!strcmp_wa(rgszNames[0], "scriptprop")) { + if(!lstrcmpW(rgszNames[0], L"scriptprop")) { CHECK_EXPECT(GetIDsOfNames_scriptprop); *rgDispId = DISPID_SCRIPTPROP; - }else if(!strcmp_wa(rgszNames[0], "scriptCall")) { + }else if(!lstrcmpW(rgszNames[0], L"scriptCall")) { *rgDispId = DISPID_SCRIPTCALL; }else { ok(0, "rgszNames[0] = %s\n", wine_dbgstr_w(rgszNames[0])); @@ -1660,13 +1653,13 @@ static void test_object_elem(IHTMLDocument2 *doc) hres = IHTMLObjectElement_get_width(objelem, &v); ok(hres == S_OK, "get_width failed: %08x\n", hres); ok(V_VT(&v) == VT_BSTR, "V_VT(width) = %d\n", V_VT(&v)); - ok(!strcmp_wa(V_BSTR(&v), "300"), "V_BSTR(width) = %s\n", wine_dbgstr_w(V_BSTR(&v))); + ok(!lstrcmpW(V_BSTR(&v), L"300"), "V_BSTR(width) = %s\n", wine_dbgstr_w(V_BSTR(&v))); VariantClear(&v); hres = IHTMLObjectElement_get_height(objelem, &v); ok(hres == S_OK, "get_height failed: %08x\n", hres); ok(V_VT(&v) == VT_BSTR, "V_VT(height) = %d\n", V_VT(&v)); - ok(!strcmp_wa(V_BSTR(&v), "200"), "V_BSTR(height) = %s\n", wine_dbgstr_w(V_BSTR(&v))); + ok(!lstrcmpW(V_BSTR(&v), L"200"), "V_BSTR(height) = %s\n", wine_dbgstr_w(V_BSTR(&v))); VariantClear(&v); V_VT(&v) = VT_I4; @@ -1681,7 +1674,7 @@ static void test_object_elem(IHTMLDocument2 *doc) hres = IHTMLObjectElement_get_width(objelem, &v); ok(hres == S_OK, "get_width failed: %08x\n", hres); ok(V_VT(&v) == VT_BSTR, "V_VT(width) = %d\n", V_VT(&v)); - ok(!strcmp_wa(V_BSTR(&v), "400"), "V_BSTR(width) = %s\n", wine_dbgstr_w(V_BSTR(&v))); + ok(!lstrcmpW(V_BSTR(&v), L"400"), "V_BSTR(width) = %s\n", wine_dbgstr_w(V_BSTR(&v))); VariantClear(&v); V_VT(&v) = VT_I4; @@ -1696,7 +1689,7 @@ static void test_object_elem(IHTMLDocument2 *doc) hres = IHTMLObjectElement_get_height(objelem, &v); ok(hres == S_OK, "get_height failed: %08x\n", hres); ok(V_VT(&v) == VT_BSTR, "V_VT(height) = %d\n", V_VT(&v)); - ok(!strcmp_wa(V_BSTR(&v), "250"), "V_BSTR(height) = %s\n", wine_dbgstr_w(V_BSTR(&v))); + ok(!lstrcmpW(V_BSTR(&v), L"250"), "V_BSTR(height) = %s\n", wine_dbgstr_w(V_BSTR(&v))); VariantClear(&v); IHTMLObjectElement_Release(objelem);
1
0
0
0
Michael Stefaniuc : mshtml/tests: Get rid of wstr_contains().
by Alexandre Julliard
12 Feb '20
12 Feb '20
Module: wine Branch: master Commit: 3f2830974175b7577b40316170e3adea096ab690 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=3f2830974175b7577b403161…
Author: Michael Stefaniuc <mstefani(a)winehq.org> Date: Wed Feb 12 00:25:17 2020 +0100 mshtml/tests: Get rid of wstr_contains(). Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mshtml/tests/htmldoc.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/dlls/mshtml/tests/htmldoc.c b/dlls/mshtml/tests/htmldoc.c index f8cb0c1278..e473ee0f21 100644 --- a/dlls/mshtml/tests/htmldoc.c +++ b/dlls/mshtml/tests/htmldoc.c @@ -283,13 +283,6 @@ static const WCHAR wszTimesNewRoman[] = static const WCHAR wszArial[] = {'A','r','i','a','l',0}; -static BOOL wstr_contains(const WCHAR *strw, const char *stra) -{ - CHAR buf[512]; - WideCharToMultiByte(CP_ACP, 0, strw, -1, buf, sizeof(buf), NULL, NULL); - return strstr(buf, stra) != NULL; -} - /* Returns true if the user interface is in English. Note that this does not * presume of the formatting of dates, numbers, etc. */ @@ -3484,7 +3477,7 @@ static HRESULT WINAPI DocObjectService_FireBeforeNavigate2(IDocObjectService *i }else { ok(cbPostData == 9, "cbPostData = %d\n", cbPostData); ok(!memcmp(pPostData, "cmd=TEST", cbPostData), "pPostData = %p\n", pPostData); - ok(wstr_contains(lpszHeaders, "Content-Type: application/x-www-form-urlencoded\r\n"), + ok(wcsstr(lpszHeaders, L"Content-Type: application/x-www-form-urlencoded\r\n") != NULL, "lpszHeaders = %s\n", wine_dbgstr_w(lpszHeaders)); }
1
0
0
0
Michael Stefaniuc : mshtml/tests: Get rid of a2bstr() in htmldoc.c.
by Alexandre Julliard
12 Feb '20
12 Feb '20
Module: wine Branch: master Commit: c8c45355b1f9dc2afa8c98697282d9c6d3a6f98c URL:
https://source.winehq.org/git/wine.git/?a=commit;h=c8c45355b1f9dc2afa8c9869…
Author: Michael Stefaniuc <mstefani(a)winehq.org> Date: Wed Feb 12 00:25:16 2020 +0100 mshtml/tests: Get rid of a2bstr() in htmldoc.c. Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mshtml/tests/htmldoc.c | 40 ++++++++++++++-------------------------- 1 file changed, 14 insertions(+), 26 deletions(-) diff --git a/dlls/mshtml/tests/htmldoc.c b/dlls/mshtml/tests/htmldoc.c index 5b21daa6a2..f8cb0c1278 100644 --- a/dlls/mshtml/tests/htmldoc.c +++ b/dlls/mshtml/tests/htmldoc.c @@ -290,18 +290,6 @@ static BOOL wstr_contains(const WCHAR *strw, const char *stra) return strstr(buf, stra) != NULL; } -static BSTR a2bstr(const char *str) -{ - BSTR ret; - int len; - - len = MultiByteToWideChar(CP_ACP, 0, str, -1, NULL, 0); - ret = SysAllocStringLen(NULL, len); - MultiByteToWideChar(CP_ACP, 0, str, -1, ret, len); - - return ret; -} - /* Returns true if the user interface is in English. Note that this does not * presume of the formatting of dates, numbers, etc. */ @@ -5366,7 +5354,7 @@ static void test_doscroll(IUnknown *unk) ok(hres == S_OK, "Could not get IHTMLElement2 iface: %08x\n", hres); V_VT(&v) = VT_BSTR; - V_BSTR(&v) = a2bstr("left"); + V_BSTR(&v) = SysAllocString(L"left"); hres = IHTMLElement2_doScroll(elem2, v); SysFreeString(V_BSTR(&v)); IHTMLElement2_Release(elem2); @@ -6099,7 +6087,7 @@ static void test_put_href(IHTMLDocument2 *doc, BOOL use_replace, const WCHAR *hr SET_EXPECT(Exec_ShellDocView_84); str = SysAllocString(nav_url); - str2 = a2bstr(""); + str2 = SysAllocString(L""); V_VT(&vempty) = VT_EMPTY; hres = IHTMLPrivateWindow_SuperNavigate(priv_window, str, str2, NULL, NULL, &vempty, &vempty, 0); SysFreeString(str); @@ -6254,7 +6242,7 @@ static void test_open_window(IHTMLDocument2 *doc, BOOL do_block) ok(hres == S_OK, "get_parentWindow failed: %08x\n", hres); url = SysAllocString(nav_serv_url = nav_url = L"about:blank"); - name = a2bstr("test"); + name = SysAllocString(L"test"); new_window = (void*)0xdeadbeef; trace("open...\n"); @@ -7826,7 +7814,7 @@ static void test_cookies(IHTMLDocument2 *doc) SysFreeString(str); } - str = a2bstr("test=testval"); + str = SysAllocString(L"test=testval"); hres = IHTMLDocument2_put_cookie(doc, str); ok(hres == S_OK, "put_cookie failed: %08x\n", hres); @@ -7843,7 +7831,7 @@ static void test_cookies(IHTMLDocument2 *doc) SysFreeString(str); SysFreeString(str2); - str = a2bstr("test=testval2"); + str = SysAllocString(L"test=testval2"); hres = IHTMLDocument2_put_cookie(doc, str); ok(hres == S_OK, "put_cookie failed: %08x\n", hres); @@ -7871,7 +7859,7 @@ static void test_doc_domain(IHTMLDocument2 *doc) ok(!lstrcmpW(str, L"
test.winehq.org
"), "domain = %s\n", wine_dbgstr_w(str)); SysFreeString(str); - str = a2bstr("
winehq.org
"); + str = SysAllocString(L"
winehq.org
"); hres = IHTMLDocument2_put_domain(doc, str); ok(hres == S_OK, "put_domain failed: %08x\n", hres); SysFreeString(str); @@ -7881,7 +7869,7 @@ static void test_doc_domain(IHTMLDocument2 *doc) ok(!lstrcmpW(str, L"
winehq.org
"), "domain = %s\n", wine_dbgstr_w(str)); SysFreeString(str); - str = a2bstr("
winehq.com
"); + str = SysAllocString(L"
winehq.com
"); hres = IHTMLDocument2_put_domain(doc, str); ok(hres == E_INVALIDARG, "put_domain failed: %08x, expected E_INVALIDARG\n", hres); SysFreeString(str); @@ -7970,9 +7958,9 @@ static void test_HTMLDocument_http(BOOL with_wbapp) ok(!ref, "ref=%d, expected 0\n", ref); } -static void put_inner_html(IHTMLElement *elem, const char *html) +static void put_inner_html(IHTMLElement *elem, const WCHAR *html) { - BSTR str = a2bstr(html); + BSTR str = SysAllocString(html); HRESULT hres; hres = IHTMLElement_put_innerHTML(elem, str); @@ -7981,10 +7969,10 @@ static void put_inner_html(IHTMLElement *elem, const char *html) SysFreeString(str); } -static IHTMLElement *get_elem_by_id(IHTMLDocument2 *doc, const char *id) +static IHTMLElement *get_elem_by_id(IHTMLDocument2 *doc, const WCHAR *id) { IHTMLDocument3 *doc3; - BSTR str = a2bstr(id); + BSTR str = SysAllocString(id); IHTMLElement *ret; HRESULT hres; @@ -8055,10 +8043,10 @@ static void test_submit(void) ok(hres == S_OK, "get_body failed: %08x\n", hres); ok(body != NULL, "body = NULL\n"); - put_inner_html(body, "<form action='test_submit' method='post' id='fid'><input type='hidden' name='cmd' value='TEST'></form>"); + put_inner_html(body, L"<form action='test_submit' method='post' id='fid'><input type='hidden' name='cmd' value='TEST'></form>"); IHTMLElement_Release(body); - form_elem = get_elem_by_id(doc, "fid"); + form_elem = get_elem_by_id(doc, L"fid"); ok(form_elem != NULL, "form = NULL\n"); hres = IHTMLElement_QueryInterface(form_elem, &IID_IHTMLFormElement, (void**)&form); @@ -8380,7 +8368,7 @@ static void test_editing_mode(BOOL do_load, BOOL use_design_mode) SET_EXPECT(InPlaceFrame_SetBorderSpace); SET_EXPECT(OnChanged_1014); - on = a2bstr("On"); + on = SysAllocString(L"On"); hres = IHTMLDocument2_put_designMode(doc, on); SysFreeString(on); ok(hres == S_OK, "put_designMode failed: %08x\n", hres);
1
0
0
0
Michael Stefaniuc : mshtml/tests: Get rid of strcmp_wa() in htmldoc.c.
by Alexandre Julliard
12 Feb '20
12 Feb '20
Module: wine Branch: master Commit: e59a2c4e874085a9fc1a5442168c85259125259b URL:
https://source.winehq.org/git/wine.git/?a=commit;h=e59a2c4e874085a9fc1a5442…
Author: Michael Stefaniuc <mstefani(a)winehq.org> Date: Wed Feb 12 00:25:15 2020 +0100 mshtml/tests: Get rid of strcmp_wa() in htmldoc.c. Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mshtml/tests/htmldoc.c | 136 ++++++++++++++++++++++---------------------- 1 file changed, 67 insertions(+), 69 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=e59a2c4e874085a9fc1a…
1
0
0
0
Michael Stefaniuc : mshtml/tests: Get rid of a2bstr() in script.c.
by Alexandre Julliard
12 Feb '20
12 Feb '20
Module: wine Branch: master Commit: 3474e562fc3ae4d2de82dd7d964dec6eabc6507e URL:
https://source.winehq.org/git/wine.git/?a=commit;h=3474e562fc3ae4d2de82dd7d…
Author: Michael Stefaniuc <mstefani(a)winehq.org> Date: Wed Feb 12 00:25:14 2020 +0100 mshtml/tests: Get rid of a2bstr() in script.c. Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mshtml/tests/script.c | 59 +++++++++++++++++----------------------------- 1 file changed, 22 insertions(+), 37 deletions(-) diff --git a/dlls/mshtml/tests/script.c b/dlls/mshtml/tests/script.c index 27405a71b5..38fd0b4e8a 100644 --- a/dlls/mshtml/tests/script.c +++ b/dlls/mshtml/tests/script.c @@ -172,21 +172,6 @@ static BOOL skip_loadobject_tests; static IActiveScriptSite *site; static SCRIPTSTATE state; -static BSTR a2bstr(const char *str) -{ - BSTR ret; - int len; - - if(!str) - return NULL; - - len = MultiByteToWideChar(CP_ACP, 0, str, -1, NULL, 0); - ret = SysAllocStringLen(NULL, len); - MultiByteToWideChar(CP_ACP, 0, str, -1, ret, len); - - return ret; -} - static BOOL init_key(const char *key_name, const char *def_value, BOOL init) { HKEY hkey; @@ -296,7 +281,7 @@ static HRESULT WINAPI VariantChangeType_ChangeType(IVariantChangeType *iface, VA ok(vt == VT_BSTR, "vt = %d\n", vt); V_VT(dst) = VT_BSTR; - V_BSTR(dst) = a2bstr("red"); + V_BSTR(dst) = SysAllocString(L"red"); return S_OK; } @@ -1943,7 +1928,7 @@ static void test_func(IDispatchEx *obj) VARIANT var; HRESULT hres; - str = a2bstr("toString"); + str = SysAllocString(L"toString"); hres = IDispatchEx_GetDispID(obj, str, fdexNameCaseSensitive, &id); SysFreeString(str); ok(hres == S_OK, "GetDispID failed: %08x\n", hres); @@ -2023,7 +2008,7 @@ static void test_nextdispid(IDispatchEx *dispex) VARIANT var; HRESULT hres; - name = a2bstr("dynVal"); + name = SysAllocString(L"dynVal"); hres = IDispatchEx_GetDispID(dispex, name, fdexNameCaseSensitive|fdexNameEnsure, &dyn_id); ok(hres == S_OK, "GetDispID failed: %08x\n", hres); SysFreeString(name); @@ -2066,7 +2051,7 @@ static void test_global_id(void) SET_EXPECT(GetScriptDispatch); SET_EXPECT(script_divid_d); - tmp = a2bstr("divid"); + tmp = SysAllocString(L"divid"); hres = IDispatchEx_GetDispID(window_dispex, tmp, fdexNameCaseSensitive, &id); ok(hres == S_OK, "GetDispID failed: %08x\n", hres); SysFreeString(tmp); @@ -2157,7 +2142,7 @@ static void test_default_arg_conv(IHTMLWindow2 *window) test_elem_disabled(elem, VARIANT_FALSE); V_VT(&v) = VT_BSTR; - V_BSTR(&v) = a2bstr("test"); + V_BSTR(&v) = SysAllocString(L"test"); hres = dispex_propput(dispex, DISPID_IHTMLELEMENT3_DISABLED, 0, &v, NULL); ok(hres == S_OK, "InvokeEx failed: %08x\n", hres); SysFreeString(V_BSTR(&v)); @@ -2395,7 +2380,7 @@ static void test_script_run(void) test_default_arg_conv(window); IHTMLWindow2_Release(window); - tmp = a2bstr("test"); + tmp = SysAllocString(L"test"); hres = IDispatchEx_DeleteMemberByName(dispex, tmp, fdexNameCaseSensitive); ok(hres == E_NOTIMPL, "DeleteMemberByName failed: %08x\n", hres); @@ -2405,7 +2390,7 @@ static void test_script_run(void) SET_EXPECT(GetScriptDispatch); SET_EXPECT(script_testprop_d); - tmp = a2bstr("testProp"); + tmp = SysAllocString(L"testProp"); hres = IDispatchEx_GetDispID(window_dispex, tmp, fdexNameCaseSensitive, &id); ok(hres == S_OK, "GetDispID failed: %08x\n", hres); ok(id != DISPID_SCRIPT_TESTPROP, "id == DISPID_SCRIPT_TESTPROP\n"); @@ -2413,7 +2398,7 @@ static void test_script_run(void) CHECK_CALLED(script_testprop_d); SysFreeString(tmp); - tmp = a2bstr("testProp"); + tmp = SysAllocString(L"testProp"); hres = IDispatchEx_GetDispID(window_dispex, tmp, fdexNameCaseSensitive, &id); ok(hres == S_OK, "GetDispID failed: %08x\n", hres); ok(id != DISPID_SCRIPT_TESTPROP, "id == DISPID_SCRIPT_TESTPROP\n"); @@ -2431,7 +2416,7 @@ static void test_script_run(void) SET_EXPECT(GetScriptDispatch); SET_EXPECT(script_testprop2_d); - tmp = a2bstr("testProp2"); + tmp = SysAllocString(L"testProp2"); hres = IDispatchEx_GetDispID(window_dispex, tmp, fdexNameCaseSensitive|fdexNameEnsure, &id); ok(hres == S_OK, "GetDispID failed: %08x\n", hres); ok(id != DISPID_SCRIPT_TESTPROP2, "id == DISPID_SCRIPT_TESTPROP2\n"); @@ -2439,7 +2424,7 @@ static void test_script_run(void) CHECK_CALLED(script_testprop2_d); SysFreeString(tmp); - tmp = a2bstr("test"); + tmp = SysAllocString(L"test"); hres = IDispatchEx_DeleteMemberByName(window_dispex, tmp, fdexNameCaseSensitive); ok(hres == E_NOTIMPL, "DeleteMemberByName failed: %08x\n", hres); @@ -2835,7 +2820,7 @@ static void report_data(ProtocolHandler *This) CoTaskMemFree(addl_headers); - headers = a2bstr("HTTP/1.1 200 OK\r\n\r\n"); + headers = SysAllocString(L"HTTP/1.1 200 OK\r\n\r\n"); hres = IHttpNegotiate_OnResponse(http_negotiate, 200, headers, NULL, NULL); ok(hres == S_OK, "OnResponse failed: %08x\n", hres); SysFreeString(headers); @@ -3253,7 +3238,7 @@ static const char simple_script_str[] = "<script language=\"TestScript\">simple script</script>" "</body></html>"; -static void test_exec_script(IHTMLDocument2 *doc, const char *codea, const char *langa) +static void test_exec_script(IHTMLDocument2 *doc, const WCHAR *codew, const WCHAR *langw) { IHTMLWindow2 *window; BSTR code, lang; @@ -3263,8 +3248,8 @@ static void test_exec_script(IHTMLDocument2 *doc, const char *codea, const char hres = IHTMLDocument2_get_parentWindow(doc, &window); ok(hres == S_OK, "get_parentWindow failed: %08x\n", hres); - code = a2bstr(codea); - lang = a2bstr(langa); + code = SysAllocString(codew); + lang = SysAllocString(langw); SET_EXPECT(ParseScriptText_execScript); hres = IHTMLWindow2_execScript(window, code, lang, &v); @@ -3274,7 +3259,7 @@ static void test_exec_script(IHTMLDocument2 *doc, const char *codea, const char CHECK_CALLED(ParseScriptText_execScript); SysFreeString(lang); - lang = a2bstr("invalid"); + lang = SysAllocString(L"invalid"); V_VT(&v) = 100; hres = IHTMLWindow2_execScript(window, code, lang, &v); ok(hres == CO_E_CLASSSTRING, "execScript failed: %08x, expected CO_E_CLASSSTRING\n", hres); @@ -3323,7 +3308,7 @@ static void test_simple_script(void) CHECK_CALLED(ParseScriptText_script); CHECK_CALLED(SetScriptState_CONNECTED); - test_exec_script(doc, "execScript call", "TestScript"); + test_exec_script(doc, L"execScript call", L"TestScript"); if(site) IActiveScriptSite_Release(site); @@ -3395,17 +3380,17 @@ static void run_js_script(const char *test_name) IMoniker_Release(mon); } -static void run_from_path(const char *path, const char *opt) +static void run_from_path(const WCHAR *path, const char *opt) { - char buf[255] = "
http://winetest.example.org
"; + WCHAR buf[255] = L"
http://winetest.example.org
"; IMoniker *mon; BSTR url; HRESULT hres; - strcat(buf, path); + lstrcatW(buf, path); if(opt) - sprintf(buf + strlen(buf), "?%s", opt); - url = a2bstr(buf); + wsprintfW(buf + lstrlenW(buf), L"?%S", opt); + url = SysAllocString(buf); hres = CreateURLMoniker(NULL, url, &mon); SysFreeString(url); ok(hres == S_OK, "CreateUrlMoniker failed: %08x\n", hres); @@ -3436,7 +3421,7 @@ static void run_script_as_http_with_mode(const char *script, const char *opt, co document_mode ? "\">" : "", script); - run_from_path("/index.html", opt ? opt : script); + run_from_path(L"/index.html", opt ? opt : script); } static void init_protocol_handler(void)
1
0
0
0
Alexandre Julliard : ntdll: Don't allow unsupported codepages as Unix codepage.
by Alexandre Julliard
12 Feb '20
12 Feb '20
Module: wine Branch: master Commit: f55637dc1b8d4778bda346e8104fb8b44a817361 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=f55637dc1b8d4778bda346e8…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Feb 12 09:02:48 2020 +0100 ntdll: Don't allow unsupported codepages as Unix codepage. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/locale.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/dlls/ntdll/locale.c b/dlls/ntdll/locale.c index a275c4863e..3ccb1716f1 100644 --- a/dlls/ntdll/locale.c +++ b/dlls/ntdll/locale.c @@ -461,7 +461,7 @@ static const struct { const char *name; UINT cp; } charset_names[] = { "GBK", 936 }, { "IBM037", 37 }, { "IBM1026", 1026 }, - { "IBM424", 424 }, + { "IBM424", 20424 }, { "IBM437", 437 }, { "IBM500", 500 }, { "IBM850", 850 }, @@ -479,12 +479,8 @@ static const struct { const char *name; UINT cp; } charset_names[] = { "IBM874", 874 }, { "IBM875", 875 }, { "ISO88591", 28591 }, - { "ISO885910", 28600 }, - { "ISO885911", 28601 }, { "ISO885913", 28603 }, - { "ISO885914", 28604 }, { "ISO885915", 28605 }, - { "ISO885916", 28606 }, { "ISO88592", 28592 }, { "ISO88593", 28593 }, { "ISO88594", 28594 },
1
0
0
0
Alexandre Julliard : libport: Move the codepage tables back to libwine and stop updating them.
by Alexandre Julliard
12 Feb '20
12 Feb '20
Module: wine Branch: master Commit: 5b4bdb9fd387b02c53c76a93af0d47b7342877f6 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=5b4bdb9fd387b02c53c76a93…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Feb 12 09:07:20 2020 +0100 libport: Move the codepage tables back to libwine and stop updating them. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- libs/port/Makefile.in | 65 ------- libs/wine/Makefile.in | 65 +++++++ libs/{port => wine}/c_037.c | 6 + libs/{port => wine}/c_10000.c | 6 + libs/{port => wine}/c_10001.c | 6 + libs/{port => wine}/c_10002.c | 6 + libs/{port => wine}/c_10003.c | 6 + libs/{port => wine}/c_10004.c | 6 + libs/{port => wine}/c_10005.c | 6 + libs/{port => wine}/c_10006.c | 6 + libs/{port => wine}/c_10007.c | 6 + libs/{port => wine}/c_10008.c | 6 + libs/{port => wine}/c_10010.c | 6 + libs/{port => wine}/c_10017.c | 6 + libs/{port => wine}/c_10021.c | 6 + libs/{port => wine}/c_10029.c | 6 + libs/{port => wine}/c_10079.c | 6 + libs/{port => wine}/c_10081.c | 6 + libs/{port => wine}/c_10082.c | 6 + libs/{port => wine}/c_1026.c | 6 + libs/{port => wine}/c_1250.c | 6 + libs/{port => wine}/c_1251.c | 6 + libs/{port => wine}/c_1252.c | 6 + libs/{port => wine}/c_1253.c | 6 + libs/{port => wine}/c_1254.c | 6 + libs/{port => wine}/c_1255.c | 6 + libs/{port => wine}/c_1256.c | 6 + libs/{port => wine}/c_1257.c | 6 + libs/{port => wine}/c_1258.c | 6 + libs/{port => wine}/c_1361.c | 6 + libs/{port => wine}/c_20127.c | 6 + libs/{port => wine}/c_20866.c | 6 + libs/{port => wine}/c_20932.c | 6 + libs/{port => wine}/c_21866.c | 6 + libs/{port => wine}/c_28591.c | 6 + libs/{port => wine}/c_28592.c | 6 + libs/{port => wine}/c_28593.c | 6 + libs/{port => wine}/c_28594.c | 6 + libs/{port => wine}/c_28595.c | 6 + libs/{port => wine}/c_28596.c | 6 + libs/{port => wine}/c_28597.c | 6 + libs/{port => wine}/c_28598.c | 6 + libs/{port => wine}/c_28599.c | 6 + libs/{port => wine}/c_28603.c | 6 + libs/{port => wine}/c_28605.c | 6 + libs/{port => wine}/c_437.c | 6 + libs/{port => wine}/c_500.c | 6 + libs/{port => wine}/c_737.c | 6 + libs/{port => wine}/c_775.c | 6 + libs/{port => wine}/c_850.c | 6 + libs/{port => wine}/c_852.c | 6 + libs/{port => wine}/c_855.c | 6 + libs/{port => wine}/c_857.c | 6 + libs/{port => wine}/c_860.c | 6 + libs/{port => wine}/c_861.c | 6 + libs/{port => wine}/c_862.c | 6 + libs/{port => wine}/c_863.c | 6 + libs/{port => wine}/c_864.c | 6 + libs/{port => wine}/c_865.c | 6 + libs/{port => wine}/c_866.c | 6 + libs/{port => wine}/c_869.c | 6 + libs/{port => wine}/c_874.c | 6 + libs/{port => wine}/c_875.c | 6 + libs/{port => wine}/c_932.c | 6 + libs/{port => wine}/c_936.c | 6 + libs/{port => wine}/c_949.c | 6 + libs/{port => wine}/c_950.c | 6 + tools/make_unicode | 414 +++++++++--------------------------------- 68 files changed, 545 insertions(+), 389 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=5b4bdb9fd387b02c53c7…
1
0
0
0
← Newer
1
...
46
47
48
49
50
51
52
...
88
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
Results per page:
10
25
50
100
200