[INETCOMM] Sync with Wine Staging 4.18. CORE-16441

This commit is contained in:
Amine Khaldi 2019-11-02 18:35:04 +01:00
parent 908d437d9d
commit ae07dd64af
5 changed files with 18 additions and 21 deletions

View file

@ -34,7 +34,6 @@
#include "mlang.h"
#include "wine/list.h"
#include "wine/unicode.h"
#include "wine/debug.h"
#include "inetcomm_private.h"
@ -415,7 +414,7 @@ static HRESULT WINAPI MimeInternat_ConvertString(IMimeInternational *iface, CODE
break;
case VT_LPWSTR:
cpiSource = CP_UNICODE;
src_len = strlenW(pIn->u.pwszVal) * sizeof(WCHAR);
src_len = lstrlenW(pIn->u.pwszVal) * sizeof(WCHAR);
break;
default:
return E_INVALIDARG;

View file

@ -27,6 +27,7 @@
#include "windef.h"
#include "winbase.h"
#include "wine/winternl.h"
#include "winuser.h"
#include "objbase.h"
#include "ole2.h"
@ -39,7 +40,6 @@
#include "wine/heap.h"
#include "wine/list.h"
#include "wine/debug.h"
#include "wine/unicode.h"
#include "inetcomm_private.h"
@ -768,13 +768,13 @@ static void init_content_encoding(MimeBody *body, header_t *header)
{
const char *encoding = header->value.u.pszVal;
if(!strcasecmp(encoding, "base64"))
if(!_strnicmp(encoding, "base64", -1))
body->encoding = IET_BASE64;
else if(!strcasecmp(encoding, "quoted-printable"))
else if(!_strnicmp(encoding, "quoted-printable", -1))
body->encoding = IET_QP;
else if(!strcasecmp(encoding, "7bit"))
else if(!_strnicmp(encoding, "7bit", -1))
body->encoding = IET_7BIT;
else if(!strcasecmp(encoding, "8bit"))
else if(!_strnicmp(encoding, "8bit", -1))
body->encoding = IET_8BIT;
else
FIXME("unknown encoding %s\n", debugstr_a(encoding));
@ -3715,13 +3715,13 @@ HRESULT WINAPI MimeOleObjectFromMoniker(BINDF bindf, IMoniker *moniker, IBindCtx
TRACE("display name %s\n", debugstr_w(display_name));
len = strlenW(display_name);
len = lstrlenW(display_name);
mhtml_url = heap_alloc((len+1)*sizeof(WCHAR) + sizeof(mhtml_prefixW));
if(!mhtml_url)
return E_OUTOFMEMORY;
memcpy(mhtml_url, mhtml_prefixW, sizeof(mhtml_prefixW));
strcpyW(mhtml_url + ARRAY_SIZE(mhtml_prefixW), display_name);
lstrcpyW(mhtml_url + ARRAY_SIZE(mhtml_prefixW), display_name);
HeapFree(GetProcessHeap(), 0, display_name);
hres = CreateURLMoniker(NULL, mhtml_url, moniker_new);

View file

@ -17,7 +17,6 @@
#include <mimeole.h>
#include <wine/list.h>
#include <wine/unicode.h>
#include <wine/debug.h>
#include "inetcomm_private.h"

View file

@ -26,7 +26,6 @@
#include "wine/debug.h"
#include "wine/heap.h"
#include "wine/unicode.h"
WINE_DEFAULT_DEBUG_CHANNEL(inetcomm);
@ -70,7 +69,7 @@ static inline LPWSTR heap_strdupW(LPCWSTR str)
if(str) {
DWORD size;
size = (strlenW(str)+1)*sizeof(WCHAR);
size = (lstrlenW(str)+1)*sizeof(WCHAR);
ret = heap_alloc(size);
if(ret)
memcpy(ret, str, size);
@ -83,20 +82,20 @@ static HRESULT parse_mhtml_url(const WCHAR *url, mhtml_url_t *r)
{
const WCHAR *p;
if(strncmpiW(url, mhtml_prefixW, ARRAY_SIZE(mhtml_prefixW)))
if(_wcsnicmp(url, mhtml_prefixW, ARRAY_SIZE(mhtml_prefixW)))
return E_FAIL;
r->mhtml = url + ARRAY_SIZE(mhtml_prefixW);
p = strchrW(r->mhtml, '!');
p = wcschr(r->mhtml, '!');
if(p) {
r->mhtml_len = p - r->mhtml;
/* FIXME: We handle '!' and '!x-usc:' in URLs as the same thing. Those should not be the same. */
if(!strncmpW(p, mhtml_separatorW, ARRAY_SIZE(mhtml_separatorW)))
if(!wcsncmp(p, mhtml_separatorW, ARRAY_SIZE(mhtml_separatorW)))
p += ARRAY_SIZE(mhtml_separatorW);
else
p++;
}else {
r->mhtml_len = strlenW(r->mhtml);
r->mhtml_len = lstrlenW(r->mhtml);
}
r->location = p;
@ -142,7 +141,7 @@ static HRESULT on_mime_message_available(MimeHtmlProtocol *protocol, IMimeMessag
if(FAILED(hres))
return report_result(protocol, hres);
found = !strcmpW(protocol->location, value.u.pwszVal);
found = !lstrcmpW(protocol->location, value.u.pwszVal);
PropVariantClear(&value);
}while(!found);
}else {
@ -670,14 +669,14 @@ static HRESULT WINAPI MimeHtmlProtocolInfo_CombineUrl(IInternetProtocolInfo *ifa
if(FAILED(hres))
return hres;
if(!strncmpiW(pwzRelativeUrl, mhtml_prefixW, ARRAY_SIZE(mhtml_prefixW))) {
if(!_wcsnicmp(pwzRelativeUrl, mhtml_prefixW, ARRAY_SIZE(mhtml_prefixW))) {
FIXME("Relative URL is mhtml protocol\n");
return INET_E_USE_DEFAULT_PROTOCOLHANDLER;
}
len += url.mhtml_len;
if(*pwzRelativeUrl)
len += strlenW(pwzRelativeUrl) + ARRAY_SIZE(mhtml_separatorW);
len += lstrlenW(pwzRelativeUrl) + ARRAY_SIZE(mhtml_separatorW);
if(len >= cchResult) {
*pcchResult = 0;
return E_FAIL;
@ -690,7 +689,7 @@ static HRESULT WINAPI MimeHtmlProtocolInfo_CombineUrl(IInternetProtocolInfo *ifa
if(*pwzRelativeUrl) {
memcpy(p, mhtml_separatorW, sizeof(mhtml_separatorW));
p += ARRAY_SIZE(mhtml_separatorW);
strcpyW(p, pwzRelativeUrl);
lstrcpyW(p, pwzRelativeUrl);
}else {
*p = 0;
}

View file

@ -79,7 +79,7 @@ dll/win32/ieframe # Synced to WineStaging-4.18
dll/win32/imaadp32.acm # Synced to WineStaging-4.0
dll/win32/imagehlp # Synced to WineStaging-4.18
dll/win32/imm32 # Synced to WineStaging-4.18
dll/win32/inetcomm # Synced to WineStaging-4.0
dll/win32/inetcomm # Synced to WineStaging-4.18
dll/win32/inetmib1 # Synced to WineStaging-3.17
dll/win32/initpki # Synced to WineStaging-3.3
dll/win32/inseng # Synced to WineStaging-3.3