projects
/
reactos.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
4df86f7
)
[VBSCRIPT] Sync with Wine Staging 4.0. CORE-15682
author
Amine Khaldi
<amine.khaldi@reactos.org>
Mon, 4 Feb 2019 12:07:56 +0000
(13:07 +0100)
committer
Amine Khaldi
<amine.khaldi@reactos.org>
Mon, 4 Feb 2019 12:07:56 +0000
(13:07 +0100)
dll/win32/vbscript/global.c
patch
|
blob
|
history
dll/win32/vbscript/lex.c
patch
|
blob
|
history
dll/win32/vbscript/parser.tab.c
patch
|
blob
|
history
dll/win32/vbscript/parser.y
patch
|
blob
|
history
dll/win32/vbscript/vbdisp.c
patch
|
blob
|
history
dll/win32/vbscript/vbscript_main.c
patch
|
blob
|
history
media/doc/README.WINE
patch
|
blob
|
history
diff --git
a/dll/win32/vbscript/global.c
b/dll/win32/vbscript/global.c
index
668a71a
..
6d26b2c
100644
(file)
--- a/
dll/win32/vbscript/global.c
+++ b/
dll/win32/vbscript/global.c
@@
-338,7
+338,7
@@
static HRESULT show_msgbox(script_ctx_t *ctx, BSTR prompt, unsigned type, BSTR o
return E_OUTOFMEMORY;
memcpy(title_buf, vbscriptW, sizeof(vbscriptW));
return E_OUTOFMEMORY;
memcpy(title_buf, vbscriptW, sizeof(vbscriptW));
- ptr = title_buf +
sizeof(vbscriptW)/sizeof(WCHAR
)-1;
+ ptr = title_buf +
ARRAY_SIZE(vbscriptW
)-1;
*ptr++ = ':';
*ptr++ = ' ';
*ptr++ = ':';
*ptr++ = ' ';
@@
-2450,7
+2450,7
@@
HRESULT init_global(script_ctx_t *ctx)
HRESULT hres;
ctx->global_desc.ctx = ctx;
HRESULT hres;
ctx->global_desc.ctx = ctx;
- ctx->global_desc.builtin_prop_cnt =
sizeof(global_props)/sizeof(*
global_props);
+ ctx->global_desc.builtin_prop_cnt =
ARRAY_SIZE(
global_props);
ctx->global_desc.builtin_props = global_props;
hres = get_typeinfo(GlobalObj_tid, &ctx->global_desc.typeinfo);
ctx->global_desc.builtin_props = global_props;
hres = get_typeinfo(GlobalObj_tid, &ctx->global_desc.typeinfo);
@@
-2466,7
+2466,7
@@
HRESULT init_global(script_ctx_t *ctx)
return hres;
ctx->err_desc.ctx = ctx;
return hres;
ctx->err_desc.ctx = ctx;
- ctx->err_desc.builtin_prop_cnt =
sizeof(err_props)/sizeof(*
err_props);
+ ctx->err_desc.builtin_prop_cnt =
ARRAY_SIZE(
err_props);
ctx->err_desc.builtin_props = err_props;
hres = get_typeinfo(ErrObj_tid, &ctx->err_desc.typeinfo);
ctx->err_desc.builtin_props = err_props;
hres = get_typeinfo(ErrObj_tid, &ctx->err_desc.typeinfo);
diff --git
a/dll/win32/vbscript/lex.c
b/dll/win32/vbscript/lex.c
index
98b4cbb
..
571854d
100644
(file)
--- a/
dll/win32/vbscript/lex.c
+++ b/
dll/win32/vbscript/lex.c
@@
-179,7
+179,7
@@
static int check_keyword(parser_ctx_t *ctx, const WCHAR *word)
static int check_keywords(parser_ctx_t *ctx)
{
static int check_keywords(parser_ctx_t *ctx)
{
- int min = 0, max =
sizeof(keywords)/sizeof(keywords[0]
)-1, r, i;
+ int min = 0, max =
ARRAY_SIZE(keywords
)-1, r, i;
while(min <= max) {
i = (min+max)/2;
while(min <= max) {
i = (min+max)/2;
@@
-383,13
+383,14
@@
static int parse_hex_literal(parser_ctx_t *ctx, LONG *ret)
static void skip_spaces(parser_ctx_t *ctx)
{
static void skip_spaces(parser_ctx_t *ctx)
{
- while(*ctx->ptr == ' ' || *ctx->ptr == '\t'
|| *ctx->ptr == '\r'
)
+ while(*ctx->ptr == ' ' || *ctx->ptr == '\t')
ctx->ptr++;
}
static int comment_line(parser_ctx_t *ctx)
{
ctx->ptr++;
}
static int comment_line(parser_ctx_t *ctx)
{
- ctx->ptr = strchrW(ctx->ptr, '\n');
+ static const WCHAR newlineW[] = {'\n','\r',0};
+ ctx->ptr = strpbrkW(ctx->ptr, newlineW);
if(ctx->ptr)
ctx->ptr++;
else
if(ctx->ptr)
ctx->ptr++;
else
@@
-421,6
+422,7
@@
static int parse_next_token(void *lval, parser_ctx_t *ctx)
switch(c) {
case '\n':
switch(c) {
case '\n':
+ case '\r':
ctx->ptr++;
return tNL;
case '\'':
ctx->ptr++;
return tNL;
case '\'':
diff --git
a/dll/win32/vbscript/parser.tab.c
b/dll/win32/vbscript/parser.tab.c
index
c39ff41
..
af2c044
100644
(file)
--- a/
dll/win32/vbscript/parser.tab.c
+++ b/
dll/win32/vbscript/parser.tab.c
@@
-3414,7
+3414,7
@@
void *parser_alloc(parser_ctx_t *ctx, size_t size)
HRESULT parse_script(parser_ctx_t *ctx, const WCHAR *code, const WCHAR *delimiter)
{
HRESULT parse_script(parser_ctx_t *ctx, const WCHAR *code, const WCHAR *delimiter)
{
- const WCHAR html_delimiterW[] = {'<','/','s','c','r','i','p','t','>',0};
+
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->code = ctx->ptr = code;
ctx->end = ctx->code + strlenW(ctx->code);
diff --git
a/dll/win32/vbscript/parser.y
b/dll/win32/vbscript/parser.y
index
e8ecf4d
..
0201099
100644
(file)
--- a/
dll/win32/vbscript/parser.y
+++ b/
dll/win32/vbscript/parser.y
@@
-969,7
+969,7
@@
void *parser_alloc(parser_ctx_t *ctx, size_t size)
HRESULT parse_script(parser_ctx_t *ctx, const WCHAR *code, const WCHAR *delimiter)
{
HRESULT parse_script(parser_ctx_t *ctx, const WCHAR *code, const WCHAR *delimiter)
{
- const WCHAR html_delimiterW[] = {'<','/','s','c','r','i','p','t','>',0};
+
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->code = ctx->ptr = code;
ctx->end = ctx->code + strlenW(ctx->code);
diff --git
a/dll/win32/vbscript/vbdisp.c
b/dll/win32/vbscript/vbdisp.c
index
daed7ec
..
a836b1d
100644
(file)
--- a/
dll/win32/vbscript/vbdisp.c
+++ b/
dll/win32/vbscript/vbdisp.c
@@
-236,7
+236,7
@@
static HRESULT invoke_builtin(vbdisp_t *This, const builtin_prop_t *prop, WORD f
return E_FAIL;
}
return E_FAIL;
}
- assert(argn <
sizeof(args)/sizeof(*
args));
+ assert(argn <
ARRAY_SIZE(
args));
for(i=0; i < argn; i++) {
if(V_VT(dp->rgvarg+dp->cArgs-i-1) == (VT_BYREF|VT_VARIANT))
for(i=0; i < argn; i++) {
if(V_VT(dp->rgvarg+dp->cArgs-i-1) == (VT_BYREF|VT_VARIANT))
@@
-647,7
+647,7
@@
HRESULT create_procedure_disp(script_ctx_t *ctx, vbscode_t *code, IDispatch **re
return E_OUTOFMEMORY;
desc->ctx = ctx;
return E_OUTOFMEMORY;
desc->ctx = ctx;
- desc->builtin_prop_cnt =
sizeof(procedure_props)/sizeof(*
procedure_props);
+ desc->builtin_prop_cnt =
ARRAY_SIZE(
procedure_props);
desc->builtin_props = procedure_props;
desc->value_func = &code->main_code;
desc->builtin_props = procedure_props;
desc->value_func = &code->main_code;
diff --git
a/dll/win32/vbscript/vbscript_main.c
b/dll/win32/vbscript/vbscript_main.c
index
7b7161c
..
786b7fb
100644
(file)
--- a/
dll/win32/vbscript/vbscript_main.c
+++ b/
dll/win32/vbscript/vbscript_main.c
@@
-87,7
+87,7
@@
static void release_typelib(void)
if(!typelib)
return;
if(!typelib)
return;
- for(i
=0; i < sizeof(typeinfos)/sizeof(*
typeinfos); i++) {
+ for(i
= 0; i < ARRAY_SIZE(
typeinfos); i++) {
if(typeinfos[i])
ITypeInfo_Release(typeinfos[i]);
}
if(typeinfos[i])
ITypeInfo_Release(typeinfos[i]);
}
diff --git
a/media/doc/README.WINE
b/media/doc/README.WINE
index
723f86c
..
78330c4
100644
(file)
--- a/
media/doc/README.WINE
+++ b/
media/doc/README.WINE
@@
-191,7
+191,7
@@
reactos/dll/win32/url # Synced to WineStaging-3.3
reactos/dll/win32/urlmon # Synced to WineStaging-4.0
reactos/dll/win32/usp10 # Synced to WineStaging-4.0
reactos/dll/win32/uxtheme # Forked
reactos/dll/win32/urlmon # Synced to WineStaging-4.0
reactos/dll/win32/usp10 # Synced to WineStaging-4.0
reactos/dll/win32/uxtheme # Forked
-reactos/dll/win32/vbscript # Synced to WineStaging-
3.9
+reactos/dll/win32/vbscript # Synced to WineStaging-
4.0
reactos/dll/win32/version # Synced to WineStaging-3.9
reactos/dll/win32/vssapi # Synced to WineStaging-2.9
reactos/dll/win32/wbemdisp # Synced to WineStaging-3.3
reactos/dll/win32/version # Synced to WineStaging-3.9
reactos/dll/win32/vssapi # Synced to WineStaging-2.9
reactos/dll/win32/wbemdisp # Synced to WineStaging-3.3