Commit 3911e669 authored by Alexandre Julliard's avatar Alexandre Julliard

vbscript: Build with msvcrt.

parent 21a19fb4
MODULE = vbscript.dll
IMPORTS = oleaut32 ole32 user32
EXTRADLLFLAGS = -mno-cygwin
C_SRCS = \
compile.c \
global.c \
......
......@@ -136,7 +136,7 @@ static WCHAR *compiler_alloc_string(vbscode_t *vbscode, const WCHAR *str)
size_t size;
WCHAR *ret;
size = (strlenW(str)+1)*sizeof(WCHAR);
size = (lstrlenW(str)+1)*sizeof(WCHAR);
ret = compiler_alloc(vbscode, size);
if(ret)
memcpy(ret, str, size);
......@@ -380,7 +380,7 @@ static expression_t *lookup_const_decls(compile_ctx_t *ctx, const WCHAR *name, B
const_decl_t *decl;
for(decl = ctx->const_decls; decl; decl = decl->next) {
if(!strcmpiW(decl->name, name))
if(!wcsicmp(decl->name, name))
return decl->value_expr;
}
......@@ -388,7 +388,7 @@ static expression_t *lookup_const_decls(compile_ctx_t *ctx, const WCHAR *name, B
return NULL;
for(decl = ctx->global_consts; decl; decl = decl->next) {
if(!strcmpiW(decl->name, name))
if(!wcsicmp(decl->name, name))
return decl->value_expr;
}
......@@ -994,7 +994,7 @@ static BOOL lookup_dim_decls(compile_ctx_t *ctx, const WCHAR *name)
dim_decl_t *dim_decl;
for(dim_decl = ctx->dim_decls; dim_decl; dim_decl = dim_decl->next) {
if(!strcmpiW(dim_decl->name, name))
if(!wcsicmp(dim_decl->name, name))
return TRUE;
}
......@@ -1006,7 +1006,7 @@ static BOOL lookup_args_name(compile_ctx_t *ctx, const WCHAR *name)
unsigned i;
for(i = 0; i < ctx->func->arg_cnt; i++) {
if(!strcmpiW(ctx->func->args[i].name, name))
if(!wcsicmp(ctx->func->args[i].name, name))
return TRUE;
}
......@@ -1444,7 +1444,7 @@ static BOOL lookup_funcs_name(compile_ctx_t *ctx, const WCHAR *name)
function_t *iter;
for(iter = ctx->funcs; iter; iter = iter->next) {
if(!strcmpiW(iter->name, name))
if(!wcsicmp(iter->name, name))
return TRUE;
}
......@@ -1511,7 +1511,7 @@ static BOOL lookup_class_name(compile_ctx_t *ctx, const WCHAR *name)
class_desc_t *iter;
for(iter = ctx->classes; iter; iter = iter->next) {
if(!strcmpiW(iter->name, name))
if(!wcsicmp(iter->name, name))
return TRUE;
}
......@@ -1563,7 +1563,7 @@ static BOOL lookup_class_funcs(class_desc_t *class_desc, const WCHAR *name)
unsigned i;
for(i=0; i < class_desc->func_cnt; i++) {
if(class_desc->funcs[i].name && !strcmpiW(class_desc->funcs[i].name, name))
if(class_desc->funcs[i].name && !wcsicmp(class_desc->funcs[i].name, name))
return TRUE;
}
......@@ -1619,14 +1619,14 @@ static HRESULT compile_class(compile_ctx_t *ctx, class_decl_t *class_decl)
}
}
if(!strcmpiW(class_initializeW, func_decl->name)) {
if(!wcsicmp(class_initializeW, func_decl->name)) {
if(func_decl->type != FUNC_SUB) {
FIXME("class initializer is not sub\n");
return E_FAIL;
}
class_desc->class_initialize_id = i;
}else if(!strcmpiW(class_terminateW, func_decl->name)) {
}else if(!wcsicmp(class_terminateW, func_decl->name)) {
if(func_decl->type != FUNC_SUB) {
FIXME("class terminator is not sub\n");
return E_FAIL;
......@@ -1690,17 +1690,17 @@ static BOOL lookup_script_identifier(script_ctx_t *script, const WCHAR *identifi
function_t *func;
for(var = script->global_vars; var; var = var->next) {
if(!strcmpiW(var->name, identifier))
if(!wcsicmp(var->name, identifier))
return TRUE;
}
for(func = script->global_funcs; func; func = func->next) {
if(!strcmpiW(func->name, identifier))
if(!wcsicmp(func->name, identifier))
return TRUE;
}
for(class = script->classes; class; class = class->next) {
if(!strcmpiW(class->name, identifier))
if(!wcsicmp(class->name, identifier))
return TRUE;
}
......
......@@ -329,7 +329,7 @@ static HRESULT show_msgbox(script_ctx_t *ctx, BSTR prompt, unsigned type, BSTR o
if(orig_title && *orig_title) {
WCHAR *ptr;
title = title_buf = heap_alloc(sizeof(vbscriptW) + (strlenW(orig_title)+2)*sizeof(WCHAR));
title = title_buf = heap_alloc(sizeof(vbscriptW) + (lstrlenW(orig_title)+2)*sizeof(WCHAR));
if(!title)
return E_OUTOFMEMORY;
......@@ -338,7 +338,7 @@ static HRESULT show_msgbox(script_ctx_t *ctx, BSTR prompt, unsigned type, BSTR o
*ptr++ = ':';
*ptr++ = ' ';
strcpyW(ptr, orig_title);
lstrcpyW(ptr, orig_title);
}else {
title = vbscriptW;
}
......@@ -1094,7 +1094,7 @@ static HRESULT Global_StrComp(vbdisp_t *This, VARIANT *args, unsigned args_cnt,
return hres;
}
ret = mode ? strcmpiW(left, right) : strcmpW(left, right);
ret = mode ? wcsicmp(left, right) : wcscmp(left, right);
val = ret < 0 ? -1 : (ret > 0 ? 1 : 0);
SysFreeString(left);
......@@ -1123,7 +1123,7 @@ static HRESULT Global_LCase(vbdisp_t *This, VARIANT *arg, unsigned args_cnt, VAR
WCHAR *ptr;
for(ptr = str; *ptr; ptr++)
*ptr = tolowerW(*ptr);
*ptr = towlower(*ptr);
V_VT(res) = VT_BSTR;
V_BSTR(res) = str;
......@@ -1154,7 +1154,7 @@ static HRESULT Global_UCase(vbdisp_t *This, VARIANT *arg, unsigned args_cnt, VAR
WCHAR *ptr;
for(ptr = str; *ptr; ptr++)
*ptr = toupperW(*ptr);
*ptr = towupper(*ptr);
V_VT(res) = VT_BSTR;
V_BSTR(res) = str;
......@@ -1181,7 +1181,7 @@ static HRESULT Global_LTrim(vbdisp_t *This, VARIANT *arg, unsigned args_cnt, VAR
str = conv_str;
}
for(ptr = str; *ptr && isspaceW(*ptr); ptr++);
for(ptr = str; *ptr && iswspace(*ptr); ptr++);
str = SysAllocString(ptr);
SysFreeString(conv_str);
......@@ -1208,7 +1208,7 @@ static HRESULT Global_RTrim(vbdisp_t *This, VARIANT *arg, unsigned args_cnt, VAR
str = conv_str;
}
for(ptr = str+SysStringLen(str); ptr-1 > str && isspaceW(*(ptr-1)); ptr--);
for(ptr = str+SysStringLen(str); ptr-1 > str && iswspace(*(ptr-1)); ptr--);
str = SysAllocStringLen(str, ptr-str);
SysFreeString(conv_str);
......@@ -1235,8 +1235,8 @@ static HRESULT Global_Trim(vbdisp_t *This, VARIANT *arg, unsigned args_cnt, VARI
str = conv_str;
}
for(begin_ptr = str; *begin_ptr && isspaceW(*begin_ptr); begin_ptr++);
for(end_ptr = str+SysStringLen(str); end_ptr-1 > begin_ptr && isspaceW(*(end_ptr-1)); end_ptr--);
for(begin_ptr = str; *begin_ptr && iswspace(*begin_ptr); begin_ptr++);
for(end_ptr = str+SysStringLen(str); end_ptr-1 > begin_ptr && iswspace(*(end_ptr-1)); end_ptr--);
str = SysAllocStringLen(begin_ptr, end_ptr-begin_ptr);
SysFreeString(conv_str);
......@@ -1342,7 +1342,7 @@ static HRESULT Global_InStr(vbdisp_t *This, VARIANT *args, unsigned args_cnt, VA
if(start < SysStringLen(str1)) {
WCHAR *ptr;
ptr = strstrW(str1+start, str2);
ptr = wcsstr(str1+start, str2);
ret = ptr ? ptr-str1+1 : 0;
}else {
ret = 0;
......
......@@ -83,7 +83,7 @@ typedef struct {
static BOOL lookup_dynamic_vars(dynamic_var_t *var, const WCHAR *name, ref_t *ref)
{
while(var) {
if(!strcmpiW(var->name, name)) {
if(!wcsicmp(var->name, name)) {
ref->type = var->is_const ? REF_CONST : REF_VAR;
ref->u.v = &var->v;
return TRUE;
......@@ -108,14 +108,14 @@ static HRESULT lookup_identifier(exec_ctx_t *ctx, BSTR name, vbdisp_invoke_type_
if(invoke_type == VBDISP_LET
&& (ctx->func->type == FUNC_FUNCTION || ctx->func->type == FUNC_PROPGET || ctx->func->type == FUNC_DEFGET)
&& !strcmpiW(name, ctx->func->name)) {
&& !wcsicmp(name, ctx->func->name)) {
ref->type = REF_VAR;
ref->u.v = &ctx->ret_val;
return S_OK;
}
for(i=0; i < ctx->func->var_cnt; i++) {
if(!strcmpiW(ctx->func->vars[i].name, name)) {
if(!wcsicmp(ctx->func->vars[i].name, name)) {
ref->type = REF_VAR;
ref->u.v = ctx->vars+i;
return TRUE;
......@@ -123,7 +123,7 @@ static HRESULT lookup_identifier(exec_ctx_t *ctx, BSTR name, vbdisp_invoke_type_
}
for(i=0; i < ctx->func->arg_cnt; i++) {
if(!strcmpiW(ctx->func->args[i].name, name)) {
if(!wcsicmp(ctx->func->args[i].name, name)) {
ref->type = REF_VAR;
ref->u.v = ctx->args+i;
return S_OK;
......@@ -137,7 +137,7 @@ static HRESULT lookup_identifier(exec_ctx_t *ctx, BSTR name, vbdisp_invoke_type_
if(ctx->vbthis) {
/* FIXME: Bind such identifier while generating bytecode. */
for(i=0; i < ctx->vbthis->desc->prop_cnt; i++) {
if(!strcmpiW(ctx->vbthis->desc->props[i].name, name)) {
if(!wcsicmp(ctx->vbthis->desc->props[i].name, name)) {
ref->type = REF_VAR;
ref->u.v = ctx->vbthis->props+i;
return S_OK;
......@@ -168,14 +168,14 @@ static HRESULT lookup_identifier(exec_ctx_t *ctx, BSTR name, vbdisp_invoke_type_
return S_OK;
for(func = ctx->script->global_funcs; func; func = func->next) {
if(!strcmpiW(func->name, name)) {
if(!wcsicmp(func->name, name)) {
ref->type = REF_FUNC;
ref->u.f = func;
return S_OK;
}
}
if(!strcmpiW(name, errW)) {
if(!wcsicmp(name, errW)) {
ref->type = REF_OBJ;
ref->u.obj = (IDispatch*)&ctx->script->err_obj->IDispatchEx_iface;
return S_OK;
......@@ -226,7 +226,7 @@ static HRESULT add_dynamic_var(exec_ctx_t *ctx, const WCHAR *name,
if(!new_var)
return E_OUTOFMEMORY;
size = (strlenW(name)+1)*sizeof(WCHAR);
size = (lstrlenW(name)+1)*sizeof(WCHAR);
str = heap_pool_alloc(heap, size);
if(!str)
return E_OUTOFMEMORY;
......@@ -988,7 +988,7 @@ static HRESULT interp_new(exec_ctx_t *ctx)
TRACE("%s\n", debugstr_w(arg));
if(!strcmpiW(arg, regexpW)) {
if(!wcsicmp(arg, regexpW)) {
V_VT(&v) = VT_DISPATCH;
hres = create_regexp(&V_DISPATCH(&v));
if(FAILED(hres))
......@@ -998,7 +998,7 @@ static HRESULT interp_new(exec_ctx_t *ctx)
}
for(class_desc = ctx->script->classes; class_desc; class_desc = class_desc->next) {
if(!strcmpiW(class_desc->name, arg))
if(!wcsicmp(class_desc->name, arg))
break;
}
if(!class_desc) {
......
......@@ -16,11 +16,9 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
#include "wine/port.h"
#include <assert.h>
#include <limits.h>
#include <math.h>
#include "vbscript.h"
#include "parse.h"
......@@ -153,7 +151,7 @@ static const struct {
static inline BOOL is_identifier_char(WCHAR c)
{
return isalnumW(c) || c == '_';
return iswalnum(c) || c == '_';
}
static int check_keyword(parser_ctx_t *ctx, const WCHAR *word, const WCHAR **lval)
......@@ -163,7 +161,7 @@ static int check_keyword(parser_ctx_t *ctx, const WCHAR *word, const WCHAR **lva
WCHAR c;
while(p1 < ctx->end && *p2) {
c = tolowerW(*p1);
c = towlower(*p1);
if(c != *p2)
return c - *p2;
p1++;
......@@ -271,7 +269,7 @@ static int parse_numeric_literal(parser_ctx_t *ctx, void **ret)
if(*ctx->ptr == '0' && !('0' <= ctx->ptr[1] && ctx->ptr[1] <= '9') && ctx->ptr[1] != '.')
return *ctx->ptr++;
while(ctx->ptr < ctx->end && isdigitW(*ctx->ptr)) {
while(ctx->ptr < ctx->end && iswdigit(*ctx->ptr)) {
hlp = d*10 + *(ctx->ptr++) - '0';
if(d>MAXLONGLONG/10 || hlp<0) {
exp++;
......@@ -280,7 +278,7 @@ static int parse_numeric_literal(parser_ctx_t *ctx, void **ret)
else
d = hlp;
}
while(ctx->ptr < ctx->end && isdigitW(*ctx->ptr)) {
while(ctx->ptr < ctx->end && iswdigit(*ctx->ptr)) {
exp++;
ctx->ptr++;
}
......@@ -289,7 +287,7 @@ static int parse_numeric_literal(parser_ctx_t *ctx, void **ret)
use_int = FALSE;
ctx->ptr++;
while(ctx->ptr < ctx->end && isdigitW(*ctx->ptr)) {
while(ctx->ptr < ctx->end && iswdigit(*ctx->ptr)) {
hlp = d*10 + *(ctx->ptr++) - '0';
if(d>MAXLONGLONG/10 || hlp<0)
break;
......@@ -297,7 +295,7 @@ static int parse_numeric_literal(parser_ctx_t *ctx, void **ret)
d = hlp;
exp--;
}
while(ctx->ptr < ctx->end && isdigitW(*ctx->ptr))
while(ctx->ptr < ctx->end && iswdigit(*ctx->ptr))
ctx->ptr++;
}
......@@ -309,7 +307,7 @@ static int parse_numeric_literal(parser_ctx_t *ctx, void **ret)
sign = -1;
}
if(!isdigitW(*ctx->ptr)) {
if(!iswdigit(*ctx->ptr)) {
FIXME("Invalid numeric literal\n");
return 0;
}
......@@ -320,7 +318,7 @@ static int parse_numeric_literal(parser_ctx_t *ctx, void **ret)
e = e*10 + *(ctx->ptr++) - '0';
if(sign == -1 && -e+exp < -(INT_MAX/100)) {
/* The literal will be rounded to 0 anyway. */
while(isdigitW(*ctx->ptr))
while(iswdigit(*ctx->ptr))
ctx->ptr++;
*(double*)ret = 0;
return tDouble;
......@@ -330,7 +328,7 @@ static int parse_numeric_literal(parser_ctx_t *ctx, void **ret)
FIXME("Invalid numeric literal\n");
return 0;
}
} while(isdigitW(*ctx->ptr));
} while(iswdigit(*ctx->ptr));
exp += sign*e;
}
......@@ -391,7 +389,7 @@ static void skip_spaces(parser_ctx_t *ctx)
static int comment_line(parser_ctx_t *ctx)
{
static const WCHAR newlineW[] = {'\n','\r',0};
ctx->ptr = strpbrkW(ctx->ptr, newlineW);
ctx->ptr = wcspbrk(ctx->ptr, newlineW);
if(ctx->ptr)
ctx->ptr++;
else
......@@ -412,7 +410,7 @@ static int parse_next_token(void *lval, parser_ctx_t *ctx)
if('0' <= c && c <= '9')
return parse_numeric_literal(ctx, lval);
if(isalphaW(c)) {
if(iswalpha(c)) {
int ret = check_keywords(ctx, lval);
if(!ret)
return parse_identifier(ctx, lval);
......
......@@ -936,7 +936,7 @@ static class_decl_t *add_class_function(parser_ctx_t *ctx, class_decl_t *class_d
function_decl_t *iter;
for(iter = class_decl->funcs; iter; iter = iter->next) {
if(!strcmpiW(iter->name, decl->name)) {
if(!wcsicmp(iter->name, decl->name)) {
if(decl->type == FUNC_SUB || decl->type == FUNC_FUNCTION) {
FIXME("Redefinition of %s::%s\n", debugstr_w(class_decl->name), debugstr_w(decl->name));
ctx->hres = E_FAIL;
......@@ -1029,7 +1029,7 @@ HRESULT parse_script(parser_ctx_t *ctx, const WCHAR *code, const WCHAR *delimite
static const WCHAR html_delimiterW[] = {'<','/','s','c','r','i','p','t','>',0};
ctx->code = ctx->ptr = code;
ctx->end = ctx->code + strlenW(ctx->code);
ctx->end = ctx->code + lstrlenW(ctx->code);
heap_pool_init(&ctx->heap);
......@@ -1041,7 +1041,7 @@ HRESULT parse_script(parser_ctx_t *ctx, const WCHAR *code, const WCHAR *delimite
ctx->stats = ctx->stats_tail = NULL;
ctx->class_decls = NULL;
ctx->option_explicit = FALSE;
ctx->is_html = delimiter && !strcmpiW(delimiter, html_delimiterW);
ctx->is_html = delimiter && !wcsicmp(delimiter, html_delimiterW);
parser_parse(ctx);
......
......@@ -1142,8 +1142,8 @@ lexHex:
for (i = rangeStart; i <= localMax; i++) {
WCHAR uch, dch;
uch = toupperW(i);
dch = tolowerW(i);
uch = towupper(i);
dch = towlower(i);
if(maxch < uch)
maxch = uch;
if(maxch < dch)
......@@ -1988,7 +1988,7 @@ FlatNIMatcher(REGlobalData *gData, match_state_t *x, const WCHAR *matchChars,
if (length > (size_t)(gData->cpend - x->cp))
return NULL;
for (i = 0; i != length; i++) {
if (toupperW(matchChars[i]) != toupperW(x->cp[i]))
if (towupper(matchChars[i]) != towupper(x->cp[i]))
return NULL;
}
x->cp += length;
......@@ -2035,7 +2035,7 @@ BackrefMatcher(REGlobalData *gData, match_state_t *x, size_t parenIndex)
parenContent = &gData->cpbegin[cap->index];
if (gData->regexp->flags & REG_FOLD) {
for (i = 0; i < len; i++) {
if (toupperW(parenContent[i]) != toupperW(x->cp[i]))
if (towupper(parenContent[i]) != towupper(x->cp[i]))
return NULL;
}
} else {
......@@ -2226,12 +2226,12 @@ ProcessCharSet(REGlobalData *gData, RECharSet *charSet)
continue;
case 's':
for (i = (INT)charSet->length; i >= 0; i--)
if (isspaceW(i))
if (iswspace(i))
AddCharacterToCharSet(charSet, (WCHAR)i);
continue;
case 'S':
for (i = (INT)charSet->length; i >= 0; i--)
if (!isspaceW(i))
if (!iswspace(i))
AddCharacterToCharSet(charSet, (WCHAR)i);
continue;
case 'w':
......@@ -2263,8 +2263,8 @@ ProcessCharSet(REGlobalData *gData, RECharSet *charSet)
WCHAR uch, dch;
AddCharacterToCharSet(charSet, i);
uch = toupperW(i);
dch = tolowerW(i);
uch = towupper(i);
dch = towlower(i);
if (i != uch)
AddCharacterToCharSet(charSet, uch);
if (i != dch)
......@@ -2276,8 +2276,8 @@ ProcessCharSet(REGlobalData *gData, RECharSet *charSet)
inRange = FALSE;
} else {
if (gData->regexp->flags & REG_FOLD) {
AddCharacterToCharSet(charSet, toupperW(thisCh));
AddCharacterToCharSet(charSet, tolowerW(thisCh));
AddCharacterToCharSet(charSet, towupper(thisCh));
AddCharacterToCharSet(charSet, towlower(thisCh));
} else {
AddCharacterToCharSet(charSet, thisCh);
}
......@@ -2411,13 +2411,13 @@ SimpleMatch(REGlobalData *gData, match_state_t *x, REOp op,
}
break;
case REOP_SPACE:
if (x->cp != gData->cpend && isspaceW(*x->cp)) {
if (x->cp != gData->cpend && iswspace(*x->cp)) {
result = x;
result->cp++;
}
break;
case REOP_NONSPACE:
if (x->cp != gData->cpend && !isspaceW(*x->cp)) {
if (x->cp != gData->cpend && !iswspace(*x->cp)) {
result = x;
result->cp++;
}
......@@ -2463,7 +2463,7 @@ SimpleMatch(REGlobalData *gData, match_state_t *x, REOp op,
break;
case REOP_FLAT1i:
matchCh = *pc++;
if (x->cp != gData->cpend && toupperW(*x->cp) == toupperW(matchCh)) {
if (x->cp != gData->cpend && towupper(*x->cp) == towupper(matchCh)) {
result = x;
result->cp++;
}
......@@ -2480,7 +2480,7 @@ SimpleMatch(REGlobalData *gData, match_state_t *x, REOp op,
case REOP_UCFLAT1i:
matchCh = GET_ARG(pc);
pc += ARG_LEN;
if (x->cp != gData->cpend && toupperW(*x->cp) == toupperW(matchCh)) {
if (x->cp != gData->cpend && towupper(*x->cp) == towupper(matchCh)) {
result = x;
result->cp++;
}
......
......@@ -47,7 +47,7 @@ static BOOL get_func_id(vbdisp_t *This, const WCHAR *name, vbdisp_invoke_type_t
continue;
}
if(!strcmpiW(This->desc->funcs[i].name, name)) {
if(!wcsicmp(This->desc->funcs[i].name, name)) {
*id = i;
return TRUE;
}
......@@ -67,7 +67,7 @@ HRESULT vbdisp_get_id(vbdisp_t *This, BSTR name, vbdisp_invoke_type_t invoke_typ
if(!search_private && !This->desc->props[i].is_public)
continue;
if(!strcmpiW(This->desc->props[i].name, name)) {
if(!wcsicmp(This->desc->props[i].name, name)) {
*id = i + This->desc->func_cnt;
return S_OK;
}
......@@ -823,14 +823,14 @@ static HRESULT WINAPI ScriptDisp_GetDispID(IDispatchEx *iface, BSTR bstrName, DW
return E_UNEXPECTED;
for(ident = This->ident_map; ident < This->ident_map+This->ident_map_cnt; ident++) {
if(!strcmpiW(ident->name, bstrName)) {
if(!wcsicmp(ident->name, bstrName)) {
*pid = ident_to_id(This, ident);
return S_OK;
}
}
for(var = This->ctx->global_vars; var; var = var->next) {
if(!strcmpiW(var->name, bstrName)) {
if(!wcsicmp(var->name, bstrName)) {
ident = add_ident(This, var->name);
if(!ident)
return E_OUTOFMEMORY;
......@@ -843,7 +843,7 @@ static HRESULT WINAPI ScriptDisp_GetDispID(IDispatchEx *iface, BSTR bstrName, DW
}
for(func = This->ctx->global_funcs; func; func = func->next) {
if(!strcmpiW(func->name, bstrName)) {
if(!wcsicmp(func->name, bstrName)) {
ident = add_ident(This, func->name);
if(!ident)
return E_OUTOFMEMORY;
......
......@@ -1335,7 +1335,7 @@ static HRESULT WINAPI RegExp2_Execute(IRegExp2 *iface,
if(!This->regexp) {
This->regexp = regexp_new(NULL, &This->pool, This->pattern,
strlenW(This->pattern), This->flags, FALSE);
lstrlenW(This->pattern), This->flags, FALSE);
if(!This->regexp)
return E_FAIL;
}else {
......@@ -1402,7 +1402,7 @@ static HRESULT WINAPI RegExp2_Test(IRegExp2 *iface, BSTR sourceString, VARIANT_B
if(!This->regexp) {
This->regexp = regexp_new(NULL, &This->pool, This->pattern,
strlenW(This->pattern), This->flags, FALSE);
lstrlenW(This->pattern), This->flags, FALSE);
if(!This->regexp)
return E_FAIL;
}else {
......
......@@ -105,7 +105,7 @@ IDispatch *lookup_named_item(script_ctx_t *ctx, const WCHAR *name, unsigned flag
HRESULT hres;
LIST_FOR_EACH_ENTRY(item, &ctx->named_items, named_item_t, entry) {
if((item->flags & flags) == flags && !strcmpiW(item->name, name)) {
if((item->flags & flags) == flags && !wcsicmp(item->name, name)) {
if(!item->disp) {
IUnknown *unk;
......
......@@ -17,6 +17,7 @@
*/
#include <stdarg.h>
#include <stdint.h>
#define COBJMACROS
......@@ -31,7 +32,6 @@
#include "wine/heap.h"
#include "wine/list.h"
#include "wine/unicode.h"
typedef struct {
void **blocks;
......@@ -378,14 +378,6 @@ TID_LIST
HRESULT get_typeinfo(tid_t,ITypeInfo**) DECLSPEC_HIDDEN;
void release_regexp_typelib(void) DECLSPEC_HIDDEN;
#ifndef INT32_MIN
#define INT32_MIN (-2147483647-1)
#endif
#ifndef INT32_MAX
#define INT32_MAX (2147483647)
#endif
static inline BOOL is_int32(double d)
{
return INT32_MIN <= d && d <= INT32_MAX && (double)(int)d == d;
......@@ -441,7 +433,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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment