https://git.reactos.org/?p=reactos.git;a=commitdiff;h=51373fdd8680f09c79a4a…
commit 51373fdd8680f09c79a4a3cd317ad897136f9de5
Author: Amine Khaldi <amine.khaldi(a)reactos.org>
AuthorDate: Sat Oct 26 13:08:57 2019 +0100
Commit: Amine Khaldi <amine.khaldi(a)reactos.org>
CommitDate: Sat Oct 26 13:08:57 2019 +0100
[ATL] Sync with Wine Staging 4.18. CORE-16441
---
dll/win32/atl/atl.c | 3 +--
dll/win32/atl/atl30.c | 5 ++---
dll/win32/atl/atl_ax.c | 25 ++++++++++++-------------
dll/win32/atl/registrar.c | 25 ++++++++++++-------------
media/doc/README.WINE | 2 +-
5 files changed, 28 insertions(+), 32 deletions(-)
diff --git a/dll/win32/atl/atl.c b/dll/win32/atl/atl.c
index 4acee5de3c1..6461d69fc33 100644
--- a/dll/win32/atl/atl.c
+++ b/dll/win32/atl/atl.c
@@ -24,7 +24,6 @@
#include "wine/debug.h"
#include "wine/heap.h"
-#include "wine/unicode.h"
#ifdef __REACTOS__
#include <wingdi.h>
@@ -351,7 +350,7 @@ HRESULT WINAPI AtlLoadTypeLib(HINSTANCE inst, LPCOLESTR lpszIndex,
TRACE("(%p %s %p %p)\n", inst, debugstr_w(lpszIndex), pbstrPath,
ppTypeLib);
- index_len = lpszIndex ? strlenW(lpszIndex) : 0;
+ index_len = lpszIndex ? lstrlenW(lpszIndex) : 0;
path = heap_alloc((MAX_PATH+index_len)*sizeof(WCHAR) + sizeof(tlb_extW));
if(!path)
return E_OUTOFMEMORY;
diff --git a/dll/win32/atl/atl30.c b/dll/win32/atl/atl30.c
index dcdddd96326..06504d09940 100644
--- a/dll/win32/atl/atl30.c
+++ b/dll/win32/atl/atl30.c
@@ -29,7 +29,6 @@
#include "wine/atlwin.h"
#include "wine/debug.h"
-#include "wine/unicode.h"
WINE_DEFAULT_DEBUG_CHANNEL(atl);
@@ -314,7 +313,7 @@ ATOM WINAPI AtlModuleRegisterWndClassInfoA(_ATL_MODULEA *pm,
_ATL_WNDCLASSINFOA
if (!wci->m_wc.lpszClassName)
{
- snprintf(wci->m_szAutoName, sizeof(wci->m_szAutoName),
"ATL%08lx", (UINT_PTR)wci);
+ sprintf(wci->m_szAutoName, "ATL%08lx", (UINT_PTR)wci);
TRACE("auto-generated class name %s\n", wci->m_szAutoName);
wci->m_wc.lpszClassName = wci->m_szAutoName;
}
@@ -374,7 +373,7 @@ ATOM WINAPI AtlModuleRegisterWndClassInfoW(_ATL_MODULEW *pm,
_ATL_WNDCLASSINFOW
if (!wci->m_wc.lpszClassName)
{
static const WCHAR szFormat[] =
{'A','T','L','%','0','8','l','x',0};
- snprintfW(wci->m_szAutoName, ARRAY_SIZE(wci->m_szAutoName), szFormat,
(UINT_PTR)wci);
+ swprintf(wci->m_szAutoName, szFormat, (UINT_PTR)wci);
TRACE("auto-generated class name %s\n",
debugstr_w(wci->m_szAutoName));
wci->m_wc.lpszClassName = wci->m_szAutoName;
}
diff --git a/dll/win32/atl/atl_ax.c b/dll/win32/atl/atl_ax.c
index ef81d4d8510..eabf8942a9c 100644
--- a/dll/win32/atl/atl_ax.c
+++ b/dll/win32/atl/atl_ax.c
@@ -38,7 +38,6 @@
#include "wine/atlwin.h"
#include "shlwapi.h"
-#include "wine/unicode.h"
WINE_DEFAULT_DEBUG_CHANNEL(atl);
@@ -1023,7 +1022,7 @@ static enum content get_content_type(LPCOLESTR name, CLSID
*control_id)
return IsURL;
}
- if (!strncmpiW(name, mshtml_prefixW, 7))
+ if (!_wcsnicmp(name, mshtml_prefixW, 7))
{
FIXME("mshtml prefix not implemented\n");
*control_id = CLSID_WebBrowser;
@@ -1211,16 +1210,16 @@ static LPDLGTEMPLATEW AX_ConvertDialogTemplate(LPCDLGTEMPLATEW
src_tmpl)
if ( GET_WORD(src) == 0xFFFF ) /* menu */
src += 2;
else
- src += strlenW(src) + 1;
+ src += lstrlenW(src) + 1;
if ( GET_WORD(src) == 0xFFFF ) /* class */
src += 2;
else
- src += strlenW(src) + 1;
- src += strlenW(src) + 1; /* title */
+ src += lstrlenW(src) + 1;
+ src += lstrlenW(src) + 1; /* title */
if ( style & (DS_SETFONT | DS_SHELLFONT) )
{
src += 3;
- src += strlenW(src) + 1;
+ src += lstrlenW(src) + 1;
}
} else {
ext = FALSE;
@@ -1231,16 +1230,16 @@ static LPDLGTEMPLATEW AX_ConvertDialogTemplate(LPCDLGTEMPLATEW
src_tmpl)
if ( GET_WORD(src) == 0xFFFF ) /* menu */
src += 2;
else
- src += strlenW(src) + 1;
+ src += lstrlenW(src) + 1;
if ( GET_WORD(src) == 0xFFFF ) /* class */
src += 2;
else
- src += strlenW(src) + 1;
- src += strlenW(src) + 1; /* title */
+ src += lstrlenW(src) + 1;
+ src += lstrlenW(src) + 1; /* title */
if ( style & DS_SETFONT )
{
src++;
- src += strlenW(src) + 1;
+ src += lstrlenW(src) + 1;
}
}
PUT_BLOCK(tmp, src-tmp);
@@ -1263,14 +1262,14 @@ static LPDLGTEMPLATEW AX_ConvertDialogTemplate(LPCDLGTEMPLATEW
src_tmpl)
src += 2;
} else
{
- src += strlenW(src) + 1;
+ src += lstrlenW(src) + 1;
}
- src += strlenW(src) + 1; /* title */
+ src += lstrlenW(src) + 1; /* title */
if ( GET_WORD(tmp) == '{' ) /* all this mess created because of this line
*/
{
static const WCHAR AtlAxWin[] =
{'A','t','l','A','x','W','i','n',
0};
PUT_BLOCK(AtlAxWin, ARRAY_SIZE(AtlAxWin));
- PUT_BLOCK(tmp, strlenW(tmp)+1);
+ PUT_BLOCK(tmp, lstrlenW(tmp)+1);
} else
PUT_BLOCK(tmp, src-tmp);
diff --git a/dll/win32/atl/registrar.c b/dll/win32/atl/registrar.c
index d96bd340860..c7bfc2b1234 100644
--- a/dll/win32/atl/registrar.c
+++ b/dll/win32/atl/registrar.c
@@ -21,7 +21,6 @@
#include "wine/atlbase.h"
#include "wine/debug.h"
-#include "wine/unicode.h"
WINE_DEFAULT_DEBUG_CHANNEL(atl);
@@ -107,7 +106,7 @@ static HRESULT get_word(LPCOLESTR *str, strbuf *buf)
buf->len = 0;
buf->str[0] = '\0';
- while(isspaceW(*iter2))
+ while(iswspace(*iter2))
iter2++;
iter = iter2;
if(!*iter) {
@@ -119,7 +118,7 @@ static HRESULT get_word(LPCOLESTR *str, strbuf *buf)
strbuf_write(iter++, buf, 1);
}else if(*iter == '\'') {
iter2 = ++iter;
- iter = strchrW(iter, '\'');
+ iter = wcschr(iter, '\'');
if(!iter) {
WARN("Unexpected end of script\n");
*str = iter;
@@ -128,12 +127,12 @@ static HRESULT get_word(LPCOLESTR *str, strbuf *buf)
strbuf_write(iter2, buf, iter-iter2);
iter++;
}else {
- while(*iter && !isspaceW(*iter))
+ while(*iter && !iswspace(*iter))
iter++;
strbuf_write(iter2, buf, iter-iter2);
}
- while(isspaceW(*iter))
+ while(iswspace(*iter))
iter++;
*str = iter;
return S_OK;
@@ -145,14 +144,14 @@ static HRESULT do_preprocess(const Registrar *This, LPCOLESTR data,
strbuf *buf)
rep_list *rep_iter;
static const WCHAR wstr[] = {'%',0};
- iter = strchrW(data, '%');
+ iter = wcschr(data, '%');
while(iter) {
strbuf_write(iter2, buf, iter-iter2);
iter2 = ++iter;
if(!*iter2)
return DISP_E_EXCEPTION;
- iter = strchrW(iter2, '%');
+ iter = wcschr(iter2, '%');
if(!iter)
return DISP_E_EXCEPTION;
@@ -161,7 +160,7 @@ static HRESULT do_preprocess(const Registrar *This, LPCOLESTR data,
strbuf *buf)
}else {
for(rep_iter = This->rep; rep_iter; rep_iter = rep_iter->next) {
if(rep_iter->key_len == iter-iter2
- && !memicmpW(iter2, rep_iter->key,
rep_iter->key_len))
+ && !_wcsnicmp(iter2, rep_iter->key,
rep_iter->key_len))
break;
}
if(!rep_iter) {
@@ -173,7 +172,7 @@ static HRESULT do_preprocess(const Registrar *This, LPCOLESTR data,
strbuf *buf)
}
iter2 = ++iter;
- iter = strchrW(iter, '%');
+ iter = wcschr(iter, '%');
}
strbuf_write(iter2, buf, -1);
@@ -280,7 +279,7 @@ static HRESULT do_process_key(LPCOLESTR *pstr, HKEY parent_key, strbuf
*buf, BOO
hres = get_word(&iter, buf);
if(FAILED(hres))
break;
- dw = atoiW(buf->str);
+ dw = wcstol(buf->str, NULL, 10);
lres = RegSetValueExW(hkey, name.len ? name.str : NULL, 0,
REG_DWORD,
(PBYTE)&dw, sizeof(dw));
if(lres != ERROR_SUCCESS) {
@@ -305,14 +304,14 @@ static HRESULT do_process_key(LPCOLESTR *pstr, HKEY parent_key,
strbuf *buf, BOO
}
for(i = 0; i < count && buf->str[2*i]; i++) {
WCHAR digits[3];
- if(!isxdigitW(buf->str[2*i]) || !isxdigitW(buf->str[2*i +
1])) {
+ if(!iswxdigit(buf->str[2*i]) || !iswxdigit(buf->str[2*i +
1])) {
hres = E_FAIL;
break;
}
digits[0] = buf->str[2*i];
digits[1] = buf->str[2*i + 1];
digits[2] = 0;
- bytes[i] = (BYTE) strtoulW(digits, NULL, 16);
+ bytes[i] = (BYTE) wcstoul(digits, NULL, 16);
}
if(SUCCEEDED(hres)) {
lres = RegSetValueExW(hkey, name.len ? name.str : NULL, 0,
REG_BINARY,
@@ -344,7 +343,7 @@ static HRESULT do_process_key(LPCOLESTR *pstr, HKEY parent_key, strbuf
*buf, BOO
break;
}
- if(key_type != IS_VAL && key_type != DO_DELETE && *iter ==
'{' && isspaceW(iter[1])) {
+ if(key_type != IS_VAL && key_type != DO_DELETE && *iter ==
'{' && iswspace(iter[1])) {
hres = get_word(&iter, buf);
if(FAILED(hres))
break;
diff --git a/media/doc/README.WINE b/media/doc/README.WINE
index 1f4ff18efaf..aaf193814b9 100644
--- a/media/doc/README.WINE
+++ b/media/doc/README.WINE
@@ -46,7 +46,7 @@ dll/directx/wine/wined3d # Synced to WineStaging-3.3
dll/win32/activeds # Synced to WineStaging-4.18
dll/win32/actxprxy # Synced to WineStaging-3.3
dll/win32/advpack # Synced to WineStaging-4.18
-dll/win32/atl # Synced to WineStaging-4.0
+dll/win32/atl # Synced to WineStaging-4.18
dll/win32/atl80 # Synced to WineStaging-3.3
dll/win32/atl100 # Synced to WineStaging-3.3
dll/win32/avifil32 # Synced to WineStaging-4.0