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
November 2012
----- 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
708 discussions
Start a n
N
ew thread
Jacek Caban : mshtml: Fixed a few coverity issues.
by Alexandre Julliard
27 Nov '12
27 Nov '12
Module: wine Branch: master Commit: df53b501714089f30626664a0daa226c0e80a3aa URL:
http://source.winehq.org/git/wine.git/?a=commit;h=df53b501714089f30626664a0…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Nov 27 12:16:34 2012 +0100 mshtml: Fixed a few coverity issues. --- dlls/mshtml/navigate.c | 16 ++++++++-------- dlls/mshtml/nsembed.c | 1 + dlls/mshtml/nsio.c | 12 +++++++++--- dlls/mshtml/pluginhost.c | 4 +++- dlls/mshtml/protocol.c | 9 +++++++-- 5 files changed, 28 insertions(+), 14 deletions(-) diff --git a/dlls/mshtml/navigate.c b/dlls/mshtml/navigate.c index 346524d..fb4f1e8 100644 --- a/dlls/mshtml/navigate.c +++ b/dlls/mshtml/navigate.c @@ -800,15 +800,16 @@ HRESULT start_binding(HTMLInnerWindow *inner_window, BSCallback *bscallback, IBi /* NOTE: IE7 calls IsSystemMoniker here*/ if(bctx) { - RegisterBindStatusCallback(bctx, &bscallback->IBindStatusCallback_iface, NULL, 0); - IBindCtx_AddRef(bctx); + hres = RegisterBindStatusCallback(bctx, &bscallback->IBindStatusCallback_iface, NULL, 0); + if(SUCCEEDED(hres)) + IBindCtx_AddRef(bctx); }else { hres = CreateAsyncBindCtx(0, &bscallback->IBindStatusCallback_iface, NULL, &bctx); - if(FAILED(hres)) { - WARN("CreateAsyncBindCtx failed: %08x\n", hres); - bscallback->vtbl->stop_binding(bscallback, hres); - return hres; - } + } + + if(FAILED(hres)) { + bscallback->vtbl->stop_binding(bscallback, hres); + return hres; } hres = IMoniker_BindToStorage(bscallback->mon, bctx, NULL, &IID_IStream, (void**)&str); @@ -1473,7 +1474,6 @@ static void handle_navigation_error(nsChannelBSC *This, DWORD result) return; if(!doc->client_cmdtrg) - if(FAILED(hres)) return; bound.lLbound = 0; diff --git a/dlls/mshtml/nsembed.c b/dlls/mshtml/nsembed.c index c93673a..5593c6b 100644 --- a/dlls/mshtml/nsembed.c +++ b/dlls/mshtml/nsembed.c @@ -280,6 +280,7 @@ static nsresult NSAPI nsDirectoryServiceProvider2_GetFile(nsIDirectoryServicePro return nsres; } + assert(profile_directory != NULL); return nsIFile_Clone(profile_directory, _retval); } diff --git a/dlls/mshtml/nsio.c b/dlls/mshtml/nsio.c index 89a7fe8..c8bbdd8 100644 --- a/dlls/mshtml/nsio.c +++ b/dlls/mshtml/nsio.c @@ -1042,10 +1042,16 @@ static nsresult NSAPI nsChannel_AsyncOpen(nsIHttpChannel *iface, nsIStreamListen return NS_ERROR_FAILURE; if(TRACE_ON(mshtml)) { + HRESULT hres; BSTR uri_str; - IUri_GetDisplayUri(This->uri->uri, &uri_str); - TRACE("opening %s\n", debugstr_w(uri_str)); - SysFreeString(uri_str); + + hres = IUri_GetDisplayUri(This->uri->uri, &uri_str); + if(SUCCEEDED(hres)) { + TRACE("opening %s\n", debugstr_w(uri_str)); + SysFreeString(uri_str); + }else { + WARN("GetDisplayUri failed: %08x\n", hres); + } } if(This->uri->is_doc_uri) { diff --git a/dlls/mshtml/pluginhost.c b/dlls/mshtml/pluginhost.c index 4f088ad..38a8fd5 100644 --- a/dlls/mshtml/pluginhost.c +++ b/dlls/mshtml/pluginhost.c @@ -1301,8 +1301,10 @@ static HRESULT WINAPI PHInPlaceSite_GetWindowContext(IOleInPlaceSiteEx *iface, return hres; hres = create_ip_window(ppDoc); - if(FAILED(hres)) + if(FAILED(hres)) { + IOleInPlaceFrame_Release(ip_frame); return hres; + } *ppFrame = ip_frame; *lprcPosRect = This->rect; diff --git a/dlls/mshtml/protocol.c b/dlls/mshtml/protocol.c index d9a008c..021ce55 100644 --- a/dlls/mshtml/protocol.c +++ b/dlls/mshtml/protocol.c @@ -218,6 +218,7 @@ static HRESULT WINAPI AboutProtocol_Start(IInternetProtocol *iface, LPCWSTR szUr LPCWSTR text = NULL; DWORD data_len; BYTE *data; + HRESULT hres; static const WCHAR html_begin[] = {0xfeff,'<','H','T','M','L','>',0}; static const WCHAR html_end[] = {'<','/','H','T','M','L','>',0}; @@ -237,7 +238,9 @@ static HRESULT WINAPI AboutProtocol_Start(IInternetProtocol *iface, LPCWSTR szUr memset(&bindinfo, 0, sizeof(bindinfo)); bindinfo.cbSize = sizeof(BINDINFO); - IInternetBindInfo_GetBindInfo(pOIBindInfo, &grfBINDF, &bindinfo); + hres = IInternetBindInfo_GetBindInfo(pOIBindInfo, &grfBINDF, &bindinfo); + if(FAILED(hres)) + return hres; ReleaseBindInfo(&bindinfo); TRACE("bindf %x\n", grfBINDF); @@ -605,7 +608,9 @@ static HRESULT WINAPI ResProtocol_Start(IInternetProtocol *iface, LPCWSTR szUrl, memset(&bindinfo, 0, sizeof(bindinfo)); bindinfo.cbSize = sizeof(BINDINFO); - IInternetBindInfo_GetBindInfo(pOIBindInfo, &grfBINDF, &bindinfo); + hres = IInternetBindInfo_GetBindInfo(pOIBindInfo, &grfBINDF, &bindinfo); + if(FAILED(hres)) + return hres; ReleaseBindInfo(&bindinfo); len = strlenW(szUrl)+16;
1
0
0
0
Huw Davies : oledb32: Add a 'fall through' comment.
by Alexandre Julliard
27 Nov '12
27 Nov '12
Module: wine Branch: master Commit: 71d185d7fe29944a51b43497860866ba8552b683 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=71d185d7fe29944a51b434978…
Author: Huw Davies <huw(a)codeweavers.com> Date: Tue Nov 27 10:24:47 2012 +0000 oledb32: Add a 'fall through' comment. --- dlls/oledb32/convert.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/dlls/oledb32/convert.c b/dlls/oledb32/convert.c index 1691792..badb899 100644 --- a/dlls/oledb32/convert.c +++ b/dlls/oledb32/convert.c @@ -870,6 +870,7 @@ static HRESULT WINAPI convert_CanConvert(IDataConvert* iface, case DBTYPE_BOOL: if(dst_base_type == DBTYPE_DATE) return S_OK; + /* fall through */ case DBTYPE_NUMERIC: case DBTYPE_CY: if(common_class(dst_class)) return S_OK;
1
0
0
0
Huw Davies : winex11: Add a few 'fall through' comments.
by Alexandre Julliard
27 Nov '12
27 Nov '12
Module: wine Branch: master Commit: 2232fef56c0258f859bf6622f6104c8b2e2d7610 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2232fef56c0258f859bf6622f…
Author: Huw Davies <huw(a)codeweavers.com> Date: Tue Nov 27 10:11:03 2012 +0000 winex11: Add a few 'fall through' comments. --- dlls/winex11.drv/palette.c | 2 ++ dlls/winex11.drv/xrender.c | 1 + 2 files changed, 3 insertions(+), 0 deletions(-) diff --git a/dlls/winex11.drv/palette.c b/dlls/winex11.drv/palette.c index 91476d4..b9ad599 100644 --- a/dlls/winex11.drv/palette.c +++ b/dlls/winex11.drv/palette.c @@ -146,6 +146,7 @@ int X11DRV_PALETTE_Init(void) { case DirectColor: X11DRV_PALETTE_PaletteFlags |= X11DRV_PALETTE_VIRTUAL; + /* fall through */ case GrayScale: case PseudoColor: if (private_color_map) @@ -175,6 +176,7 @@ int X11DRV_PALETTE_Init(void) case TrueColor: X11DRV_PALETTE_PaletteFlags |= X11DRV_PALETTE_VIRTUAL; + /* fall through */ case StaticColor: X11DRV_PALETTE_PaletteFlags |= X11DRV_PALETTE_FIXED; X11DRV_PALETTE_ComputeColorShifts(&X11DRV_PALETTE_default_shifts, default_visual.red_mask, default_visual.green_mask, default_visual.blue_mask); diff --git a/dlls/winex11.drv/xrender.c b/dlls/winex11.drv/xrender.c index bafc622..d1d1ccc 100644 --- a/dlls/winex11.drv/xrender.c +++ b/dlls/winex11.drv/xrender.c @@ -1112,6 +1112,7 @@ static void UploadGlyph(struct xrender_physdev *physDev, int glyph) default: ERR("aa = %d - not implemented\n", format); + /* fall through */ case AA_None: wxr_format = WXR_FORMAT_MONO; break;
1
0
0
0
Huw Davies : gdi32: Simplify the point type checking logic.
by Alexandre Julliard
27 Nov '12
27 Nov '12
Module: wine Branch: master Commit: e6f1930116c9f0fa49d931120ea02e4828e1991a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e6f1930116c9f0fa49d931120…
Author: Huw Davies <huw(a)codeweavers.com> Date: Tue Nov 27 09:15:53 2012 +0000 gdi32: Simplify the point type checking logic. --- dlls/gdi32/painting.c | 11 +++++------ 1 files changed, 5 insertions(+), 6 deletions(-) diff --git a/dlls/gdi32/painting.c b/dlls/gdi32/painting.c index 74ca835..354bea9 100644 --- a/dlls/gdi32/painting.c +++ b/dlls/gdi32/painting.c @@ -152,12 +152,11 @@ BOOL nulldrv_PolyDraw( PHYSDEV dev, const POINT *points, const BYTE *types, DWOR case PT_LINETO: break; case PT_BEZIERTO: - if((i + 2 < count) && (types[i + 1] == PT_BEZIERTO) && - ((types[i + 2] & ~PT_CLOSEFIGURE) == PT_BEZIERTO)) - { - i += 2; - break; - } + if (i + 2 >= count) return FALSE; + if (types[i + 1] != PT_BEZIERTO) return FALSE; + if ((types[i + 2] & ~PT_CLOSEFIGURE) != PT_BEZIERTO) return FALSE; + i += 2; + break; default: return FALSE; }
1
0
0
0
Nikolay Sivov : xmllite: Implement encoding declaration parsing.
by Alexandre Julliard
27 Nov '12
27 Nov '12
Module: wine Branch: master Commit: 8e2bc1eb1b875f0dfdc4c09735b1f53538baeceb URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8e2bc1eb1b875f0dfdc4c0973…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Tue Nov 27 08:46:42 2012 -0500 xmllite: Implement encoding declaration parsing. --- dlls/xmllite/reader.c | 99 +++++++++++++++++++++++++++++++++++++++++++----- 1 files changed, 88 insertions(+), 11 deletions(-) diff --git a/dlls/xmllite/reader.c b/dlls/xmllite/reader.c index 0d21e79..87d7936 100644 --- a/dlls/xmllite/reader.c +++ b/dlls/xmllite/reader.c @@ -46,6 +46,10 @@ typedef enum static const WCHAR utf16W[] = {'U','T','F','-','1','6',0}; static const WCHAR utf8W[] = {'U','T','F','-','8',0}; +static const WCHAR dblquoteW[] = {'\"',0}; +static const WCHAR quoteW[] = {'\'',0}; +static const WCHAR eqW[] = {'=',0}; + struct xml_encoding_data { const WCHAR *name; @@ -213,7 +217,7 @@ static HRESULT get_code_page(xml_encoding encoding, UINT *cp) return S_OK; } -static xml_encoding parse_encoding_name(const WCHAR *name) +static xml_encoding parse_encoding_name(const WCHAR *name, int len) { int min, max, n, c; @@ -226,7 +230,10 @@ static xml_encoding parse_encoding_name(const WCHAR *name) { n = (min+max)/2; - c = strcmpiW(xml_encoding_map[n].name, name); + if (len != -1) + c = strncmpiW(xml_encoding_map[n].name, name, len); + else + c = strcmpiW(xml_encoding_map[n].name, name); if (!c) return xml_encoding_map[n].enc; @@ -491,20 +498,20 @@ static int reader_skipspaces(xmlreader *reader) /* [26] VersionNum ::= '1.' [0-9]+ */ static HRESULT reader_parse_versionnum(xmlreader *reader) { - const WCHAR *ptr, *start = reader_get_cur(reader); + const WCHAR *ptr, *ptr2, *start = reader_get_cur(reader); static const WCHAR onedotW[] = {'1','.',0}; if (reader_cmp(reader, onedotW)) return WC_E_XMLDECL; /* skip "1." */ reader_skipn(reader, 2); - ptr = reader_get_cur(reader); + ptr2 = ptr = reader_get_cur(reader); while (*ptr >= '0' && *ptr <= '9') ptr++; - if (ptr == start) return WC_E_DIGIT; - TRACE("version=%s\n", debugstr_wn(start, ptr-start)); - reader_skipn(reader, ptr-start); + if (ptr2 == ptr) return WC_E_DIGIT; + TRACE("version=%s", debugstr_wn(start, ptr-start)); + reader_skipn(reader, ptr-ptr2); return S_OK; } @@ -512,9 +519,6 @@ static HRESULT reader_parse_versionnum(xmlreader *reader) static HRESULT reader_parse_versioninfo(xmlreader *reader) { static const WCHAR versionW[] = {'v','e','r','s','i','o','n',0}; - static const WCHAR dblquoteW[] = {'\"',0}; - static const WCHAR quoteW[] = {'\'',0}; - static const WCHAR eqW[] = {'=',0}; HRESULT hr; if (!reader_skipspaces(reader)) return WC_E_WHITESPACE; @@ -544,6 +548,75 @@ static HRESULT reader_parse_versioninfo(xmlreader *reader) return S_OK; } +/* ([A-Za-z0-9._] | '-') */ +static inline int is_wchar_encname(WCHAR ch) +{ + return ((ch >= 'A' && ch <= 'Z') || + (ch >= 'a' && ch <= 'z') || + (ch >= '0' && ch <= '9') || + (ch == '.') || (ch == '_') || + (ch == '-')); +} + +/* [81] EncName ::= [A-Za-z] ([A-Za-z0-9._] | '-')* */ +static HRESULT reader_parse_encname(xmlreader *reader) +{ + const WCHAR *start = reader_get_cur(reader), *ptr; + xml_encoding enc; + int len; + + if ((*start < 'A' || *start > 'Z') && (*start < 'a' || *start > 'z')) + return WC_E_ENCNAME; + + ptr = start; + while (is_wchar_encname(*++ptr)) + ; + + len = ptr - start; + enc = parse_encoding_name(start, len); + TRACE("encoding name %s\n", debugstr_wn(start, len)); + + if (enc == XmlEncoding_Unknown) + return WC_E_ENCNAME; + + /* skip encoding name */ + reader_skipn(reader, len); + return S_OK; +} + +/* [80] EncodingDecl ::= S 'encoding' Eq ('"' EncName '"' | "'" EncName "'" ) */ +static HRESULT reader_parse_encdecl(xmlreader *reader) +{ + static const WCHAR encodingW[] = {'e','n','c','o','d','i','n','g',0}; + HRESULT hr; + + if (!reader_skipspaces(reader)) return WC_E_WHITESPACE; + + if (reader_cmp(reader, encodingW)) return S_OK; + /* skip 'encoding' */ + reader_skipn(reader, 8); + + if (reader_cmp(reader, eqW)) return WC_E_EQUAL; + /* skip '=' */ + reader_skipn(reader, 1); + + if (reader_cmp(reader, quoteW) && reader_cmp(reader, dblquoteW)) + return WC_E_QUOTE; + /* skip "'"|'"' */ + reader_skipn(reader, 1); + + hr = reader_parse_encname(reader); + if (FAILED(hr)) return hr; + + if (reader_cmp(reader, quoteW) && reader_cmp(reader, dblquoteW)) + return WC_E_QUOTE; + + /* skip "'"|'"' */ + reader_skipn(reader, 1); + + return S_OK; +} + /* [23] XMLDecl ::= '<?xml' VersionInfo EncodingDecl? SDDecl? S? '?>' */ static HRESULT reader_parse_xmldecl(xmlreader *reader) { @@ -558,6 +631,10 @@ static HRESULT reader_parse_xmldecl(xmlreader *reader) if (FAILED(hr)) return hr; + hr = reader_parse_encdecl(reader); + if (FAILED(hr)) + return hr; + return E_NOTIMPL; } @@ -1028,7 +1105,7 @@ HRESULT WINAPI CreateXmlReaderInputWithEncodingName(IUnknown *stream, readerinput->imalloc = imalloc; readerinput->stream = NULL; if (imalloc) IMalloc_AddRef(imalloc); - readerinput->encoding = parse_encoding_name(encoding); + readerinput->encoding = parse_encoding_name(encoding, -1); readerinput->hint = hint; readerinput->baseuri = readerinput_strdupW(readerinput, base_uri);
1
0
0
0
Nikolay Sivov : msxml3: No need to keep a reference to a temporarily used stream.
by Alexandre Julliard
27 Nov '12
27 Nov '12
Module: wine Branch: master Commit: 5aa1754b7eae26f238a060862021fa7b8df6a8ab URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5aa1754b7eae26f238a060862…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Mon Nov 26 23:32:57 2012 -0500 msxml3: No need to keep a reference to a temporarily used stream. --- dlls/msxml3/domdoc.c | 21 ++++++--------------- 1 files changed, 6 insertions(+), 15 deletions(-) diff --git a/dlls/msxml3/domdoc.c b/dlls/msxml3/domdoc.c index c3144ce..52b41a7 100644 --- a/dlls/msxml3/domdoc.c +++ b/dlls/msxml3/domdoc.c @@ -132,9 +132,6 @@ struct domdoc bsc_t *bsc; HRESULT error; - /* IPersistStream */ - IStream *stream; - /* IObjectWithSite*/ IUnknown *site; @@ -722,34 +719,31 @@ static HRESULT domdoc_load_from_stream(domdoc *doc, ISequentialStream *stream) { DWORD read, written, len; xmlDocPtr xmldoc = NULL; + IStream *hstream; HGLOBAL hglobal; BYTE buf[4096]; HRESULT hr; char *ptr; - if (doc->stream) - { - IStream_Release(doc->stream); - doc->stream = NULL; - } - - hr = CreateStreamOnHGlobal(NULL, TRUE, &doc->stream); + hstream = NULL; + hr = CreateStreamOnHGlobal(NULL, TRUE, &hstream); if (FAILED(hr)) return hr; do { ISequentialStream_Read(stream, buf, sizeof(buf), &read); - hr = IStream_Write(doc->stream, buf, read, &written); + hr = IStream_Write(hstream, buf, read, &written); } while(SUCCEEDED(hr) && written != 0 && read != 0); if (FAILED(hr)) { ERR("failed to copy stream 0x%08x\n", hr); + IStream_Release(hstream); return hr; } - hr = GetHGlobalFromStream(doc->stream, &hglobal); + hr = GetHGlobalFromStream(hstream, &hglobal); if (FAILED(hr)) return hr; @@ -922,8 +916,6 @@ static ULONG WINAPI domdoc_Release( IXMLDOMDocument3 *iface ) if (This->site) IUnknown_Release( This->site ); destroy_xmlnode(&This->node); - if (This->stream) - IStream_Release(This->stream); for (eid = 0; eid < EVENTID_LAST; eid++) if (This->events[eid]) IDispatch_Release(This->events[eid]); @@ -3493,7 +3485,6 @@ HRESULT get_domdoc_from_xmldoc(xmlDocPtr xmldoc, IXMLDOMDocument3 **document) doc->resolving = 0; doc->properties = properties_from_xmlDocPtr(xmldoc); doc->error = S_OK; - doc->stream = NULL; doc->site = NULL; doc->safeopt = 0; doc->bsc = NULL;
1
0
0
0
Nikolay Sivov : msxml3: Support ISequentialStream as a document load source .
by Alexandre Julliard
27 Nov '12
27 Nov '12
Module: wine Branch: master Commit: db9d8ebb086c5ef3ef12fb33e7cb47478205e89e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=db9d8ebb086c5ef3ef12fb33e…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Mon Nov 26 23:29:06 2012 -0500 msxml3: Support ISequentialStream as a document load source. --- dlls/msxml3/domdoc.c | 58 +++++++++++++++++++------------------------------ 1 files changed, 23 insertions(+), 35 deletions(-) diff --git a/dlls/msxml3/domdoc.c b/dlls/msxml3/domdoc.c index 16fc64c..c3144ce 100644 --- a/dlls/msxml3/domdoc.c +++ b/dlls/msxml3/domdoc.c @@ -2037,8 +2037,6 @@ static HRESULT WINAPI domdoc_load( domdoc *This = impl_from_IXMLDOMDocument3( iface ); LPWSTR filename = NULL; HRESULT hr = S_FALSE; - IXMLDOMDocument3 *pNewDoc = NULL; - IStream *pStream = NULL; xmlDocPtr xmldoc; TRACE("(%p)->(%s)\n", This, debugstr_variant(&source)); @@ -2104,13 +2102,18 @@ static HRESULT WINAPI domdoc_load( } break; case VT_UNKNOWN: + { + ISequentialStream *stream = NULL; + IXMLDOMDocument3 *newdoc = NULL; + if (!V_UNKNOWN(&source)) return E_INVALIDARG; - hr = IUnknown_QueryInterface(V_UNKNOWN(&source), &IID_IXMLDOMDocument3, (void**)&pNewDoc); + + hr = IUnknown_QueryInterface(V_UNKNOWN(&source), &IID_IXMLDOMDocument3, (void**)&newdoc); if(hr == S_OK) { - if(pNewDoc) + if(newdoc) { - domdoc *newDoc = impl_from_IXMLDOMDocument3( pNewDoc ); + domdoc *newDoc = impl_from_IXMLDOMDocument3( newdoc ); xmldoc = xmlCopyDoc(get_doc(newDoc), 1); xmldoc->_private = create_priv(); @@ -2122,40 +2125,25 @@ static HRESULT WINAPI domdoc_load( return hr; } } - hr = IUnknown_QueryInterface(V_UNKNOWN(&source), &IID_IStream, (void**)&pStream); - if(hr == S_OK) - { - IPersistStream *pDocStream; - hr = IXMLDOMDocument3_QueryInterface(iface, &IID_IPersistStream, (void**)&pDocStream); - if(hr == S_OK) - { - hr = IPersistStream_Load(pDocStream, pStream); - IStream_Release(pStream); - if(hr == S_OK) - { - *isSuccessful = VARIANT_TRUE; - TRACE("Using IStream to load Document\n"); - return S_OK; - } - else - { - ERR("xmldoc_IPersistStream_Load failed (%d)\n", hr); - } - } - else - { - ERR("QueryInterface IID_IPersistStream failed (%d)\n", hr); - } - } - else + hr = IUnknown_QueryInterface(V_UNKNOWN(&source), &IID_IStream, (void**)&stream); + if (FAILED(hr)) + hr = IUnknown_QueryInterface(V_UNKNOWN(&source), &IID_ISequentialStream, (void**)&stream); + + if (hr == S_OK) { - /* ISequentialStream */ - FIXME("Unknown type not supported (0x%08x) (%p)(%p)\n", hr, pNewDoc, V_UNKNOWN(&source)->lpVtbl); + hr = domdoc_load_from_stream(This, stream); + if (hr == S_OK) + *isSuccessful = VARIANT_TRUE; + ISequentialStream_Release(stream); + return hr; } + + FIXME("unsupported IUnknown type (0x%08x) (%p)\n", hr, V_UNKNOWN(&source)->lpVtbl); break; - default: - FIXME("VT type not supported (%d)\n", V_VT(&source)); + } + default: + FIXME("VT type not supported (%d)\n", V_VT(&source)); } if ( filename )
1
0
0
0
Nikolay Sivov : msxml3: Move document loading from stream to a separate function.
by Alexandre Julliard
27 Nov '12
27 Nov '12
Module: wine Branch: master Commit: b296b08a5c383a1f80484e49e1821f1f96d9119a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b296b08a5c383a1f80484e49e…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Mon Nov 26 23:07:24 2012 -0500 msxml3: Move document loading from stream to a separate function. --- dlls/msxml3/domdoc.c | 49 ++++++++++++++++++++++++++++++------------------- 1 files changed, 30 insertions(+), 19 deletions(-) diff --git a/dlls/msxml3/domdoc.c b/dlls/msxml3/domdoc.c index d1e0ebb..16fc64c 100644 --- a/dlls/msxml3/domdoc.c +++ b/dlls/msxml3/domdoc.c @@ -718,46 +718,45 @@ static HRESULT WINAPI PersistStreamInit_IsDirty( return S_FALSE; } -static HRESULT WINAPI PersistStreamInit_Load( - IPersistStreamInit *iface, LPSTREAM pStm) +static HRESULT domdoc_load_from_stream(domdoc *doc, ISequentialStream *stream) { - domdoc *This = impl_from_IPersistStreamInit(iface); - HRESULT hr; - HGLOBAL hglobal; DWORD read, written, len; + xmlDocPtr xmldoc = NULL; + HGLOBAL hglobal; BYTE buf[4096]; + HRESULT hr; char *ptr; - xmlDocPtr xmldoc = NULL; - - TRACE("(%p)->(%p)\n", This, pStm); - if (!pStm) - return E_INVALIDARG; + if (doc->stream) + { + IStream_Release(doc->stream); + doc->stream = NULL; + } - hr = CreateStreamOnHGlobal(NULL, TRUE, &This->stream); + hr = CreateStreamOnHGlobal(NULL, TRUE, &doc->stream); if (FAILED(hr)) return hr; do { - IStream_Read(pStm, buf, sizeof(buf), &read); - hr = IStream_Write(This->stream, buf, read, &written); + ISequentialStream_Read(stream, buf, sizeof(buf), &read); + hr = IStream_Write(doc->stream, buf, read, &written); } while(SUCCEEDED(hr) && written != 0 && read != 0); if (FAILED(hr)) { - ERR("Failed to copy stream\n"); + ERR("failed to copy stream 0x%08x\n", hr); return hr; } - hr = GetHGlobalFromStream(This->stream, &hglobal); + hr = GetHGlobalFromStream(doc->stream, &hglobal); if (FAILED(hr)) return hr; len = GlobalSize(hglobal); ptr = GlobalLock(hglobal); - if (len != 0) - xmldoc = doparse(This, ptr, len, XML_CHAR_ENCODING_NONE); + if (len) + xmldoc = doparse(doc, ptr, len, XML_CHAR_ENCODING_NONE); GlobalUnlock(hglobal); if (!xmldoc) @@ -768,7 +767,19 @@ static HRESULT WINAPI PersistStreamInit_Load( xmldoc->_private = create_priv(); - return attach_xmldoc(This, xmldoc); + return attach_xmldoc(doc, xmldoc); +} + +static HRESULT WINAPI PersistStreamInit_Load(IPersistStreamInit *iface, IStream *stream) +{ + domdoc *This = impl_from_IPersistStreamInit(iface); + + TRACE("(%p)->(%p)\n", This, stream); + + if (!stream) + return E_INVALIDARG; + + return domdoc_load_from_stream(This, (ISequentialStream*)stream); } static HRESULT WINAPI PersistStreamInit_Save( @@ -2140,7 +2151,7 @@ static HRESULT WINAPI domdoc_load( else { /* ISequentialStream */ - FIXME("Unknown type not supported (%d) (%p)(%p)\n", hr, pNewDoc, V_UNKNOWN(&source)->lpVtbl); + FIXME("Unknown type not supported (0x%08x) (%p)(%p)\n", hr, pNewDoc, V_UNKNOWN(&source)->lpVtbl); } break; default:
1
0
0
0
Maarten Lankhorst : dsound: Set dwChannelMask when limiting channels.
by Alexandre Julliard
27 Nov '12
27 Nov '12
Module: wine Branch: master Commit: 79084be3c176e169d4f45391a7a566867c9c8f7d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=79084be3c176e169d4f45391a…
Author: Maarten Lankhorst <m.b.lankhorst(a)gmail.com> Date: Mon Nov 26 17:02:06 2012 +0100 dsound: Set dwChannelMask when limiting channels. --- dlls/dsound/primary.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/dlls/dsound/primary.c b/dlls/dsound/primary.c index bf76dec..bc72d78 100644 --- a/dlls/dsound/primary.c +++ b/dlls/dsound/primary.c @@ -80,6 +80,7 @@ static HRESULT DSOUND_WaveFormat(DirectSoundDevice *device, IAudioClient *client mixwfe->Format.nChannels = 2; mixwfe->Format.nBlockAlign = mixwfe->Format.nChannels * mixwfe->Format.wBitsPerSample / 8; mixwfe->Format.nAvgBytesPerSec = mixwfe->Format.nSamplesPerSec * mixwfe->Format.nBlockAlign; + mixwfe->dwChannelMask = SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT; } if (!IsEqualGUID(&mixwfe->SubFormat, &KSDATAFORMAT_SUBTYPE_IEEE_FLOAT)) {
1
0
0
0
Piotr Caban : msvcp100: Added _Container_base12 class tests.
by Alexandre Julliard
27 Nov '12
27 Nov '12
Module: wine Branch: master Commit: 642e9a1eda90f8011eb1f5d841874ab79c1cd718 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=642e9a1eda90f8011eb1f5d84…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Mon Nov 26 22:33:35 2012 +0000 msvcp100: Added _Container_base12 class tests. --- dlls/msvcp100/tests/Makefile.in | 1 + dlls/msvcp100/tests/misc.c | 194 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 195 insertions(+), 0 deletions(-) diff --git a/dlls/msvcp100/tests/Makefile.in b/dlls/msvcp100/tests/Makefile.in index fe92d54..2bf01e0 100644 --- a/dlls/msvcp100/tests/Makefile.in +++ b/dlls/msvcp100/tests/Makefile.in @@ -4,6 +4,7 @@ MODCFLAGS = @BUILTINFLAG@ EXTRAINCL = -I$(top_srcdir)/include/msvcrt C_SRCS = \ + misc.c \ string.c @MAKE_TEST_RULES@ diff --git a/dlls/msvcp100/tests/misc.c b/dlls/msvcp100/tests/misc.c new file mode 100644 index 0000000..89933d0 --- /dev/null +++ b/dlls/msvcp100/tests/misc.c @@ -0,0 +1,194 @@ +/* + * Copyright 2012 Piotr Caban for CodeWeavers + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include <stdio.h> + +#include <windef.h> +#include <winbase.h> +#include "wine/test.h" + +struct __Container_proxy; + +typedef struct { + struct __Container_proxy *proxy; +} _Container_base12; + +typedef struct __Iterator_base12 { + struct __Container_proxy *proxy; + struct __Iterator_base12 *next; +} _Iterator_base12; + +typedef struct __Container_proxy { + const _Container_base12 *cont; + _Iterator_base12 *head; +} _Container_proxy; + +#undef __thiscall +#ifdef __i386__ +#define __thiscall __stdcall +#else +#define __thiscall __cdecl +#endif + +static _Container_base12* (__thiscall *p__Container_base12_copy_ctor)(_Container_base12*, _Container_base12*); +static _Container_base12* (__thiscall *p__Container_base12_ctor)(_Container_base12*); +static void (__thiscall *p__Container_base12__Orphan_all)(_Container_base12*); +static void (__thiscall *p__Container_base12_dtor)(_Container_base12*); +static _Iterator_base12** (__thiscall *p__Container_base12__Getpfirst)(_Container_base12*); +static void (__thiscall *p__Container_base12__Swap_all)(_Container_base12*, _Container_base12*); + +/* Emulate a __thiscall */ +#ifdef __i386__ + +#include "pshpack1.h" +struct thiscall_thunk +{ + BYTE pop_eax; /* popl %eax (ret addr) */ + BYTE pop_edx; /* popl %edx (func) */ + BYTE pop_ecx; /* popl %ecx (this) */ + BYTE push_eax; /* pushl %eax */ + WORD jmp_edx; /* jmp *%edx */ +}; +#include "poppack.h" + +static void * (WINAPI *call_thiscall_func1)( void *func, void *this ); +static void * (WINAPI *call_thiscall_func2)( void *func, void *this, const void *a ); + +static void init_thiscall_thunk(void) +{ + struct thiscall_thunk *thunk = VirtualAlloc( NULL, sizeof(*thunk), + MEM_COMMIT, PAGE_EXECUTE_READWRITE ); + thunk->pop_eax = 0x58; /* popl %eax */ + thunk->pop_edx = 0x5a; /* popl %edx */ + thunk->pop_ecx = 0x59; /* popl %ecx */ + thunk->push_eax = 0x50; /* pushl %eax */ + thunk->jmp_edx = 0xe2ff; /* jmp *%edx */ + call_thiscall_func1 = (void *)thunk; + call_thiscall_func2 = (void *)thunk; +} + +#define call_func1(func,_this) call_thiscall_func1(func,_this) +#define call_func2(func,_this,a) call_thiscall_func2(func,_this,(const void*)a) + +#else + +#define init_thiscall_thunk() +#define call_func1(func,_this) func(_this) +#define call_func2(func,_this,a) func(_this,a) + +#endif /* __i386__ */ + +#define SETNOFAIL(x,y) x = (void*)GetProcAddress(msvcp,y) +#define SET(x,y) do { SETNOFAIL(x,y); ok(x != NULL, "Export '%s' not found\n", y); } while(0) +static BOOL init(void) +{ + HMODULE msvcp = LoadLibraryA("msvcp100.dll"); + if(!msvcp) { + win_skip("msvcp100.dll not installed\n"); + return FALSE; + } + + if(sizeof(void*) == 8) { /* 64-bit initialization */ + SET(p__Container_base12_copy_ctor, "??0_Container_base12@std@@QEAA@AEBU01@@Z"); + SET(p__Container_base12_ctor, "??0_Container_base12@std@@QEAA@XZ"); + SET(p__Container_base12__Orphan_all, "?_Orphan_all@_Container_base12@std@@QEAAXXZ"); + SET(p__Container_base12_dtor, "??1_Container_base12@std@@QEAA@XZ"); + SET(p__Container_base12__Getpfirst, "?_Getpfirst@_Container_base12@std@@QEBAPEAPEAU_Iterator_base12@2@XZ"); + SET(p__Container_base12__Swap_all, "?_Swap_all@_Container_base12@std@@QEAAXAEAU12@@Z"); + }else { + SET(p__Container_base12_copy_ctor, "??0_Container_base12@std@@QAE@ABU01@@Z"); + SET(p__Container_base12_ctor, "??0_Container_base12@std@@QAE@XZ"); + SET(p__Container_base12__Orphan_all, "?_Orphan_all@_Container_base12@std@@QAEXXZ"); + SET(p__Container_base12_dtor, "??1_Container_base12@std@@QAE@XZ"); + SET(p__Container_base12__Getpfirst, "?_Getpfirst@_Container_base12@std@@QBEPAPAU_Iterator_base12@2@XZ"); + SET(p__Container_base12__Swap_all, "?_Swap_all@_Container_base12@std@@QAEXAAU12@@Z"); + } + + init_thiscall_thunk(); + return TRUE; +} + +static void test__Container_base12(void) +{ + _Container_base12 c1, c2; + _Iterator_base12 i1, i2, **pi; + _Container_proxy p1, p2; + + call_func1(p__Container_base12_ctor, &c1); + ok(c1.proxy == NULL, "c1.proxy != NULL\n"); + + p1.cont = NULL; + p1.head = NULL; + c1.proxy = &p1; + call_func2(p__Container_base12_copy_ctor, &c2, &c1); + ok(c1.proxy == &p1, "c1.proxy = %p, expected %p\n", c1.proxy, &p1); + ok(c2.proxy == NULL, "c2.proxy != NULL\n"); + + p1.head = &i1; + i1.proxy = &p1; + i1.next = &i2; + i2.proxy = &p1; + i2.next = NULL; + pi = call_func1(p__Container_base12__Getpfirst, &c1); + ok(pi == &p1.head, "pi = %p, expected %p\n", pi, &p1.head); + pi = call_func1(p__Container_base12__Getpfirst, &c2); + ok(pi == NULL, "pi != NULL\n"); + + p1.cont = &c1; + call_func1(p__Container_base12_dtor, &c1); + ok(p1.cont == &c1, "p1.cont = %p, expected %p\n", p1.cont, &c1); + ok(p1.head == &i1, "p1.head = %p, expected %p\n", p1.head, &i1); + ok(i1.proxy == &p1, "i1.proxy = %p, expected %p\n", i1.proxy, &p1); + ok(i1.next == &i2, "i1.next = %p, expected %p\n", i1.next, &i2); + ok(i2.proxy == &p1, "i2.proxy = %p, expected %p\n", i2.proxy, &p1); + ok(i2.next == NULL, "i2.next != NULL\n"); + + call_func1(p__Container_base12__Orphan_all, &c1); + ok(p1.cont == &c1, "p1.cont = %p, expected %p\n", p1.cont, &c1); + ok(p1.head == &i1, "p1.head = %p, expected %p\n", p1.head, &i1); + ok(i1.proxy == &p1, "i1.proxy = %p, expected %p\n", i1.proxy, &p1); + ok(i1.next == &i2, "i1.next = %p, expected %p\n", i1.next, &i2); + ok(i2.proxy == &p1, "i2.proxy = %p, expected %p\n", i2.proxy, &p1); + ok(i2.next == NULL, "i2.next != NULL\n"); + + c2.proxy = NULL; + call_func2(p__Container_base12__Swap_all, &c1, &c2); + ok(c1.proxy == NULL, "c1.proxy != NULL\n"); + ok(c2.proxy == &p1, "c2.proxy = %p, expected %p\n", c2.proxy, &p2); + ok(p1.cont == &c2, "p1.cont = %p, expected %p\n", p1.cont, &c2); + + c1.proxy = &p2; + p2.cont = (void*)0xdeadbeef; + p2.head = (void*)0xdeadbeef; + p1.head = &i1; + call_func2(p__Container_base12__Swap_all, &c1, &c2); + ok(c1.proxy == &p1, "c1.proxt = %p, expected %p\n", c1.proxy, &p1); + ok(p1.cont == &c1, "p1.cont = %p, expected %p\n", p1.cont, &c1); + ok(p1.head == &i1, "p1.head = %p, expected %p\n", p1.head, &i1); + ok(c2.proxy == &p2, "c2.proxy = %p, expected %p\n", c2.proxy, &p2); + ok(p2.cont == &c2, "p2.cont = %p, expected %p\n", p2.cont, &c2); + ok(p2.head == (void*)0xdeadbeef, "p2.head = %p, expected 0xdeadbeef\n", p2.head); +} + +START_TEST(misc) +{ + if(!init()) + return; + + test__Container_base12(); +}
1
0
0
0
← Newer
1
...
11
12
13
14
15
16
17
...
71
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
Results per page:
10
25
50
100
200