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
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
October 2011
----- 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
3 participants
783 discussions
Start a n
N
ew thread
Ruslan Kabatsayev : uxtheme: GetSysColor() expects the same type of argument as GetThemeSysColor().
by Alexandre Julliard
31 Oct '11
31 Oct '11
Module: wine Branch: master Commit: 996b451c2df2d133f13d9dfe0b6eedd057460f78 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=996b451c2df2d133f13d9dfe0…
Author: Ruslan Kabatsayev <b7.10110111(a)gmail.com> Date: Fri Oct 28 16:19:30 2011 +0400 uxtheme: GetSysColor() expects the same type of argument as GetThemeSysColor(). --- dlls/uxtheme/metric.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/uxtheme/metric.c b/dlls/uxtheme/metric.c index 6f8519e..c056f28 100644 --- a/dlls/uxtheme/metric.c +++ b/dlls/uxtheme/metric.c @@ -87,7 +87,7 @@ COLORREF WINAPI GetThemeSysColor(HTHEME hTheme, int iColorID) SetLastError(hr); } } - return GetSysColor(iColorID - TMT_FIRSTCOLOR); + return GetSysColor(iColorID); } /***********************************************************************
1
0
0
0
André Hentschel : wininet: Add a stub for ShowX509EncodedCertificate.
by Alexandre Julliard
31 Oct '11
31 Oct '11
Module: wine Branch: master Commit: adea3c5dda8f4260b25f11c01da24799ca8f199c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=adea3c5dda8f4260b25f11c01…
Author: André Hentschel <nerv(a)dawncrow.de> Date: Sat Oct 29 15:08:08 2011 +0200 wininet: Add a stub for ShowX509EncodedCertificate. --- dlls/wininet/http.c | 9 +++++++++ dlls/wininet/wininet.spec | 2 +- 2 files changed, 10 insertions(+), 1 deletions(-) diff --git a/dlls/wininet/http.c b/dlls/wininet/http.c index db85d0b..70d5f2e 100644 --- a/dlls/wininet/http.c +++ b/dlls/wininet/http.c @@ -6071,3 +6071,12 @@ BOOL WINAPI InternetShowSecurityInfoByURLW(LPCWSTR url, HWND window) FIXME("stub: %s %p\n", debugstr_w(url), window); return FALSE; } + +/*********************************************************************** + * ShowX509EncodedCertificate (@) + */ +DWORD WINAPI ShowX509EncodedCertificate(HWND parent, LPBYTE cert, DWORD len) +{ + FIXME("stub: %p %p %u\n", parent, cert, len); + return ERROR_CALL_NOT_IMPLEMENTED; +} diff --git a/dlls/wininet/wininet.spec b/dlls/wininet/wininet.spec index 583b7ba..82b0d7d 100644 --- a/dlls/wininet/wininet.spec +++ b/dlls/wininet/wininet.spec @@ -236,7 +236,7 @@ @ stub ShowCertificate @ stub ShowClientAuthCerts @ stub ShowSecurityInfo -@ stub ShowX509EncodedCertificate +@ stdcall ShowX509EncodedCertificate(ptr ptr long) @ stdcall UnlockUrlCacheEntryFile(str long) UnlockUrlCacheEntryFileA @ stdcall UnlockUrlCacheEntryFileA(str long) @ stdcall UnlockUrlCacheEntryFileW(wstr long)
1
0
0
0
Vitaliy Margolen : dinput8: Register CLSID_DirectInputDevice8.
by Alexandre Julliard
31 Oct '11
31 Oct '11
Module: wine Branch: master Commit: 0a9caf3e81d72f354c06e02baf99887d438ab0bd URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0a9caf3e81d72f354c06e02ba…
Author: Vitaliy Margolen <wine-patches(a)kievinfo.com> Date: Sun Oct 30 22:49:09 2011 -0600 dinput8: Register CLSID_DirectInputDevice8. --- dlls/dinput8/dinput8.idl | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/dlls/dinput8/dinput8.idl b/dlls/dinput8/dinput8.idl index 1bf3286..4e988f4 100644 --- a/dlls/dinput8/dinput8.idl +++ b/dlls/dinput8/dinput8.idl @@ -24,3 +24,10 @@ uuid(25e609e4-b259-11cf-bfc7-444553540000) ] coclass DirectInput8 { interface IDirectInput8; } + +[ + helpstring("DirectInputDevice8 Object"), + threading(both), + uuid(25e609e5-b259-11cf-bfc7-444553540000) +] +coclass DirectInputDevice { interface IDirectInputDevice8; }
1
0
0
0
Jacek Caban : urlmon: Added CompareSecurityIds stub.
by Alexandre Julliard
31 Oct '11
31 Oct '11
Module: wine Branch: master Commit: e94385c793c81e4f968dcc10e5fc17ba0436d0b1 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e94385c793c81e4f968dcc10e…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Oct 31 19:10:29 2011 +0100 urlmon: Added CompareSecurityIds stub. --- dlls/urlmon/sec_mgr.c | 9 +++++++++ dlls/urlmon/urlmon.spec | 2 +- 2 files changed, 10 insertions(+), 1 deletions(-) diff --git a/dlls/urlmon/sec_mgr.c b/dlls/urlmon/sec_mgr.c index 8e55712..d569f12 100644 --- a/dlls/urlmon/sec_mgr.c +++ b/dlls/urlmon/sec_mgr.c @@ -2066,3 +2066,12 @@ HRESULT WINAPI CoInternetGetSecurityUrlEx(IUri *pUri, IUri **ppSecUri, PSUACTION CoTaskMemFree(ret_url); return hres; } + +/******************************************************************** + * CompareSecurityIds (URLMON.@) + */ +HRESULT WINAPI CompareSecurityIds(BYTE *secid1, DWORD size1, BYTE *secid2, DWORD size2, DWORD reserved) +{ + FIXME("(%p %d %p %d %x)\n", secid1, size1, secid2, size2, reserved); + return E_NOTIMPL; +} diff --git a/dlls/urlmon/urlmon.spec b/dlls/urlmon/urlmon.spec index 14b1aba..2f38346 100644 --- a/dlls/urlmon/urlmon.spec +++ b/dlls/urlmon/urlmon.spec @@ -27,7 +27,7 @@ @ stdcall CoInternetParseIUri(ptr long long wstr long ptr long) @ stdcall CoInternetQueryInfo(ptr long long ptr long ptr long) @ stdcall CoInternetSetFeatureEnabled(long long long) -@ stub CompareSecurityIds +@ stdcall CompareSecurityIds(ptr long ptr long long) @ stub CopyBindInfo @ stdcall CopyStgMedium(ptr ptr) @ stdcall CreateAsyncBindCtx(long ptr ptr ptr)
1
0
0
0
Aric Stewart : user32: Respect rev for painting selections.
by Alexandre Julliard
31 Oct '11
31 Oct '11
Module: wine Branch: master Commit: 4b7300ef770ac6a07d8306222d7b1cce466568db URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4b7300ef770ac6a07d8306222…
Author: Aric Stewart <aric(a)codeweavers.com> Date: Mon Oct 31 10:06:50 2011 -0500 user32: Respect rev for painting selections. --- dlls/user32/edit.c | 24 ++++++++++++++---------- 1 files changed, 14 insertions(+), 10 deletions(-) diff --git a/dlls/user32/edit.c b/dlls/user32/edit.c index bfee8f5..23033b8 100644 --- a/dlls/user32/edit.c +++ b/dlls/user32/edit.c @@ -2136,10 +2136,10 @@ static INT EDIT_PaintText(EDITSTATE *es, HDC dc, INT x, INT y, INT line, INT col */ static void EDIT_PaintLine(EDITSTATE *es, HDC dc, INT line, BOOL rev) { - INT s; - INT e; - INT li; - INT ll; + INT s = 0; + INT e = 0; + INT li = 0; + INT ll = 0; INT x; INT y; LRESULT pos; @@ -2185,12 +2185,16 @@ static void EDIT_PaintLine(EDITSTATE *es, HDC dc, INT line, BOOL rev) x += es->format_rect.left; } - li = EDIT_EM_LineIndex(es, line); - ll = EDIT_EM_LineLength(es, li); - s = min(es->selection_start, es->selection_end); - e = max(es->selection_start, es->selection_end); - s = min(li + ll, max(li, s)); - e = min(li + ll, max(li, e)); + if (rev) + { + li = EDIT_EM_LineIndex(es, line); + ll = EDIT_EM_LineLength(es, li); + s = min(es->selection_start, es->selection_end); + e = max(es->selection_start, es->selection_end); + s = min(li + ll, max(li, s)); + e = min(li + ll, max(li, e)); + } + if (ssa) ScriptStringOut(ssa, x, y, 0, &es->format_rect, s - li, e - li, FALSE); else if (rev && (s != e) &&
1
0
0
0
Jörg Höhle : winmm: Never write silence, mmdevapi must handle underruns.
by Alexandre Julliard
31 Oct '11
31 Oct '11
Module: wine Branch: master Commit: 1cde966c35dcb0b5dc7bc5a6c42b788f6d8f561c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1cde966c35dcb0b5dc7bc5a6c…
Author: Jörg Höhle <hoehle(a)users.sourceforge.net> Date: Mon Sep 19 14:30:58 2011 +0200 winmm: Never write silence, mmdevapi must handle underruns. --- dlls/winmm/waveform.c | 17 ----------------- 1 files changed, 0 insertions(+), 17 deletions(-) diff --git a/dlls/winmm/waveform.c b/dlls/winmm/waveform.c index cb0762c..05641a6 100644 --- a/dlls/winmm/waveform.c +++ b/dlls/winmm/waveform.c @@ -1336,23 +1336,6 @@ static void WOD_PushData(WINMM_Device *device) queue = queue->lpNext; } - if(avail_frames != 0 && queue_frames == 0){ - hr = IAudioRenderClient_GetBuffer(device->render, avail_frames, &data); - if(FAILED(hr)){ - ERR("GetBuffer failed: %08x\n", hr); - goto exit; - } - - hr = IAudioRenderClient_ReleaseBuffer(device->render, avail_frames, - AUDCLNT_BUFFERFLAGS_SILENT); - if(FAILED(hr)){ - ERR("ReleaseBuffer failed: %08x\n", hr); - goto exit; - } - - goto exit; - } - if(queue_frames < avail_frames) avail_frames = queue_frames; if(avail_frames == 0)
1
0
0
0
Piotr Caban : msxml3/tests: Added NamespaceUri pointer test.
by Alexandre Julliard
31 Oct '11
31 Oct '11
Module: wine Branch: master Commit: 0fa2cf41006402018d857b039ca06b3fc3066e89 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0fa2cf41006402018d857b039…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Mon Oct 31 12:33:28 2011 +0100 msxml3/tests: Added NamespaceUri pointer test. --- dlls/msxml3/tests/saxreader.c | 43 +++++++++++++++++++++++++++++----------- 1 files changed, 31 insertions(+), 12 deletions(-) diff --git a/dlls/msxml3/tests/saxreader.c b/dlls/msxml3/tests/saxreader.c index 4ad80c6..2ec20bf 100644 --- a/dlls/msxml3/tests/saxreader.c +++ b/dlls/msxml3/tests/saxreader.c @@ -123,7 +123,7 @@ static const CHAR szTestXML[] = static const CHAR szTestAttributes[] = "<?xml version=\"1.0\" ?>\n" -"<document xmlns:test=\"prefix_test\" xmlns=\"prefix\" test:arg1=\"arg1\" arg2=\"arg2\">\n" +"<document xmlns:test=\"prefix_test\" xmlns=\"prefix\" test:arg1=\"arg1\" arg2=\"arg2\" test:ar3=\"arg3\">\n" "<node1 xmlns:p=\"test\" />" "</document>\n"; @@ -211,10 +211,10 @@ static content_handler_test contentHandlerTestCallbackResult6[] = { static content_handler_test contentHandlerTestAttributes[] = { { CH_PUTDOCUMENTLOCATOR, 0, 0, 1, 0 }, { CH_STARTDOCUMENT, 0, 0, 1, 22 }, - { CH_STARTPREFIXMAPPING, 2, 80, 2, 79, "test", "prefix_test" }, - { CH_STARTPREFIXMAPPING, 2, 80, 2, 79, "", "prefix" }, - { CH_STARTELEMENT, 2, 80, 2, 79, "prefix", "document", "document" }, - { CH_CHARACTERS, 2, 80, 3, 1, "\n" }, + { CH_STARTPREFIXMAPPING, 2, 96, 2, 95, "test", "prefix_test" }, + { CH_STARTPREFIXMAPPING, 2, 96, 2, 95, "", "prefix" }, + { CH_STARTELEMENT, 2, 96, 2, 95, "prefix", "document", "document" }, + { CH_CHARACTERS, 2, 96, 3, 1, "\n" }, { CH_STARTPREFIXMAPPING, 3, 25, 3, 24, "p", "test" }, { CH_STARTELEMENT, 3, 25, 3, 24, "prefix", "node1", "node1" }, { CH_ENDELEMENT, 3, 25, 3, 24, "prefix", "node1", "node1" }, @@ -229,10 +229,10 @@ static content_handler_test contentHandlerTestAttributes[] = { static content_handler_test contentHandlerTestAttributes6[] = { { CH_PUTDOCUMENTLOCATOR, 0, 0, 1, 0 }, { CH_STARTDOCUMENT, 0, 0, 1, 22 }, - { CH_STARTPREFIXMAPPING, 2, 80, 2, 79, "test", "prefix_test" }, - { CH_STARTPREFIXMAPPING, 2, 80, 2, 79, "", "prefix" }, - { CH_STARTELEMENT, 2, 80, 2, 79, "prefix", "document", "document" }, - { CH_CHARACTERS, 2, 80, 3, 1, "\n" }, + { CH_STARTPREFIXMAPPING, 2, 96, 2, 95, "test", "prefix_test" }, + { CH_STARTPREFIXMAPPING, 2, 96, 2, 95, "", "prefix" }, + { CH_STARTELEMENT, 2, 96, 2, 95, "prefix", "document", "document" }, + { CH_CHARACTERS, 2, 96, 3, 1, "\n" }, { CH_STARTPREFIXMAPPING, 3, 25, 3, 24, "p", "test" }, { CH_STARTELEMENT, 3, 25, 3, 24, "prefix", "node1", "node1" }, { CH_ENDELEMENT, 3, 25, 3, 24, "prefix", "node1", "node1" }, @@ -427,11 +427,12 @@ static HRESULT WINAPI contentHandler_startElement( ok(test_attr_ptr == pAttr, "Multiple ISAXAttributes instances are used (%p %p)\n", test_attr_ptr, pAttr); if(expectCall == contentHandlerTestAttributes+4) { + const WCHAR *uri_ptr = NULL; int i; /* msxml3 returns attributes and namespaces in the input order */ hres = ISAXAttributes_getLength(pAttr, &len); ok(hres == S_OK, "getLength returned %x\n", hres); - ok(len == 4, "Incorrect number of attributes: %d\n", len); + ok(len == 5, "Incorrect number of attributes: %d\n", len); ok(msxml_version < 6, "wrong msxml_version: %d\n", msxml_version); for(i=0; i<len; i++) { @@ -449,11 +450,18 @@ static HRESULT WINAPI contentHandler_startElement( test_saxstr(__LINE__, pNamespaceUri, nNamespaceUri, ""); test_saxstr(__LINE__, pLocalName, nLocalName, ""); test_saxstr(__LINE__, pQName, nQName, "xmlns"); + } else if(nQName == 8) { + todo_wine ok(i==4, "Incorrect attributes order\n"); + test_saxstr(__LINE__, pNamespaceUri, nNamespaceUri, "prefix_test"); + test_saxstr(__LINE__, pLocalName, nLocalName, "ar3"); + test_saxstr(__LINE__, pQName, nQName, "test:ar3"); + ok(uri_ptr == pNamespaceUri, "Incorrect NamespaceUri pointer\n"); } else if(nQName == 9) { todo_wine ok(i==2, "Incorrect attributes order\n"); test_saxstr(__LINE__, pNamespaceUri, nNamespaceUri, "prefix_test"); test_saxstr(__LINE__, pLocalName, nLocalName, "arg1"); test_saxstr(__LINE__, pQName, nQName, "test:arg1"); + uri_ptr = pNamespaceUri; } else if(nQName == 10) { todo_wine ok(i==0, "Incorrect attributes order\n"); test_saxstr(__LINE__, pNamespaceUri, nNamespaceUri, ""); @@ -464,10 +472,12 @@ static HRESULT WINAPI contentHandler_startElement( } } } else if(expectCall == contentHandlerTestAttributes6+4) { + const WCHAR *uri_ptr; + /* msxml6 returns attributes first and then namespaces */ hres = ISAXAttributes_getLength(pAttr, &len); ok(hres == S_OK, "getLength returned %x\n", hres); - ok(len == 4, "Incorrect number of attributes: %d\n", len); + ok(len == 5, "Incorrect number of attributes: %d\n", len); ok(msxml_version >= 6, "wrong msxml_version: %d\n", msxml_version); hres = ISAXAttributes_getName(pAttr, 0, &pNamespaceUri, &nNamespaceUri, @@ -476,6 +486,7 @@ static HRESULT WINAPI contentHandler_startElement( test_saxstr(__LINE__, pNamespaceUri, nNamespaceUri, "prefix_test"); test_saxstr(__LINE__, pLocalName, nLocalName, "arg1"); test_saxstr(__LINE__, pQName, nQName, "test:arg1"); + uri_ptr = pNamespaceUri; hres = ISAXAttributes_getName(pAttr, 1, &pNamespaceUri, &nNamespaceUri, &pLocalName, &nLocalName, &pQName, &nQName); @@ -487,11 +498,19 @@ static HRESULT WINAPI contentHandler_startElement( hres = ISAXAttributes_getName(pAttr, 2, &pNamespaceUri, &nNamespaceUri, &pLocalName, &nLocalName, &pQName, &nQName); ok(hres == S_OK, "getName returned %x\n", hres); + test_saxstr(__LINE__, pNamespaceUri, nNamespaceUri, "prefix_test"); + test_saxstr(__LINE__, pLocalName, nLocalName, "ar3"); + test_saxstr(__LINE__, pQName, nQName, "test:ar3"); + ok(uri_ptr == pNamespaceUri, "Incorrect NamespaceUri pointer\n"); + + hres = ISAXAttributes_getName(pAttr, 3, &pNamespaceUri, &nNamespaceUri, + &pLocalName, &nLocalName, &pQName, &nQName); + ok(hres == S_OK, "getName returned %x\n", hres); test_saxstr(__LINE__, pNamespaceUri, nNamespaceUri, "
http://www.w3.org/2000/xmlns/
"); test_saxstr(__LINE__, pLocalName, nLocalName, ""); test_saxstr(__LINE__, pQName, nQName, "xmlns:test"); - hres = ISAXAttributes_getName(pAttr, 3, &pNamespaceUri, &nNamespaceUri, + hres = ISAXAttributes_getName(pAttr, 4, &pNamespaceUri, &nNamespaceUri, &pLocalName, &nLocalName, &pQName, &nQName); ok(hres == S_OK, "getName returned %x\n", hres); test_saxstr(__LINE__, pNamespaceUri, nNamespaceUri, "
http://www.w3.org/2000/xmlns/
");
1
0
0
0
Piotr Caban : msxml3: Use namespaces stack in SAXAttributes interface implementation.
by Alexandre Julliard
31 Oct '11
31 Oct '11
Module: wine Branch: master Commit: a95b35de077c5c898299ec29c7d57878493c2aef URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a95b35de077c5c898299ec29c…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Mon Oct 31 12:33:18 2011 +0100 msxml3: Use namespaces stack in SAXAttributes interface implementation. --- dlls/msxml3/saxreader.c | 27 +++++++++++++++++++-------- 1 files changed, 19 insertions(+), 8 deletions(-) diff --git a/dlls/msxml3/saxreader.c b/dlls/msxml3/saxreader.c index 14d1643..cda55c4 100644 --- a/dlls/msxml3/saxreader.c +++ b/dlls/msxml3/saxreader.c @@ -122,6 +122,7 @@ typedef struct _saxlocator BSTR uri; } *nsStack; + BSTR namespaceUri; int attributesSize; int nb_attributes; struct _attributes @@ -1086,8 +1087,6 @@ static HRESULT SAXAttributes_populate(saxlocator *locator, { static const xmlChar xmlns[] = "xmlns"; static const WCHAR xmlnsW[] = { 'x','m','l','n','s',0 }; - static const WCHAR w3xmlns[] = { 'h','t','t','p',':','/','/', 'w','w','w','.','w','3','.', - 'o','r','g','/','2','0','0','0','/','x','m','l','n','s','/',0 }; struct _attributes *attrs; int index; @@ -1111,10 +1110,7 @@ static HRESULT SAXAttributes_populate(saxlocator *locator, for(index=0; index<nb_namespaces; index++) { attrs[nb_attributes+index].szLocalname = SysAllocStringLen(NULL, 0); - if(locator->saxreader->version >= MSXML6) - attrs[nb_attributes+index].szURI = SysAllocString(w3xmlns); - else - attrs[nb_attributes+index].szURI = SysAllocStringLen(NULL, 0); + attrs[nb_attributes+index].szURI = locator->namespaceUri; attrs[nb_attributes+index].szValue = bstr_from_xmlChar(xmlNamespaces[2*index+1]); if(!xmlNamespaces[2*index]) attrs[nb_attributes+index].szQName = SysAllocString(xmlnsW); @@ -1125,7 +1121,7 @@ static HRESULT SAXAttributes_populate(saxlocator *locator, for(index=0; index<nb_attributes; index++) { attrs[index].szLocalname = bstr_from_xmlChar(xmlAttributes[index*5]); - attrs[index].szURI = bstr_from_xmlChar(xmlAttributes[index*5+2]); + attrs[index].szURI = namespaceFind(locator, xmlAttributes[index*5+2]); attrs[index].szValue = bstr_from_xmlCharN(xmlAttributes[index*5+3], xmlAttributes[index*5+4]-xmlAttributes[index*5+3]); attrs[index].szQName = QName_from_xmlChar(xmlAttributes[index*5+1], @@ -1878,6 +1874,7 @@ static ULONG WINAPI isaxlocator_Release( SysFreeString(This->publicId); SysFreeString(This->systemId); + SysFreeString(This->namespaceUri); while(This->nsStackLast) namespacePop(This); heap_free(This->nsStack); @@ -1885,7 +1882,6 @@ static ULONG WINAPI isaxlocator_Release( for(index=0; index<This->nb_attributes; index++) { SysFreeString(This->attributes[index].szLocalname); - SysFreeString(This->attributes[index].szURI); SysFreeString(This->attributes[index].szValue); SysFreeString(This->attributes[index].szQName); } @@ -1976,6 +1972,9 @@ static const struct ISAXLocatorVtbl isaxlocator_vtbl = static HRESULT SAXLocator_create(saxreader *reader, saxlocator **ppsaxlocator, BOOL vbInterface) { + static const WCHAR w3xmlns[] = { 'h','t','t','p',':','/','/', 'w','w','w','.','w','3','.', + 'o','r','g','/','2','0','0','0','/','x','m','l','n','s','/',0 }; + saxlocator *locator; locator = heap_alloc( sizeof (*locator) ); @@ -1999,12 +1998,23 @@ static HRESULT SAXLocator_create(saxreader *reader, saxlocator **ppsaxlocator, B locator->line = (reader->version>=MSXML6 ? 1 : 0); locator->column = 0; locator->ret = S_OK; + if(locator->saxreader->version >= MSXML6) + locator->namespaceUri = SysAllocString(w3xmlns); + else + locator->namespaceUri = SysAllocStringLen(NULL, 0); + if(!locator->namespaceUri) + { + ISAXXMLReader_Release(&reader->ISAXXMLReader_iface); + heap_free(locator); + return E_OUTOFMEMORY; + } locator->nsStackSize = 8; locator->nsStackLast = 0; locator->nsStack = heap_alloc(sizeof(struct nsstack)*locator->nsStackSize); if(!locator->nsStack) { ISAXXMLReader_Release(&reader->ISAXXMLReader_iface); + SysFreeString(locator->namespaceUri); heap_free(locator); return E_OUTOFMEMORY; } @@ -2015,6 +2025,7 @@ static HRESULT SAXLocator_create(saxreader *reader, saxlocator **ppsaxlocator, B if(!locator->attributes) { ISAXXMLReader_Release(&reader->ISAXXMLReader_iface); + SysFreeString(locator->namespaceUri); heap_free(locator->nsStack); heap_free(locator); return E_OUTOFMEMORY;
1
0
0
0
Piotr Caban : msxml3: Don' t allocate new strings when returning namespace related data.
by Alexandre Julliard
31 Oct '11
31 Oct '11
Module: wine Branch: master Commit: 216b64801d0b6adb3bb1ba9c7fadf8951e656066 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=216b64801d0b6adb3bb1ba9c7…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Mon Oct 31 12:33:08 2011 +0100 msxml3: Don't allocate new strings when returning namespace related data. --- dlls/msxml3/saxreader.c | 32 +++++++++++++++++++++++--------- 1 files changed, 23 insertions(+), 9 deletions(-) diff --git a/dlls/msxml3/saxreader.c b/dlls/msxml3/saxreader.c index 35b0c04..14d1643 100644 --- a/dlls/msxml3/saxreader.c +++ b/dlls/msxml3/saxreader.c @@ -313,6 +313,20 @@ static HRESULT namespacePop(saxlocator *locator) return S_OK; } +static BSTR namespaceFind(saxlocator *locator, const xmlChar *ptr) +{ + int i; + + for(i=locator->nsStackLast-1; i>=0; i--) + { + if(ptr == locator->nsStack[i].ptr) + return locator->nsStack[i].uri; + } + + ERR("namespace not found\n"); + return NULL; +} + static BOOL bstr_pool_insert(struct bstrpool *pool, BSTR pool_entry) { if (!pool->pool) @@ -1188,7 +1202,7 @@ static void libxmlStartElementNS( int nb_defaulted, const xmlChar **attributes) { - BSTR NamespaceUri, LocalName, QName, Prefix, Uri; + BSTR NamespaceUri, LocalName, QName; saxlocator *This = ctx; HRESULT hr; int index; @@ -1214,18 +1228,18 @@ static void libxmlStartElementNS( { for(index=0; index<nb_namespaces; index++) { - Prefix = pooled_bstr_from_xmlChar(&This->saxreader->pool, namespaces[2*index]); - Uri = pooled_bstr_from_xmlChar(&This->saxreader->pool, namespaces[2*index+1]); - if(This->vbInterface) hr = IVBSAXContentHandler_startPrefixMapping( This->saxreader->vbcontentHandler, - &Prefix, &Uri); + &This->nsStack[This->nsStackLast-nb_namespaces+index].prefix, + &This->nsStack[This->nsStackLast-nb_namespaces+index].uri); else hr = ISAXContentHandler_startPrefixMapping( This->saxreader->contentHandler, - Prefix, SysStringLen(Prefix), - Uri, SysStringLen(Uri)); + This->nsStack[This->nsStackLast-nb_namespaces+index].prefix, + SysStringLen(This->nsStack[This->nsStackLast-nb_namespaces+index].prefix), + This->nsStack[This->nsStackLast-nb_namespaces+index].uri, + SysStringLen(This->nsStack[This->nsStackLast-nb_namespaces+index].uri)); if(This->saxreader->version>=MSXML6 ? FAILED(hr) : hr!=S_OK) { @@ -1234,7 +1248,7 @@ static void libxmlStartElementNS( } } - NamespaceUri = pooled_bstr_from_xmlChar(&This->saxreader->pool, URI); + NamespaceUri = namespaceFind(This, URI); LocalName = pooled_bstr_from_xmlChar(&This->saxreader->pool, localname); QName = pooled_QName_from_xmlChar(&This->saxreader->pool, prefix, localname); @@ -1280,7 +1294,7 @@ static void libxmlEndElementNS( if(has_content_handler(This)) { - NamespaceUri = pooled_bstr_from_xmlChar(&This->saxreader->pool, URI); + NamespaceUri = namespaceFind(This, URI); LocalName = pooled_bstr_from_xmlChar(&This->saxreader->pool, localname); QName = pooled_QName_from_xmlChar(&This->saxreader->pool, prefix, localname);
1
0
0
0
Piotr Caban : msxml3: Don't use libxml namespaces stack.
by Alexandre Julliard
31 Oct '11
31 Oct '11
Module: wine Branch: master Commit: 619c2dcd08654e27665713f25c767066a6bf1d11 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=619c2dcd08654e27665713f25…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Mon Oct 31 12:32:59 2011 +0100 msxml3: Don't use libxml namespaces stack. --- dlls/msxml3/saxreader.c | 116 +++++++++++++++++++++++++++++++++++----------- 1 files changed, 88 insertions(+), 28 deletions(-) diff --git a/dlls/msxml3/saxreader.c b/dlls/msxml3/saxreader.c index 2045863..35b0c04 100644 --- a/dlls/msxml3/saxreader.c +++ b/dlls/msxml3/saxreader.c @@ -115,7 +115,12 @@ typedef struct _saxlocator BOOL vbInterface; int nsStackSize; int nsStackLast; - int *nsStack; + struct nsstack + { + const xmlChar *ptr; + BSTR prefix; + BSTR uri; + } *nsStack; int attributesSize; int nb_attributes; @@ -255,27 +260,57 @@ static inline BOOL has_error_handler(const saxlocator *locator) (!locator->vbInterface && locator->saxreader->errorHandler); } -static HRESULT namespacePush(saxlocator *locator, int ns) +static HRESULT namespacePush(saxlocator *locator, const xmlChar *prefix, + const xmlChar *uri) { if(locator->nsStackLast>=locator->nsStackSize) { - int *new_stack; + struct nsstack *new_stack; new_stack = HeapReAlloc(GetProcessHeap(), 0, - locator->nsStack, sizeof(int)*locator->nsStackSize*2); + locator->nsStack, sizeof(struct nsstack)*locator->nsStackSize*2); if(!new_stack) return E_OUTOFMEMORY; locator->nsStack = new_stack; locator->nsStackSize *= 2; } - locator->nsStack[locator->nsStackLast++] = ns; + + locator->nsStack[locator->nsStackLast].ptr = uri; + if(uri) + { + locator->nsStack[locator->nsStackLast].prefix = bstr_from_xmlChar(prefix); + if(!locator->nsStack[locator->nsStackLast].prefix) + return E_OUTOFMEMORY; + locator->nsStack[locator->nsStackLast].uri = bstr_from_xmlChar(uri); + if(!locator->nsStack[locator->nsStackLast].uri) + { + SysFreeString(locator->nsStack[locator->nsStackLast].prefix); + return E_OUTOFMEMORY; + } + } + else + { + locator->nsStack[locator->nsStackLast].prefix = NULL; + locator->nsStack[locator->nsStackLast].uri = NULL; + } + + locator->nsStackLast++; return S_OK; } -static int namespacePop(saxlocator *locator) +static HRESULT namespacePop(saxlocator *locator) { - if(locator->nsStackLast == 0) return 0; - return locator->nsStack[--locator->nsStackLast]; + if(locator->nsStackLast == 0) + { + ERR("namespace stack is empty\n"); + return E_UNEXPECTED; + } + + SysFreeString(locator->nsStack[--locator->nsStackLast].prefix); + SysFreeString(locator->nsStack[locator->nsStackLast].uri); + locator->nsStack[locator->nsStackLast].prefix = NULL; + locator->nsStack[locator->nsStackLast].uri = NULL; + return S_OK; } static BOOL bstr_pool_insert(struct bstrpool *pool, BSTR pool_entry) @@ -1165,7 +1200,16 @@ static void libxmlStartElementNS( index++; update_position(This, (xmlChar*)This->pParserCtxt->input->cur+index); - hr = namespacePush(This, nb_namespaces); + hr = namespacePush(This, NULL, NULL); + for(index=0; hr==S_OK && index<nb_namespaces; index++) + hr = namespacePush(This, namespaces[2*index], namespaces[2*index+1]); + if(hr != S_OK) + { + for(; index>=0; index--) + namespacePop(This); + namespacePop(This); + } + if(hr==S_OK && has_content_handler(This)) { for(index=0; index<nb_namespaces; index++) @@ -1217,11 +1261,11 @@ static void libxmlEndElementNS( const xmlChar *prefix, const xmlChar *URI) { - BSTR NamespaceUri, LocalName, QName, Prefix; + BSTR NamespaceUri, LocalName, QName; saxlocator *This = ctx; HRESULT hr; xmlChar *end; - int nsNr, index; + struct nsstack *elem = &This->nsStack[This->nsStackLast-1]; end = (xmlChar*)This->pParserCtxt->input->cur; if(This->saxreader->version >= MSXML6) { @@ -1234,8 +1278,6 @@ static void libxmlEndElementNS( update_position(This, end); - nsNr = namespacePop(This); - if(has_content_handler(This)) { NamespaceUri = pooled_bstr_from_xmlChar(&This->saxreader->pool, URI); @@ -1263,53 +1305,69 @@ static void libxmlEndElementNS( if(This->saxreader->version >= MSXML6) { - for(index=This->pParserCtxt->nsNr-nsNr*2; - index<This->pParserCtxt->nsNr; index+=2) - { - Prefix = pooled_bstr_from_xmlChar(&This->saxreader->pool, This->pParserCtxt->nsTab[index]); + while(elem->ptr) { + elem--; + } + elem++; + while(elem < &This->nsStack[This->nsStackLast]) { if(This->vbInterface) hr = IVBSAXContentHandler_endPrefixMapping( - This->saxreader->vbcontentHandler, &Prefix); + This->saxreader->vbcontentHandler, &elem->prefix); else hr = ISAXContentHandler_endPrefixMapping( This->saxreader->contentHandler, - Prefix, SysStringLen(Prefix)); + elem->prefix, SysStringLen(elem->prefix)); - if(FAILED(hr)) + if(hr != S_OK) { format_error_message_from_id(This, hr); return; } + + elem++; + } + + elem--; + while(elem->ptr) { + namespacePop(This); + elem--; } } else { - for(index=This->pParserCtxt->nsNr-2; - index>=This->pParserCtxt->nsNr-nsNr*2; index-=2) - { - Prefix = pooled_bstr_from_xmlChar(&This->saxreader->pool, This->pParserCtxt->nsTab[index]); + while(1) { + if(!elem->ptr) + break; if(This->vbInterface) hr = IVBSAXContentHandler_endPrefixMapping( - This->saxreader->vbcontentHandler, &Prefix); + This->saxreader->vbcontentHandler, &elem->prefix); else hr = ISAXContentHandler_endPrefixMapping( This->saxreader->contentHandler, - Prefix, SysStringLen(Prefix)); + elem->prefix, SysStringLen(elem->prefix)); - if(hr != S_OK) + if(FAILED(hr)) { format_error_message_from_id(This, hr); return; } + + namespacePop(This); + elem--; } } } else { This->nb_attributes = 0; + while(elem->ptr) { + namespacePop(This); + elem--; + } } + namespacePop(This); update_position(This, NULL); } @@ -1806,6 +1864,8 @@ static ULONG WINAPI isaxlocator_Release( SysFreeString(This->publicId); SysFreeString(This->systemId); + while(This->nsStackLast) + namespacePop(This); heap_free(This->nsStack); for(index=0; index<This->nb_attributes; index++) @@ -1927,7 +1987,7 @@ static HRESULT SAXLocator_create(saxreader *reader, saxlocator **ppsaxlocator, B locator->ret = S_OK; locator->nsStackSize = 8; locator->nsStackLast = 0; - locator->nsStack = heap_alloc(sizeof(int)*locator->nsStackSize); + locator->nsStack = heap_alloc(sizeof(struct nsstack)*locator->nsStackSize); if(!locator->nsStack) { ISAXXMLReader_Release(&reader->ISAXXMLReader_iface);
1
0
0
0
← Newer
1
2
3
4
...
79
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
Results per page:
10
25
50
100
200