mirror of
https://github.com/reactos/reactos.git
synced 2024-12-31 19:42:51 +00:00
[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. svn path=/trunk/; revision=73976
This commit is contained in:
parent
12d266bcf7
commit
7b6b59705a
4 changed files with 10 additions and 32 deletions
|
@ -54,32 +54,19 @@ static inline LPDATABLOCK_HEADER NextItem(LPDBLIST lpList)
|
|||
* 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 @@ WINAPI SHAddDataBlock(LPDBLIST* lppList, const DATABLOCK_HEADER *lpNewItem)
|
|||
lpInsertAt = NextItem(lpInsertAt);
|
||||
lpInsertAt->cbSize = 0;
|
||||
|
||||
#ifdef __REACTOS__
|
||||
return TRUE;
|
||||
#endif
|
||||
}
|
||||
#ifndef __REACTOS__
|
||||
return S_OK;
|
||||
#else
|
||||
return FALSE;
|
||||
#endif
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
|
@ -362,11 +343,7 @@ VOID WINAPI SHFreeDataBlockList(LPDBLIST lpList)
|
|||
*/
|
||||
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;
|
||||
|
|
|
@ -53,10 +53,8 @@ static HRESULT WINAPI IStream_fnQueryInterface(IStream *iface, REFIID riid, LPVO
|
|||
|
||||
*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)
|
||||
{
|
||||
|
|
|
@ -123,7 +123,7 @@ static DWORD get_scheme_code(LPCWSTR scheme, DWORD scheme_len)
|
|||
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -357,6 +357,9 @@ HRESULT WINAPI UrlCanonicalizeW(LPCWSTR pszUrl, LPWSTR pszCanonicalized,
|
|||
dwFlags |= URL_ESCAPE_UNSAFE;
|
||||
state = 5;
|
||||
is_file_url = TRUE;
|
||||
} else if(url[0] == '/') {
|
||||
state = 5;
|
||||
is_file_url = TRUE;
|
||||
}
|
||||
|
||||
while (*wk1) {
|
||||
|
@ -1074,7 +1077,7 @@ HRESULT WINAPI UrlEscapeW(
|
|||
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 |
|
||||
|
|
|
@ -174,7 +174,7 @@ reactos/dll/win32/shdoclc # Synced to WineStaging-1.9.11
|
|||
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
|
||||
|
|
Loading…
Reference in a new issue