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
October 2008
----- 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
3 participants
1216 discussions
Start a n
N
ew thread
Andrey Turkin : kernel32: Add ExitProcess wrapper to please Shrinker.
by Alexandre Julliard
08 Oct '08
08 Oct '08
Module: wine Branch: master Commit: 7ba54ab45cf2d6f87f238f9985e778847fd3077a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7ba54ab45cf2d6f87f238f998…
Author: Andrey Turkin <andrey.turkin(a)gmail.com> Date: Tue Oct 7 20:16:19 2008 +0400 kernel32: Add ExitProcess wrapper to please Shrinker. --- dlls/kernel32/process.c | 22 +++++++++++++++++++++- 1 files changed, 21 insertions(+), 1 deletions(-) diff --git a/dlls/kernel32/process.c b/dlls/kernel32/process.c index 759612b..1d68462 100644 --- a/dlls/kernel32/process.c +++ b/dlls/kernel32/process.c @@ -2137,7 +2137,6 @@ BOOL WINAPI TerminateProcess( HANDLE handle, DWORD exit_code ) return !status; } - /*********************************************************************** * ExitProcess (KERNEL32.@) * @@ -2149,6 +2148,26 @@ BOOL WINAPI TerminateProcess( HANDLE handle, DWORD exit_code ) * RETURNS * Nothing. */ +#ifdef __i386__ +__ASM_GLOBAL_FUNC( ExitProcess, /* Shrinker depend on this particular ExitProcess implementation */ + "pushl %ebp\n\t" + ".byte 0x8B, 0xEC\n\t" /* movl %esp, %ebp */ + ".byte 0x6A, 0x00\n\t" /* pushl $0 */ + ".byte 0x68, 0x00, 0x00, 0x00, 0x00\n\t" /* pushl $0 - 4 bytes immediate */ + "pushl 8(%ebp)\n\t" + "call " __ASM_NAME("process_ExitProcess") "\n\t" + "leave\n\t" + "ret $4" ) + +void WINAPI process_ExitProcess( DWORD status ) +{ + LdrShutdownProcess(); + NtTerminateProcess(GetCurrentProcess(), status); + exit(status); +} + +#else + void WINAPI ExitProcess( DWORD status ) { LdrShutdownProcess(); @@ -2156,6 +2175,7 @@ void WINAPI ExitProcess( DWORD status ) exit(status); } +#endif /*********************************************************************** * GetExitCodeProcess [KERNEL32.@]
1
0
0
0
Jan-Peter Nilsson : wininet: Fix HTTP_ProcessCookies only processing one cookie.
by Alexandre Julliard
08 Oct '08
08 Oct '08
Module: wine Branch: master Commit: b261836709c31422ffe6b30d369cdbf1704e6217 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b261836709c31422ffe6b30d3…
Author: Jan-Peter Nilsson <peppe(a)bsnet.se> Date: Wed Sep 24 22:42:36 2008 +0200 wininet: Fix HTTP_ProcessCookies only processing one cookie. --- dlls/wininet/http.c | 132 ++++++++++++++++++++++++++------------------------- 1 files changed, 67 insertions(+), 65 deletions(-) diff --git a/dlls/wininet/http.c b/dlls/wininet/http.c index f72082b..0cdbfb3 100644 --- a/dlls/wininet/http.c +++ b/dlls/wininet/http.c @@ -314,82 +314,84 @@ static void HTTP_ProcessCookies( LPWININETHTTPREQW lpwhr ) { static const WCHAR szSet_Cookie[] = { 'S','e','t','-','C','o','o','k','i','e',0 }; int HeaderIndex; + int numCookies = 0; LPHTTPHEADERW setCookieHeader; - HeaderIndex = HTTP_GetCustomHeaderIndex(lpwhr, szSet_Cookie, 0, FALSE); - if (HeaderIndex == -1) - return; - setCookieHeader = &lpwhr->pCustHeaders[HeaderIndex]; - - if (!(lpwhr->hdr.dwFlags & INTERNET_FLAG_NO_COOKIES) && setCookieHeader->lpszValue) + while((HeaderIndex = HTTP_GetCustomHeaderIndex(lpwhr, szSet_Cookie, numCookies, FALSE)) != -1) { - int nPosStart = 0, nPosEnd = 0, len; - static const WCHAR szFmt[] = { 'h','t','t','p',':','/','/','%','s','/',0}; + setCookieHeader = &lpwhr->pCustHeaders[HeaderIndex]; - while (setCookieHeader->lpszValue[nPosEnd] != '\0') + if (!(lpwhr->hdr.dwFlags & INTERNET_FLAG_NO_COOKIES) && setCookieHeader->lpszValue) { - LPWSTR buf_cookie, cookie_name, cookie_data; - LPWSTR buf_url; - LPWSTR domain = NULL; - LPHTTPHEADERW Host; - - int nEqualPos = 0; - while (setCookieHeader->lpszValue[nPosEnd] != ';' && setCookieHeader->lpszValue[nPosEnd] != ',' && - setCookieHeader->lpszValue[nPosEnd] != '\0') - { - nPosEnd++; - } - if (setCookieHeader->lpszValue[nPosEnd] == ';') + int nPosStart = 0, nPosEnd = 0, len; + static const WCHAR szFmt[] = { 'h','t','t','p',':','/','/','%','s','/',0}; + + while (setCookieHeader->lpszValue[nPosEnd] != '\0') { - /* fixme: not case sensitive, strcasestr is gnu only */ - int nDomainPosEnd = 0; - int nDomainPosStart = 0, nDomainLength = 0; - static const WCHAR szDomain[] = {'d','o','m','a','i','n','=',0}; - LPWSTR lpszDomain = strstrW(&setCookieHeader->lpszValue[nPosEnd], szDomain); - if (lpszDomain) - { /* they have specified their own domain, lets use it */ - while (lpszDomain[nDomainPosEnd] != ';' && lpszDomain[nDomainPosEnd] != ',' && - lpszDomain[nDomainPosEnd] != '\0') - { - nDomainPosEnd++; + LPWSTR buf_cookie, cookie_name, cookie_data; + LPWSTR buf_url; + LPWSTR domain = NULL; + LPHTTPHEADERW Host; + + int nEqualPos = 0; + while (setCookieHeader->lpszValue[nPosEnd] != ';' && setCookieHeader->lpszValue[nPosEnd] != ',' && + setCookieHeader->lpszValue[nPosEnd] != '\0') + { + nPosEnd++; + } + if (setCookieHeader->lpszValue[nPosEnd] == ';') + { + /* fixme: not case sensitive, strcasestr is gnu only */ + int nDomainPosEnd = 0; + int nDomainPosStart = 0, nDomainLength = 0; + static const WCHAR szDomain[] = {'d','o','m','a','i','n','=',0}; + LPWSTR lpszDomain = strstrW(&setCookieHeader->lpszValue[nPosEnd], szDomain); + if (lpszDomain) + { /* they have specified their own domain, lets use it */ + while (lpszDomain[nDomainPosEnd] != ';' && lpszDomain[nDomainPosEnd] != ',' && + lpszDomain[nDomainPosEnd] != '\0') + { + nDomainPosEnd++; + } + nDomainPosStart = strlenW(szDomain); + nDomainLength = (nDomainPosEnd - nDomainPosStart) + 1; + domain = HeapAlloc(GetProcessHeap(), 0, (nDomainLength + 1)*sizeof(WCHAR)); + lstrcpynW(domain, &lpszDomain[nDomainPosStart], nDomainLength + 1); } - nDomainPosStart = strlenW(szDomain); - nDomainLength = (nDomainPosEnd - nDomainPosStart) + 1; - domain = HeapAlloc(GetProcessHeap(), 0, (nDomainLength + 1)*sizeof(WCHAR)); - lstrcpynW(domain, &lpszDomain[nDomainPosStart], nDomainLength + 1); } - } - if (setCookieHeader->lpszValue[nPosEnd] == '\0') break; - buf_cookie = HeapAlloc(GetProcessHeap(), 0, ((nPosEnd - nPosStart) + 1)*sizeof(WCHAR)); - lstrcpynW(buf_cookie, &setCookieHeader->lpszValue[nPosStart], (nPosEnd - nPosStart) + 1); - TRACE("%s\n", debugstr_w(buf_cookie)); - while (buf_cookie[nEqualPos] != '=' && buf_cookie[nEqualPos] != '\0') - { - nEqualPos++; - } - if (buf_cookie[nEqualPos] == '\0' || buf_cookie[nEqualPos + 1] == '\0') - { + if (setCookieHeader->lpszValue[nPosEnd] == '\0') break; + buf_cookie = HeapAlloc(GetProcessHeap(), 0, ((nPosEnd - nPosStart) + 1)*sizeof(WCHAR)); + lstrcpynW(buf_cookie, &setCookieHeader->lpszValue[nPosStart], (nPosEnd - nPosStart) + 1); + TRACE("%s\n", debugstr_w(buf_cookie)); + while (buf_cookie[nEqualPos] != '=' && buf_cookie[nEqualPos] != '\0') + { + nEqualPos++; + } + if (buf_cookie[nEqualPos] == '\0' || buf_cookie[nEqualPos + 1] == '\0') + { + HeapFree(GetProcessHeap(), 0, buf_cookie); + break; + } + + cookie_name = HeapAlloc(GetProcessHeap(), 0, (nEqualPos + 1)*sizeof(WCHAR)); + lstrcpynW(cookie_name, buf_cookie, nEqualPos + 1); + cookie_data = &buf_cookie[nEqualPos + 1]; + + Host = HTTP_GetHeader(lpwhr,szHost); + len = lstrlenW((domain ? domain : (Host?Host->lpszValue:NULL))) + + strlenW(lpwhr->lpszPath) + 9; + buf_url = HeapAlloc(GetProcessHeap(), 0, len*sizeof(WCHAR)); + sprintfW(buf_url, szFmt, (domain ? domain : (Host?Host->lpszValue:NULL))); /* FIXME PATH!!! */ + InternetSetCookieW(buf_url, cookie_name, cookie_data); + + HeapFree(GetProcessHeap(), 0, buf_url); HeapFree(GetProcessHeap(), 0, buf_cookie); - break; + HeapFree(GetProcessHeap(), 0, cookie_name); + HeapFree(GetProcessHeap(), 0, domain); + nPosStart = nPosEnd; } - - cookie_name = HeapAlloc(GetProcessHeap(), 0, (nEqualPos + 1)*sizeof(WCHAR)); - lstrcpynW(cookie_name, buf_cookie, nEqualPos + 1); - cookie_data = &buf_cookie[nEqualPos + 1]; - - Host = HTTP_GetHeader(lpwhr,szHost); - len = lstrlenW((domain ? domain : (Host?Host->lpszValue:NULL))) + - strlenW(lpwhr->lpszPath) + 9; - buf_url = HeapAlloc(GetProcessHeap(), 0, len*sizeof(WCHAR)); - sprintfW(buf_url, szFmt, (domain ? domain : (Host?Host->lpszValue:NULL))); /* FIXME PATH!!! */ - InternetSetCookieW(buf_url, cookie_name, cookie_data); - - HeapFree(GetProcessHeap(), 0, buf_url); - HeapFree(GetProcessHeap(), 0, buf_cookie); - HeapFree(GetProcessHeap(), 0, cookie_name); - HeapFree(GetProcessHeap(), 0, domain); - nPosStart = nPosEnd; } + numCookies++; } }
1
0
0
0
Joris Huizer : version/tests: Corrected memset placement.
by Alexandre Julliard
08 Oct '08
08 Oct '08
Module: wine Branch: master Commit: af086800372ad4d6839bedc6baa4ec7c775ef9c4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=af086800372ad4d6839bedc6b…
Author: Joris Huizer <joris_huizer(a)yahoo.com> Date: Tue Oct 7 15:30:11 2008 +0200 version/tests: Corrected memset placement. --- dlls/version/tests/install.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dlls/version/tests/install.c b/dlls/version/tests/install.c index ec40d3e..6fc19bb 100644 --- a/dlls/version/tests/install.c +++ b/dlls/version/tests/install.c @@ -183,23 +183,23 @@ static void test_install_file(void) memset(tmpname,0,sizeof(tmpname)); size = MAX_PATH; rc = VerInstallFileA(0x0, szSrcFileName, NULL, NULL, NULL, NULL, tmpname, &size); - memset(tmpname,0,sizeof(tmpname)); ok (rc == 0x10000 && tmpname[0]==0," expected return 0x10000 and no tempname, got %08x/\'%s\'\n",rc,tmpname); + memset(tmpname,0,sizeof(tmpname)); size = MAX_PATH; rc = VerInstallFileA(0x0, szSrcFileName, szDestFileName, NULL, NULL, NULL, tmpname, &size); - memset(tmpname,0,sizeof(tmpname)); ok (rc == 0x10000 && tmpname[0]==0," expected return 0x10000 and no tempname, got %08x/\'%s\'\n",rc,tmpname); + memset(tmpname,0,sizeof(tmpname)); size = MAX_PATH; rc = VerInstallFileA(0x0, szSrcFileName, szDestFileName, szSrcDir, NULL, NULL, tmpname, &size); - memset(tmpname,0,sizeof(tmpname)); ok (rc == 0x10000 && tmpname[0]==0," expected return 0x10000 and no tempname, got %08x/\'%s\'\n",rc,tmpname); /* Source file does not exist*/ + memset(tmpname,0,sizeof(tmpname)); size = MAX_PATH; rc = VerInstallFileA(0x0, szSrcFileName, szDestFileName, szSrcDir, szDestDir, NULL, tmpname, &size); - memset(tmpname,0,sizeof(tmpname)); ok (rc == 0x10000 && tmpname[0]==0," expected return 0x10000 and no tempname, got %08x/\'%s\'\n",rc,tmpname); + memset(tmpname,0,sizeof(tmpname)); size = MAX_PATH; rc = VerInstallFileA(0x0, szSrcFileName, szDestFileName, szSrcDir, szDestDir, szCurDir, tmpname, &size); ok (rc == 0x10000 && tmpname[0]==0," expected return 0x10000 and no tempname, got %08x/\'%s\'\n",rc,tmpname);
1
0
0
0
Piotr Caban : msxml: Added CDATA related events handling.
by Alexandre Julliard
08 Oct '08
08 Oct '08
Module: wine Branch: master Commit: b84e4789afba7394fd0a925c19ebdd6904ecaa8c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b84e4789afba7394fd0a925c1…
Author: Piotr Caban <piotr.caban(a)gmail.com> Date: Tue Oct 7 22:11:11 2008 +0200 msxml: Added CDATA related events handling. --- dlls/msxml3/saxreader.c | 77 +++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 77 insertions(+), 0 deletions(-) diff --git a/dlls/msxml3/saxreader.c b/dlls/msxml3/saxreader.c index 3e7e332..4a98b4b 100644 --- a/dlls/msxml3/saxreader.c +++ b/dlls/msxml3/saxreader.c @@ -1334,6 +1334,82 @@ static void libxmlFatalError(void *ctx, const char *msg, ...) This->ret = E_FAIL; } +static void libxmlCDataBlock(void *ctx, const xmlChar *value, int len) +{ + saxlocator *This = ctx; + HRESULT hr = S_OK; + xmlChar *beg = (xmlChar*)This->pParserCtxt->input->cur-len; + xmlChar *cur, *end; + int realLen; + BSTR Chars; + BOOL lastEvent = FALSE, change; + + while(memcmp(beg-9, "<![CDATA[", sizeof(char[9]))) beg--; + update_position(This, beg); + + if(This->vbInterface && This->saxreader->vblexicalHandler) + hr = IVBSAXLexicalHandler_startCDATA(This->saxreader->vblexicalHandler); + if(!This->vbInterface && This->saxreader->lexicalHandler) + hr = ISAXLexicalHandler_startCDATA(This->saxreader->lexicalHandler); + + if(FAILED(hr)) + return format_error_message_from_id(This, hr); + + realLen = This->pParserCtxt->input->cur-beg-3; + cur = beg; + end = beg; + + while(1) + { + while(end-beg<realLen && *end!='\r') end++; + if(end-beg==realLen) + { + end--; + lastEvent = TRUE; + } + else if(end-beg==realLen-1 && *end=='\r' && *(end+1)=='\n') + lastEvent = TRUE; + + if(*end == '\r') change = TRUE; + else change = FALSE; + + if(change) *end = '\n'; + + if((This->vbInterface && This->saxreader->vbcontentHandler) || + (!This->vbInterface && This->saxreader->contentHandler)) + { + Chars = bstr_from_xmlCharN(cur, end-cur+1); + if(This->vbInterface) + hr = IVBSAXContentHandler_characters( + This->saxreader->vbcontentHandler, &Chars); + else + hr = ISAXContentHandler_characters( + This->saxreader->contentHandler, + Chars, SysStringLen(Chars)); + SysFreeString(Chars); + } + + if(change) *end = '\r'; + + if(lastEvent) + break; + + This->column += end-cur+2; + end += 2; + cur = end; + } + + if(This->vbInterface && This->saxreader->vblexicalHandler) + hr = IVBSAXLexicalHandler_endCDATA(This->saxreader->vblexicalHandler); + if(!This->vbInterface && This->saxreader->lexicalHandler) + hr = ISAXLexicalHandler_endCDATA(This->saxreader->lexicalHandler); + + if(FAILED(hr)) + format_error_message_from_id(This, hr); + + This->column += 4+end-cur; +} + /*** IVBSAXLocator interface ***/ /*** IUnknown methods ***/ static HRESULT WINAPI ivbsaxlocator_QueryInterface(IVBSAXLocator* iface, REFIID riid, void **ppvObject) @@ -2753,6 +2829,7 @@ HRESULT SAXXMLReader_create(IUnknown *pUnkOuter, LPVOID *ppObj) reader->sax.comment = libxmlComment; reader->sax.error = libxmlFatalError; reader->sax.fatalError = libxmlFatalError; + reader->sax.cdataBlock = libxmlCDataBlock; *ppObj = &reader->lpVBSAXXMLReaderVtbl;
1
0
0
0
Piotr Caban : msxml: Added ISAXLexicalHandler_comment event.
by Alexandre Julliard
08 Oct '08
08 Oct '08
Module: wine Branch: master Commit: db2761a8d6b2c2885df9e32c0738c93b2ac0da25 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=db2761a8d6b2c2885df9e32c0…
Author: Piotr Caban <piotr.caban(a)gmail.com> Date: Tue Oct 7 22:11:04 2008 +0200 msxml: Added ISAXLexicalHandler_comment event. --- dlls/msxml3/saxreader.c | 32 ++++++++++++++++++++++++++++++++ 1 files changed, 32 insertions(+), 0 deletions(-) diff --git a/dlls/msxml3/saxreader.c b/dlls/msxml3/saxreader.c index 94a7e1d..3e7e332 100644 --- a/dlls/msxml3/saxreader.c +++ b/dlls/msxml3/saxreader.c @@ -1260,6 +1260,37 @@ static void libxmlSetDocumentLocator( format_error_message_from_id(This, hr); } +static void libxmlComment(void *ctx, const xmlChar *value) +{ + saxlocator *This = ctx; + BSTR bValue; + HRESULT hr; + xmlChar *beg = (xmlChar*)This->pParserCtxt->input->cur; + + while(memcmp(beg-4, "<!--", sizeof(char[4]))) beg--; + update_position(This, beg); + + if(!This->vbInterface && !This->saxreader->lexicalHandler) return; + if(This->vbInterface && !This->saxreader->vblexicalHandler) return; + + bValue = bstr_from_xmlChar(value); + + if(This->vbInterface) + hr = IVBSAXLexicalHandler_comment( + This->saxreader->vblexicalHandler, &bValue); + else + hr = ISAXLexicalHandler_comment( + This->saxreader->lexicalHandler, + bValue, SysStringLen(bValue)); + + SysFreeString(bValue); + + if(FAILED(hr)) + format_error_message_from_id(This, hr); + + update_position(This, NULL); +} + static void libxmlFatalError(void *ctx, const char *msg, ...) { saxlocator *This = ctx; @@ -2719,6 +2750,7 @@ HRESULT SAXXMLReader_create(IUnknown *pUnkOuter, LPVOID *ppObj) reader->sax.endElementNs = libxmlEndElementNS; reader->sax.characters = libxmlCharacters; reader->sax.setDocumentLocator = libxmlSetDocumentLocator; + reader->sax.comment = libxmlComment; reader->sax.error = libxmlFatalError; reader->sax.fatalError = libxmlFatalError;
1
0
0
0
Piotr Caban : msxml: Fix parsing <.../> elements.
by Alexandre Julliard
08 Oct '08
08 Oct '08
Module: wine Branch: master Commit: 1596a1acbf1bebde490d9f4d8d2d6470119d7a6a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1596a1acbf1bebde490d9f4d8…
Author: Piotr Caban <piotr.caban(a)gmail.com> Date: Tue Oct 7 22:10:56 2008 +0200 msxml: Fix parsing <.../> elements. --- dlls/msxml3/saxreader.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/dlls/msxml3/saxreader.c b/dlls/msxml3/saxreader.c index 72c66b5..94a7e1d 100644 --- a/dlls/msxml3/saxreader.c +++ b/dlls/msxml3/saxreader.c @@ -1040,7 +1040,10 @@ static void libxmlStartElementNS( saxattributes *attr; int index; - update_position(This, (xmlChar*)This->pParserCtxt->input->cur+1); + if(*(This->pParserCtxt->input->cur) == '/') + update_position(This, (xmlChar*)This->pParserCtxt->input->cur+2); + else + update_position(This, (xmlChar*)This->pParserCtxt->input->cur+1); hr = namespacePush(This, nb_namespaces); if(hr==S_OK && ((This->vbInterface && This->saxreader->vbcontentHandler)
1
0
0
0
Piotr Caban : msxml: Rewrite ISAXContentHandler_characters.
by Alexandre Julliard
08 Oct '08
08 Oct '08
Module: wine Branch: master Commit: c801c18ad29a1d0351be94cb0e388c6ee6cc5323 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c801c18ad29a1d0351be94cb0…
Author: Piotr Caban <piotr.caban(a)gmail.com> Date: Tue Oct 7 22:10:43 2008 +0200 msxml: Rewrite ISAXContentHandler_characters. --- dlls/msxml3/saxreader.c | 167 ++++++++++++++++++++++------------------------- 1 files changed, 77 insertions(+), 90 deletions(-) diff --git a/dlls/msxml3/saxreader.c b/dlls/msxml3/saxreader.c index 62058d1..72c66b5 100644 --- a/dlls/msxml3/saxreader.c +++ b/dlls/msxml3/saxreader.c @@ -75,7 +75,9 @@ typedef struct _saxlocator WCHAR *systemId; xmlChar *lastCur; int line; + int realLine; int column; + int realColumn; BOOL vbInterface; int nsStackSize; int nsStackLast; @@ -197,23 +199,6 @@ static BSTR QName_from_xmlChar(const xmlChar *prefix, const xmlChar *name) return bstr; } -BSTR bstr_from_xmlChar_wn(const xmlChar *buf, int len) -{ - DWORD size; - LPWSTR str; - BSTR bstr; - - if(!buf) return NULL; - - size = MultiByteToWideChar(CP_UTF8, 0, (LPCSTR)buf, len, NULL, 0); - str = (LPWSTR)HeapAlloc(GetProcessHeap(), 0, size*sizeof(WCHAR)); - if(!str) return NULL; - MultiByteToWideChar(CP_UTF8, 0, (LPCSTR)buf, len, str, size); - bstr = SysAllocStringLen(str, size); - HeapFree(GetProcessHeap(), 0, str); - return bstr; -} - static void format_error_message_from_id(saxlocator *This, HRESULT hr) { xmlStopParser(This->pParserCtxt); @@ -247,14 +232,21 @@ static void update_position(saxlocator *This, xmlChar *end) if(This->lastCur == NULL) { This->lastCur = (xmlChar*)This->pParserCtxt->input->base; - This->line = 1; - This->column = 1; + This->realLine = 1; + This->realColumn = 1; } else if(This->lastCur < This->pParserCtxt->input->base) { This->lastCur = (xmlChar*)This->pParserCtxt->input->base; - This->line = 1; - This->column = 1; + This->realLine = 1; + This->realColumn = 1; + } + + if(This->pParserCtxt->input->cur<This->lastCur) + { + This->lastCur = (xmlChar*)This->pParserCtxt->input->base; + This->realLine -= 1; + This->realColumn = 1; } if(!end) end = (xmlChar*)This->pParserCtxt->input->cur; @@ -263,18 +255,26 @@ static void update_position(saxlocator *This, xmlChar *end) { if(*(This->lastCur) == '\n') { - This->line++; - This->column = 1; + This->realLine++; + This->realColumn = 1; } - else if(*(This->lastCur) == '\r' && (This->lastCur==This->pParserCtxt->input->end || *(This->lastCur+1)!='\n')) + else if(*(This->lastCur) == '\r' && + (This->lastCur==This->pParserCtxt->input->end || + *(This->lastCur+1)!='\n')) { - This->line++; - This->column = 1; + This->realLine++; + This->realColumn = 1; } - else This->column++; + else This->realColumn++; This->lastCur++; + + /* Count multibyte UTF8 encoded characters once */ + while((*(This->lastCur)&0xC0) == 0x80) This->lastCur++; } + + This->line = This->realLine; + This->column = This->realColumn; } /*** IVBSAXAttributes interface ***/ @@ -1115,9 +1115,11 @@ static void libxmlEndElementNS( xmlChar *end; int nsNr, index; - end = This->lastCur; - while(*end != '<' && *(end+1) != '/') end++; - update_position(This, end+2); + end = (xmlChar*)This->pParserCtxt->input->cur; + if(*(end-1) != '>' || *(end-2) != '/') + while(*(end-2)!='<' && *(end-1)!='/') end--; + + update_position(This, end); nsNr = namespacePop(This); @@ -1165,6 +1167,8 @@ static void libxmlEndElementNS( SysFreeString(Prefix); } } + + update_position(This, NULL); } static void libxmlCharacters( @@ -1172,82 +1176,65 @@ static void libxmlCharacters( const xmlChar *ch, int len) { - BSTR Chars; saxlocator *This = ctx; + BSTR Chars; HRESULT hr; + xmlChar *cur; xmlChar *end; - xmlChar *lastCurCopy; - xmlChar *chEnd; - int columnCopy; - int lineCopy; - - if(*(This->lastCur-1) != '>' && *(This->lastCur-1) != '/') return; + BOOL lastEvent = FALSE; - if(*(This->lastCur-1) != '>') - { - end = (xmlChar*)This->pParserCtxt->input->cur-len; - while(*(end-1) != '>') end--; - update_position(This, end); - } + if((This->vbInterface && !This->saxreader->vbcontentHandler) + || (!This->vbInterface && !This->saxreader->contentHandler)) + return; - chEnd = This->lastCur+len; - while(*chEnd != '<') chEnd++; + cur = (xmlChar*)ch; + if(*(ch-1)=='\r') cur--; + end = cur; - lastCurCopy = This->lastCur; - columnCopy = This->column; - lineCopy = This->line; - end = This->lastCur; + if(ch<This->pParserCtxt->input->base || ch>This->pParserCtxt->input->end) + This->column++; - if((This->vbInterface && This->saxreader->vbcontentHandler) - || (!This->vbInterface && This->saxreader->contentHandler)) + while(1) { - while(This->lastCur < chEnd) + while(end-ch<len && *end!='\r') end++; + if(end-ch==len) { - end = This->lastCur; - while(end < chEnd-1) - { - if(*end == '\r') break; - end++; - } - - Chars = bstr_from_xmlChar_wn(This->lastCur, end-This->lastCur+2); + end--; + lastEvent = TRUE; + } - if(*end == '\r' && *(end+1) == '\n') - { - memmove((WCHAR*)Chars+(end-This->lastCur), - (WCHAR*)Chars+(end-This->lastCur)+1, - (SysStringLen(Chars)-(end-This->lastCur))*sizeof(WCHAR)); - SysReAllocStringLen(&Chars, Chars, SysStringLen(Chars)-1); - } - else if(*end == '\r') Chars[end-This->lastCur] = '\n'; + if(!lastEvent) *end = '\n'; - if(This->vbInterface) - hr = IVBSAXContentHandler_characters( - This->saxreader->vbcontentHandler, &Chars); - else - hr = ISAXContentHandler_characters( - This->saxreader->contentHandler, - Chars, end-This->lastCur+1); + Chars = bstr_from_xmlCharN(cur, end-cur+1); + if(This->vbInterface) + hr = IVBSAXContentHandler_characters( + This->saxreader->vbcontentHandler, &Chars); + else + hr = ISAXContentHandler_characters( + This->saxreader->contentHandler, + Chars, SysStringLen(Chars)); + SysFreeString(Chars); - SysFreeString(Chars); - if(hr != S_OK) - { - format_error_message_from_id(This, hr); - return; - } + This->column += end-cur+1; - if(*(end+1) == '\n') end++; - if(end < chEnd) end++; + if(lastEvent) + break; - This->column += end-This->lastCur; - This->lastCur = end; + *end = '\r'; + end++; + if(*end == '\n') + { + end++; + This->column++; } + cur = end; - This->lastCur = lastCurCopy; - This->column = columnCopy; - This->line = lineCopy; - update_position(This, chEnd); + if(end-ch == len) break; } + + if(ch<This->pParserCtxt->input->base || ch>This->pParserCtxt->input->end) + This->column = This->realColumn + +This->pParserCtxt->input->cur-This->lastCur; } static void libxmlSetDocumentLocator( @@ -1270,7 +1257,7 @@ static void libxmlSetDocumentLocator( format_error_message_from_id(This, hr); } -void libxmlFatalError(void *ctx, const char *msg, ...) +static void libxmlFatalError(void *ctx, const char *msg, ...) { saxlocator *This = ctx; char message[1024];
1
0
0
0
Michael Stefaniuc : shell32/tests: Use FAILED instead of !SUCCEEDED.
by Alexandre Julliard
08 Oct '08
08 Oct '08
Module: wine Branch: master Commit: ca0074e7067f6a21842462a69ca9b0172c65da29 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ca0074e7067f6a21842462a69…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Wed Oct 8 01:32:27 2008 +0200 shell32/tests: Use FAILED instead of !SUCCEEDED. --- dlls/shell32/tests/shelllink.c | 12 ++++++------ dlls/shell32/tests/shlexec.c | 2 +- dlls/shell32/tests/shlfileop.c | 2 +- dlls/shell32/tests/shlfolder.c | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/dlls/shell32/tests/shelllink.c b/dlls/shell32/tests/shelllink.c index 47aa659..83aae3f 100644 --- a/dlls/shell32/tests/shelllink.c +++ b/dlls/shell32/tests/shelllink.c @@ -114,7 +114,7 @@ static void test_get_set(void) r = CoCreateInstance(&CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER, &IID_IShellLinkA, (LPVOID*)&sl); ok(SUCCEEDED(r), "no IID_IShellLinkA (0x%08x)\n", r); - if (!SUCCEEDED(r)) + if (FAILED(r)) return; /* Test Getting / Setting the description */ @@ -329,7 +329,7 @@ void create_lnk_(int line, const WCHAR* path, lnk_desc_t* desc, int save_fails) r = CoCreateInstance(&CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER, &IID_IShellLinkA, (LPVOID*)&sl); lok(SUCCEEDED(r), "no IID_IShellLinkA (0x%08x)\n", r); - if (!SUCCEEDED(r)) + if (FAILED(r)) return; if (desc->description) @@ -404,12 +404,12 @@ static void check_lnk_(int line, const WCHAR* path, lnk_desc_t* desc, int todo) r = CoCreateInstance(&CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER, &IID_IShellLinkA, (LPVOID*)&sl); lok(SUCCEEDED(r), "no IID_IShellLinkA (0x%08x)\n", r); - if (!SUCCEEDED(r)) + if (FAILED(r)) return; r = IShellLinkA_QueryInterface(sl, &IID_IPersistFile, (LPVOID*)&pf); lok(SUCCEEDED(r), "no IID_IPersistFile (0x%08x)\n", r); - if (!SUCCEEDED(r)) + if (FAILED(r)) { IShellLinkA_Release(sl); return; @@ -418,7 +418,7 @@ static void check_lnk_(int line, const WCHAR* path, lnk_desc_t* desc, int todo) r = IPersistFile_Load(pf, path, STGM_READ); lok(SUCCEEDED(r), "load failed (0x%08x)\n", r); IPersistFile_Release(pf); - if (!SUCCEEDED(r)) + if (FAILED(r)) { IShellLinkA_Release(sl); return; @@ -715,7 +715,7 @@ START_TEST(shelllink) r = CoInitialize(NULL); ok(SUCCEEDED(r), "CoInitialize failed (0x%08x)\n", r); - if (!SUCCEEDED(r)) + if (FAILED(r)) return; test_get_set(); diff --git a/dlls/shell32/tests/shlexec.c b/dlls/shell32/tests/shlexec.c index 5eed12b..3c62ac2 100644 --- a/dlls/shell32/tests/shlexec.c +++ b/dlls/shell32/tests/shlexec.c @@ -1505,7 +1505,7 @@ static void init_test(void) r = CoInitialize(NULL); ok(SUCCEEDED(r), "CoInitialize failed (0x%08x)\n", r); - if (!SUCCEEDED(r)) + if (FAILED(r)) exit(1); rc=GetModuleFileName(NULL, argv0, sizeof(argv0)); diff --git a/dlls/shell32/tests/shlfileop.c b/dlls/shell32/tests/shlfileop.c index a4d2559..11cc612 100644 --- a/dlls/shell32/tests/shlfileop.c +++ b/dlls/shell32/tests/shlfileop.c @@ -275,7 +275,7 @@ static void test_get_file_info_iconlist(void) SHFILEINFOW shInfow; hr = SHGetSpecialFolderLocation(NULL, CSIDL_DESKTOP, &pidList); - if (!SUCCEEDED(hr)) { + if (FAILED(hr)) { skip("can't get desktop pidl\n"); return; } diff --git a/dlls/shell32/tests/shlfolder.c b/dlls/shell32/tests/shlfolder.c index a5fff49..30768b0 100644 --- a/dlls/shell32/tests/shlfolder.c +++ b/dlls/shell32/tests/shlfolder.c @@ -1398,7 +1398,7 @@ static void testSHGetFolderPathAndSubDirA(void) skip("SHGetFolderPathA not present!\n"); return; } - if(!SUCCEEDED(pSHGetFolderPathA(NULL, CSIDL_LOCAL_APPDATA, NULL, SHGFP_TYPE_CURRENT, appdata))) + if(FAILED(pSHGetFolderPathA(NULL, CSIDL_LOCAL_APPDATA, NULL, SHGFP_TYPE_CURRENT, appdata))) { skip("SHGetFolderPathA failed for CSIDL_LOCAL_APPDATA!\n"); return;
1
0
0
0
Michael Stefaniuc : oleaut32: Use FAILED instead of !SUCCEEDED.
by Alexandre Julliard
08 Oct '08
08 Oct '08
Module: wine Branch: master Commit: 0c07d3ba37a511d6a64d65dc3624fca86a9adb6d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0c07d3ba37a511d6a64d65dc3…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Wed Oct 8 01:33:15 2008 +0200 oleaut32: Use FAILED instead of !SUCCEEDED. --- dlls/oleaut32/typelib.c | 6 +++--- dlls/oleaut32/typelib2.c | 2 +- dlls/oleaut32/variant.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/dlls/oleaut32/typelib.c b/dlls/oleaut32/typelib.c index 9539bd0..7e069d6 100644 --- a/dlls/oleaut32/typelib.c +++ b/dlls/oleaut32/typelib.c @@ -394,7 +394,7 @@ HRESULT WINAPI LoadTypeLibEx( /* else fall-through */ case REGKIND_REGISTER: - if (!SUCCEEDED(res = RegisterTypeLib(*pptLib, (LPOLESTR)szPath, NULL))) + if (FAILED(res = RegisterTypeLib(*pptLib, (LPOLESTR)szPath, NULL))) { IUnknown_Release(*pptLib); *pptLib = 0; @@ -491,7 +491,7 @@ HRESULT WINAPI RegisterTypeLib( if (ptlib == NULL || szFullPath == NULL) return E_INVALIDARG; - if (!SUCCEEDED(ITypeLib_GetLibAttr(ptlib, &attr))) + if (FAILED(ITypeLib_GetLibAttr(ptlib, &attr))) return E_FAIL; get_typelib_key( &attr->guid, attr->wMajorVerNum, attr->wMinorVerNum, keyName ); @@ -6449,7 +6449,7 @@ static HRESULT WINAPI ITypeInfo_fnGetRefTypeInfo( ref_type->pImpTLInfo->lcid, &pTLib); - if(!SUCCEEDED(result)) { + if(FAILED(result)) { BSTR libnam=SysAllocString(ref_type->pImpTLInfo->name); result=LoadTypeLib(libnam, &pTLib); SysFreeString(libnam); diff --git a/dlls/oleaut32/typelib2.c b/dlls/oleaut32/typelib2.c index cbcd7f0..0d10f53 100644 --- a/dlls/oleaut32/typelib2.c +++ b/dlls/oleaut32/typelib2.c @@ -1349,7 +1349,7 @@ static HRESULT WINAPI ICreateTypeInfo2_fnAddRefTypeInfo( * implementation of ITypeInfo. So we need to do the following... */ res = ITypeInfo_GetContainingTypeLib(pTInfo, &container, &index); - if (!SUCCEEDED(res)) { + if (FAILED(res)) { TRACE("failed to find containing typelib.\n"); return res; } diff --git a/dlls/oleaut32/variant.c b/dlls/oleaut32/variant.c index e96325f..26a19bb 100644 --- a/dlls/oleaut32/variant.c +++ b/dlls/oleaut32/variant.c @@ -5673,14 +5673,14 @@ HRESULT WINAPI VarPow(LPVARIANT left, LPVARIANT right, LPVARIANT result) } hr = VariantChangeType(&dl,left,0,resvt); - if (!SUCCEEDED(hr)) { + if (FAILED(hr)) { ERR("Could not change passed left argument to VT_R8, handle it differently.\n"); hr = E_FAIL; goto end; } hr = VariantChangeType(&dr,right,0,resvt); - if (!SUCCEEDED(hr)) { + if (FAILED(hr)) { ERR("Could not change passed right argument to VT_R8, handle it differently.\n"); hr = E_FAIL; goto end;
1
0
0
0
Michael Stefaniuc : msi: Use the right FAILED/ SUCCEEDED macro instead of negating the opposite.
by Alexandre Julliard
08 Oct '08
08 Oct '08
Module: wine Branch: master Commit: 704ebf280e53aea48b43552e8b376b9138b7d461 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=704ebf280e53aea48b43552e8…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Wed Oct 8 01:33:34 2008 +0200 msi: Use the right FAILED/SUCCEEDED macro instead of negating the opposite. --- dlls/msi/action.c | 4 ++-- dlls/msi/database.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/msi/action.c b/dlls/msi/action.c index d496ddb..7f73eaa 100644 --- a/dlls/msi/action.c +++ b/dlls/msi/action.c @@ -2964,7 +2964,7 @@ static BOOL CALLBACK Typelib_EnumResNameProc( HMODULE hModule, LPCWSTR lpszType, TRACE("trying %s\n", debugstr_w(tl_struct->path)); res = LoadTypeLib(tl_struct->path,&tl_struct->ptLib); - if (!SUCCEEDED(res)) + if (FAILED(res)) { msi_free(tl_struct->path); tl_struct->path = NULL; @@ -3046,7 +3046,7 @@ static UINT ITERATE_RegisterTypeLibraries(MSIRECORD *row, LPVOID param) res = RegisterTypeLib(tl_struct.ptLib,tl_struct.path,help); msi_free(help); - if (!SUCCEEDED(res)) + if (FAILED(res)) ERR("Failed to register type library %s\n", debugstr_w(tl_struct.path)); else diff --git a/dlls/msi/database.c b/dlls/msi/database.c index cf6e5eb..134c6e1 100644 --- a/dlls/msi/database.c +++ b/dlls/msi/database.c @@ -125,7 +125,7 @@ UINT MSI_OpenDatabaseW(LPCWSTR szDBPath, LPCWSTR szPersist, MSIDATABASE **pdb) IStorage_SetClass( stg, &CLSID_MsiDatabase ); /* create the _Tables stream */ r = write_stream_data(stg, szTables, NULL, 0, TRUE); - if (!FAILED(r)) + if (SUCCEEDED(r)) r = msi_init_string_table( stg ); } created = TRUE;
1
0
0
0
← Newer
1
...
90
91
92
93
94
95
96
...
122
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
Results per page:
10
25
50
100
200