Author: akhaldi
Date: Sun Feb 26 19:40:16 2017
New Revision: 73976
URL:
http://svn.reactos.org/svn/reactos?rev=73976&view=rev
Log:
[SHLWAPI] Sync with Wine Staging 2.2. CORE-12823
36b45a3 shlwapi: Fix the return value of SHAddDataBlock
437123b shlwapi: Avoid 'else if' for IStream_fnQueryInterface.
101edb1 shlwapi: Changed UrlEscapeW error paths and add tests.
4eac6e8 shlwapi: Remove dot segments for URLs starting with /.
6cbcc76 shlwapi: Make ParseURL case-insensitive.
Modified:
trunk/reactos/dll/win32/shlwapi/clist.c
trunk/reactos/dll/win32/shlwapi/regstream.c
trunk/reactos/dll/win32/shlwapi/url.c
trunk/reactos/media/doc/README.WINE
Modified: trunk/reactos/dll/win32/shlwapi/clist.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shlwapi/clist.c?…
==============================================================================
--- trunk/reactos/dll/win32/shlwapi/clist.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shlwapi/clist.c [iso-8859-1] Sun Feb 26 19:40:16 2017
@@ -54,32 +54,19 @@
* the call returns S_OK but does not actually add the element.
* See SHWriteDataBlockList.
*/
-#ifndef __REACTOS__
-HRESULT
-#else
-BOOL
-#endif
-WINAPI SHAddDataBlock(LPDBLIST* lppList, const DATABLOCK_HEADER *lpNewItem)
+BOOL WINAPI SHAddDataBlock(LPDBLIST* lppList, const DATABLOCK_HEADER *lpNewItem)
{
LPDATABLOCK_HEADER lpInsertAt = NULL;
ULONG ulSize;
TRACE("(%p,%p)\n", lppList, lpNewItem);
- if(!lppList || !lpNewItem )
-#ifndef __REACTOS__
- return E_INVALIDARG;
-#else
+ if(!lppList || !lpNewItem)
return FALSE;
-#endif
if (lpNewItem->cbSize < sizeof(DATABLOCK_HEADER) ||
lpNewItem->dwSignature == CLIST_ID_CONTAINER)
-#ifndef __REACTOS__
- return S_OK;
-#else
return FALSE;
-#endif
ulSize = lpNewItem->cbSize;
@@ -136,15 +123,9 @@
lpInsertAt = NextItem(lpInsertAt);
lpInsertAt->cbSize = 0;
-#ifdef __REACTOS__
return TRUE;
-#endif
- }
-#ifndef __REACTOS__
- return S_OK;
-#else
+ }
return FALSE;
-#endif
}
/*************************************************************************
@@ -362,11 +343,7 @@
*/
BOOL WINAPI SHRemoveDataBlock(LPDBLIST* lppList, DWORD dwSignature)
{
-#ifndef __REACTOS__
- LPDATABLOCK_HEADER lpList = 0;
-#else
LPDATABLOCK_HEADER lpList = NULL;
-#endif
LPDATABLOCK_HEADER lpItem = NULL;
LPDATABLOCK_HEADER lpNext;
ULONG ulNewSize;
Modified: trunk/reactos/dll/win32/shlwapi/regstream.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shlwapi/regstrea…
==============================================================================
--- trunk/reactos/dll/win32/shlwapi/regstream.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shlwapi/regstream.c [iso-8859-1] Sun Feb 26 19:40:16 2017
@@ -53,10 +53,8 @@
*ppvObj = NULL;
- if(IsEqualIID(riid, &IID_IUnknown)) /*IUnknown*/
- *ppvObj = This;
- else if(IsEqualIID(riid, &IID_IStream)) /*IStream*/
- *ppvObj = This;
+ if(IsEqualIID(riid, &IID_IUnknown) || IsEqualIID(riid, &IID_IStream))
+ *ppvObj = &This->IStream_iface;
if(*ppvObj)
{
Modified: trunk/reactos/dll/win32/shlwapi/url.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shlwapi/url.c?re…
==============================================================================
--- trunk/reactos/dll/win32/shlwapi/url.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shlwapi/url.c [iso-8859-1] Sun Feb 26 19:40:16 2017
@@ -123,7 +123,7 @@
for(i=0; i < sizeof(shlwapi_schemes)/sizeof(shlwapi_schemes[0]); i++) {
if(scheme_len == strlenW(shlwapi_schemes[i].scheme_name)
- && !memcmp(scheme, shlwapi_schemes[i].scheme_name,
scheme_len*sizeof(WCHAR)))
+ && !memicmpW(scheme, shlwapi_schemes[i].scheme_name, scheme_len))
return shlwapi_schemes[i].scheme_number;
}
@@ -355,6 +355,9 @@
}
else
dwFlags |= URL_ESCAPE_UNSAFE;
+ state = 5;
+ is_file_url = TRUE;
+ } else if(url[0] == '/') {
state = 5;
is_file_url = TRUE;
}
@@ -1074,7 +1077,7 @@
TRACE("(%p(%s) %p %p 0x%08x)\n", pszUrl, debugstr_w(pszUrl),
pszEscaped, pcchEscaped, dwFlags);
- if(!pszUrl || !pcchEscaped)
+ if(!pszUrl || !pcchEscaped || !pszEscaped || *pcchEscaped == 0)
return E_INVALIDARG;
if(dwFlags & ~(URL_ESCAPE_SPACES_ONLY |
Modified: trunk/reactos/media/doc/README.WINE
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
==============================================================================
--- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original)
+++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Sun Feb 26 19:40:16 2017
@@ -174,7 +174,7 @@
reactos/dll/win32/shdocvw # Synced to WineStaging-2.2
reactos/dll/win32/shell32 # Forked at Wine-20071011
reactos/dll/win32/shfolder # Synced to WineStaging-1.9.11
-reactos/dll/win32/shlwapi # Synced to WineStaging-1.9.23
+reactos/dll/win32/shlwapi # Synced to WineStaging-2.2
reactos/dll/win32/slbcsp # Synced to WineStaging-1.9.11
reactos/dll/win32/snmpapi # Synced to WineStaging-1.9.11
reactos/dll/win32/softpub # Synced to WineStaging-1.9.11