atl: Build with msvcrt.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alexandre Julliard 2019-05-27 15:51:13 +02:00
parent de34d2b966
commit aeab4af7dd
10 changed files with 37 additions and 32 deletions

View File

@ -3,6 +3,8 @@ IMPORTLIB = atl
IMPORTS = uuid oleaut32 ole32 user32 gdi32 advapi32 shlwapi
EXTRADEFS = -D_ATL_VER=_ATL_VER_30
EXTRADLLFLAGS = -mno-cygwin
C_SRCS = \
atl.c \
atl30.c \

View File

@ -24,7 +24,6 @@
#include "wine/debug.h"
#include "wine/heap.h"
#include "wine/unicode.h"
WINE_DEFAULT_DEBUG_CHANNEL(atl);
@ -347,7 +346,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;

View File

@ -29,7 +29,6 @@
#include "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, ARRAY_SIZE(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;
}

View File

@ -37,7 +37,6 @@
#include "atlwin.h"
#include "shlwapi.h"
#include "wine/unicode.h"
WINE_DEFAULT_DEBUG_CHANNEL(atl);
@ -1022,7 +1021,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;
@ -1210,16 +1209,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;
@ -1230,16 +1229,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);
@ -1262,14 +1261,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);

View File

@ -21,7 +21,6 @@
#include "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
&& !strncmpiW(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;

View File

@ -4,6 +4,8 @@ IMPORTS = uuid ole32 oleaut32 user32 gdi32 advapi32 shlwapi
EXTRADEFS = -D_ATL_VER=_ATL_VER_100
PARENTSRC = ../atl
EXTRADLLFLAGS = -mno-cygwin
C_SRCS = \
atl.c \
atl_ax.c \

View File

@ -3,6 +3,8 @@ IMPORTS = oleaut32 ole32 user32 gdi32 advapi32 uuid shlwapi
EXTRADEFS = -D_ATL_VER=_ATL_VER_110
PARENTSRC = ../atl
EXTRADLLFLAGS = -mno-cygwin
C_SRCS = \
atl.c \
atl_ax.c \

View File

@ -4,6 +4,8 @@ IMPORTS = oleaut32 user32 ole32 gdi32 advapi32 uuid shlwapi
EXTRADEFS = -D_ATL_VER=_ATL_VER_80
PARENTSRC = ../atl
EXTRADLLFLAGS = -mno-cygwin
C_SRCS = \
atl.c \
atl80.c \

View File

@ -28,7 +28,6 @@
#include "atlbase.h"
#include "wine/debug.h"
#include "wine/unicode.h"
WINE_DEFAULT_DEBUG_CHANNEL(atl);

View File

@ -3,6 +3,8 @@ IMPORTS = oleaut32 user32 ole32 gdi32 advapi32 uuid shlwapi
EXTRADEFS = -D_ATL_VER=_ATL_VER_90
PARENTSRC = ../atl
EXTRADLLFLAGS = -mno-cygwin
C_SRCS = \
atl.c \
atl_ax.c \