mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
[ATL] Sync with Wine Staging 4.18. CORE-16441
This commit is contained in:
parent
14d97256f4
commit
51373fdd86
5 changed files with 28 additions and 32 deletions
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue