winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
September 2011
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
2 participants
996 discussions
Start a n
N
ew thread
Jacek Caban : vbscript: Added set statement parser/compiler implementation.
by Alexandre Julliard
15 Sep '11
15 Sep '11
Module: wine Branch: master Commit: b3a6217ed3105ab69eec4a571b9012052f2c3e13 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b3a6217ed3105ab69eec4a571…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu Sep 15 14:17:38 2011 +0200 vbscript: Added set statement parser/compiler implementation. --- dlls/vbscript/compile.c | 11 +++++++---- dlls/vbscript/interp.c | 14 ++++++++++++++ dlls/vbscript/parse.h | 3 ++- dlls/vbscript/parser.y | 16 ++++++++++++++++ dlls/vbscript/vbscript.h | 2 ++ 5 files changed, 41 insertions(+), 5 deletions(-) diff --git a/dlls/vbscript/compile.c b/dlls/vbscript/compile.c index 21c8588..d1720cf 100644 --- a/dlls/vbscript/compile.c +++ b/dlls/vbscript/compile.c @@ -475,7 +475,7 @@ static HRESULT compile_if_statement(compile_ctx_t *ctx, if_statement_t *stat) return S_OK; } -static HRESULT compile_assign_statement(compile_ctx_t *ctx, assign_statement_t *stat) +static HRESULT compile_assign_statement(compile_ctx_t *ctx, assign_statement_t *stat, BOOL is_set) { HRESULT hres; @@ -493,9 +493,9 @@ static HRESULT compile_assign_statement(compile_ctx_t *ctx, assign_statement_t * if(FAILED(hres)) return hres; - hres = push_instr_bstr(ctx, OP_assign_member, stat->member_expr->identifier); + hres = push_instr_bstr(ctx, is_set ? OP_set_member : OP_assign_member, stat->member_expr->identifier); }else { - hres = push_instr_bstr(ctx, OP_assign_ident, stat->member_expr->identifier); + hres = push_instr_bstr(ctx, is_set ? OP_set_ident : OP_assign_ident, stat->member_expr->identifier); } return hres; @@ -585,7 +585,7 @@ static HRESULT compile_statement(compile_ctx_t *ctx, statement_t *stat) while(stat) { switch(stat->type) { case STAT_ASSIGN: - hres = compile_assign_statement(ctx, (assign_statement_t*)stat); + hres = compile_assign_statement(ctx, (assign_statement_t*)stat, FALSE); break; case STAT_CALL: hres = compile_member_expression(ctx, ((call_statement_t*)stat)->expr, FALSE); @@ -605,6 +605,9 @@ static HRESULT compile_statement(compile_ctx_t *ctx, statement_t *stat) case STAT_IF: hres = compile_if_statement(ctx, (if_statement_t*)stat); break; + case STAT_SET: + hres = compile_assign_statement(ctx, (assign_statement_t*)stat, TRUE); + break; default: FIXME("Unimplemented statement type %d\n", stat->type); hres = E_NOTIMPL; diff --git a/dlls/vbscript/interp.c b/dlls/vbscript/interp.c index 2a50667..e61ed7a 100644 --- a/dlls/vbscript/interp.c +++ b/dlls/vbscript/interp.c @@ -385,6 +385,13 @@ static HRESULT interp_assign_ident(exec_ctx_t *ctx) return assign_ident(ctx, arg, v.v, v.owned); } +static HRESULT interp_set_ident(exec_ctx_t *ctx) +{ + const BSTR arg = ctx->instr->arg1.bstr; + FIXME("%s\n", debugstr_w(arg)); + return E_NOTIMPL; +} + static HRESULT interp_assign_member(exec_ctx_t *ctx) { BSTR identifier = ctx->instr->arg1.bstr; @@ -419,6 +426,13 @@ static HRESULT interp_assign_member(exec_ctx_t *ctx) return hres; } +static HRESULT interp_set_member(exec_ctx_t *ctx) +{ + BSTR identifier = ctx->instr->arg1.bstr; + FIXME("%s\n", debugstr_w(identifier)); + return E_NOTIMPL; +} + static HRESULT interp_jmp(exec_ctx_t *ctx) { const unsigned arg = ctx->instr->arg1.uint; diff --git a/dlls/vbscript/parse.h b/dlls/vbscript/parse.h index 67fa221..76f8775 100644 --- a/dlls/vbscript/parse.h +++ b/dlls/vbscript/parse.h @@ -94,7 +94,8 @@ typedef enum { STAT_EXITFUNC, STAT_EXITSUB, STAT_FUNC, - STAT_IF + STAT_IF, + STAT_SET } statement_type_t; typedef struct _statement_t { diff --git a/dlls/vbscript/parser.y b/dlls/vbscript/parser.y index 6d8a674..2e0140e 100644 --- a/dlls/vbscript/parser.y +++ b/dlls/vbscript/parser.y @@ -49,6 +49,7 @@ static member_expression_t *new_member_expression(parser_ctx_t*,expression_t*,co static void *new_statement(parser_ctx_t*,statement_type_t,size_t); static statement_t *new_call_statement(parser_ctx_t*,member_expression_t*); static statement_t *new_assign_statement(parser_ctx_t*,member_expression_t*,expression_t*); +static statement_t *new_set_statement(parser_ctx_t*,member_expression_t*,expression_t*); static statement_t *new_dim_statement(parser_ctx_t*,dim_decl_t*); static statement_t *new_if_statement(parser_ctx_t*,expression_t*,statement_t*,elseif_decl_t*,statement_t*); static statement_t *new_function_statement(parser_ctx_t*,function_decl_t*); @@ -146,6 +147,8 @@ Statement | FunctionDecl { $$ = new_function_statement(ctx, $1); CHECK_ERROR; } | tEXIT tFUNCTION { $$ = new_statement(ctx, STAT_EXITFUNC, 0); CHECK_ERROR; } | tEXIT tSUB { $$ = new_statement(ctx, STAT_EXITSUB, 0); CHECK_ERROR; } + | tSET MemberExpression Arguments_opt '=' Expression + { $2->args = $3; $$ = new_set_statement(ctx, $2, $5); CHECK_ERROR; } MemberExpression : tIdentifier { $$ = new_member_expression(ctx, NULL, $1); CHECK_ERROR; } @@ -465,6 +468,19 @@ static statement_t *new_assign_statement(parser_ctx_t *ctx, member_expression_t return &stat->stat; } +static statement_t *new_set_statement(parser_ctx_t *ctx, member_expression_t *left, expression_t *right) +{ + assign_statement_t *stat; + + stat = new_statement(ctx, STAT_SET, sizeof(*stat)); + if(!stat) + return NULL; + + stat->member_expr = left; + stat->value_expr = right; + return &stat->stat; +} + static dim_decl_t *new_dim_decl(parser_ctx_t *ctx, const WCHAR *name, dim_decl_t *next) { dim_decl_t *decl; diff --git a/dlls/vbscript/vbscript.h b/dlls/vbscript/vbscript.h index 9ad3bb6..9655978 100644 --- a/dlls/vbscript/vbscript.h +++ b/dlls/vbscript/vbscript.h @@ -150,6 +150,8 @@ typedef enum { X(null, 1, 0, 0) \ X(or, 1, 0, 0) \ X(ret, 0, 0, 0) \ + X(set_ident, 1, ARG_BSTR, 0) \ + X(set_member, 1, ARG_BSTR, 0) \ X(short, 1, ARG_INT, 0) \ X(string, 1, ARG_STR, 0) \ X(sub, 1, 0, 0) \
1
0
0
0
Jacek Caban : vbscript: Added class compiler implementation.
by Alexandre Julliard
15 Sep '11
15 Sep '11
Module: wine Branch: master Commit: e8797c29b57d36515253fd87f01e42bd8ba15edd URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e8797c29b57d36515253fd87f…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu Sep 15 14:17:17 2011 +0200 vbscript: Added class compiler implementation. --- dlls/vbscript/compile.c | 75 ++++++++++++++++++++++++++++++++++++++++++++++ dlls/vbscript/vbscript.h | 7 ++++ 2 files changed, 82 insertions(+), 0 deletions(-) diff --git a/dlls/vbscript/compile.c b/dlls/vbscript/compile.c index f74f5fe..21c8588 100644 --- a/dlls/vbscript/compile.c +++ b/dlls/vbscript/compile.c @@ -47,6 +47,8 @@ typedef struct { function_t *func; function_t *funcs; function_decl_t *func_decls; + + class_desc_t *classes; } compile_ctx_t; static HRESULT compile_expression(compile_ctx_t*,expression_t*); @@ -779,8 +781,44 @@ static HRESULT create_function(compile_ctx_t *ctx, function_decl_t *decl, functi return S_OK; } +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)) + return TRUE; + } + + return FALSE; +} + +static HRESULT compile_class(compile_ctx_t *ctx, class_decl_t *class_decl) +{ + class_desc_t *class_desc; + + if(lookup_dim_decls(ctx, class_decl->name) || lookup_funcs_name(ctx, class_decl->name) + || lookup_class_name(ctx, class_decl->name)) { + FIXME("%s: redefinition\n", debugstr_w(class_decl->name)); + return E_FAIL; + } + + class_desc = compiler_alloc(ctx->code, sizeof(*class_desc)); + if(!class_desc) + return E_OUTOFMEMORY; + + class_desc->name = compiler_alloc_string(ctx->code, class_decl->name); + if(!class_desc->name) + return E_OUTOFMEMORY; + + class_desc->next = ctx->classes; + ctx->classes = class_desc; + return S_OK; +} + static BOOL lookup_script_identifier(script_ctx_t *script, const WCHAR *identifier) { + class_desc_t *class; dynamic_var_t *var; function_t *func; @@ -794,11 +832,17 @@ static BOOL lookup_script_identifier(script_ctx_t *script, const WCHAR *identifi return TRUE; } + for(class = script->classes; class; class = class->next) { + if(!strcmpiW(class->name, identifier)) + return TRUE; + } + return FALSE; } static HRESULT check_script_collisions(compile_ctx_t *ctx, script_ctx_t *script) { + class_desc_t *class; dynamic_var_t *var; function_t *func; @@ -816,6 +860,13 @@ static HRESULT check_script_collisions(compile_ctx_t *ctx, script_ctx_t *script) } } + for(class = ctx->classes; class; class = class->next) { + if(lookup_script_identifier(script, class->name)) { + FIXME("%s: redefined\n", debugstr_w(class->name)); + return E_FAIL; + } + } + return S_OK; } @@ -891,6 +942,7 @@ HRESULT compile_script(script_ctx_t *script, const WCHAR *src, vbscode_t **ret) { function_t *new_func; function_decl_t *func_decl; + class_decl_t *class_decl; compile_ctx_t ctx; vbscode_t *code; HRESULT hres; @@ -907,6 +959,7 @@ HRESULT compile_script(script_ctx_t *script, const WCHAR *src, vbscode_t **ret) ctx.func_decls = NULL; ctx.global_vars = NULL; ctx.dim_decls = NULL; + ctx.classes = NULL; ctx.labels = NULL; ctx.labels_cnt = ctx.labels_size = 0; @@ -927,6 +980,14 @@ HRESULT compile_script(script_ctx_t *script, const WCHAR *src, vbscode_t **ret) ctx.funcs = new_func; } + for(class_decl = ctx.parser.class_decls; class_decl; class_decl = class_decl->next) { + hres = compile_class(&ctx, class_decl); + if(FAILED(hres)) { + release_compiler(&ctx); + return hres; + } + } + hres = check_script_collisions(&ctx, script); if(FAILED(hres)) { release_compiler(&ctx); @@ -949,6 +1010,20 @@ HRESULT compile_script(script_ctx_t *script, const WCHAR *src, vbscode_t **ret) script->global_funcs = ctx.funcs; } + if(ctx.classes) { + class_desc_t *class = ctx.classes; + + while(1) { + class->ctx = script; + if(!class->next) + break; + class = class->next; + } + + class->next = script->classes; + script->classes = ctx.classes; + } + if(TRACE_ON(vbscript_disas)) dump_code(&ctx); diff --git a/dlls/vbscript/vbscript.h b/dlls/vbscript/vbscript.h index 5f1d6ce..9ad3bb6 100644 --- a/dlls/vbscript/vbscript.h +++ b/dlls/vbscript/vbscript.h @@ -55,6 +55,12 @@ typedef struct named_item_t { struct list entry; } named_item_t; +typedef struct _class_desc_t { + const WCHAR *name; + script_ctx_t *ctx; + struct _class_desc_t *next; +} class_desc_t; + typedef struct { IDispatchEx IDispatchEx_iface; @@ -98,6 +104,7 @@ struct _script_ctx_t { dynamic_var_t *global_vars; function_t *global_funcs; + class_desc_t *classes; struct list code_list; struct list named_items;
1
0
0
0
Jacek Caban : vbscript: Added class parser implementation.
by Alexandre Julliard
15 Sep '11
15 Sep '11
Module: wine Branch: master Commit: 80ad3a23fa095b420f4aed23a5f9dc9a79c13688 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=80ad3a23fa095b420f4aed23a…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu Sep 15 14:16:47 2011 +0200 vbscript: Added class parser implementation. --- dlls/vbscript/parse.h | 6 ++++++ dlls/vbscript/parser.y | 32 +++++++++++++++++++++++++++++++- dlls/vbscript/tests/lang.vbs | 3 +++ 3 files changed, 40 insertions(+), 1 deletions(-) diff --git a/dlls/vbscript/parse.h b/dlls/vbscript/parse.h index 7e1124c..67fa221 100644 --- a/dlls/vbscript/parse.h +++ b/dlls/vbscript/parse.h @@ -142,6 +142,11 @@ typedef struct _function_statement_t { function_decl_t *func_decl; } function_statement_t; +typedef struct _class_decl_t { + const WCHAR *name; + struct _class_decl_t *next; +} class_decl_t; + typedef struct _elseif_decl_t { expression_t *expr; statement_t *stat; @@ -170,6 +175,7 @@ typedef struct { statement_t *stats; statement_t *stats_tail; + class_decl_t *class_decls; vbsheap_t heap; } parser_ctx_t; diff --git a/dlls/vbscript/parser.y b/dlls/vbscript/parser.y index a6281d6..6d8a674 100644 --- a/dlls/vbscript/parser.y +++ b/dlls/vbscript/parser.y @@ -34,6 +34,7 @@ static int parser_error(const char*); static void parse_complete(parser_ctx_t*,BOOL); static void source_add_statement(parser_ctx_t*,statement_t*); +static void source_add_class(parser_ctx_t*,class_decl_t*); static void *new_expression(parser_ctx_t*,expression_type_t,size_t); static expression_t *new_bool_expression(parser_ctx_t*,VARIANT_BOOL); @@ -56,6 +57,7 @@ static dim_decl_t *new_dim_decl(parser_ctx_t*,const WCHAR*,dim_decl_t*); static elseif_decl_t *new_elseif_decl(parser_ctx_t*,expression_t*,statement_t*); static function_decl_t *new_function_decl(parser_ctx_t*,const WCHAR*,function_type_t,arg_decl_t*,statement_t*); static arg_decl_t *new_argument_decl(parser_ctx_t*,const WCHAR*,BOOL); +static class_decl_t *new_class_decl(parser_ctx_t*); #define CHECK_ERROR if(((parser_ctx_t*)ctx)->hres != S_OK) YYABORT @@ -73,6 +75,7 @@ static arg_decl_t *new_argument_decl(parser_ctx_t*,const WCHAR*,BOOL); dim_decl_t *dim_decl; function_decl_t *func_decl; arg_decl_t *arg_decl; + class_decl_t *class_decl; LONG lng; BOOL bool; double dbl; @@ -105,6 +108,7 @@ static arg_decl_t *new_argument_decl(parser_ctx_t*,const WCHAR*,BOOL); %type <arg_decl> ArgumentsDecl_opt ArgumentDeclList ArgumentDecl %type <func_decl> FunctionDecl %type <elseif> ElseIfs_opt ElseIfs ElseIf +%type <class_decl> ClassDeclaration ClassBody %type <dim_decl> DimDeclList %% @@ -118,7 +122,8 @@ OptionExplicit_opt SourceElements : /* empty */ - | SourceElements StatementNl { source_add_statement(ctx, $2); } + | SourceElements StatementNl { source_add_statement(ctx, $2); } + | SourceElements ClassDeclaration { source_add_class(ctx, $2); } StatementsNl_opt : /* empty */ { $$ = NULL; } @@ -268,6 +273,12 @@ LiteralExpression PrimaryExpression : '(' Expression ')' { $$ = $2; } +ClassDeclaration + : tCLASS tIdentifier tNL ClassBody tEND tCLASS tNL { $4->name = $2; $$ = $4; } + +ClassBody + : /* empty */ { $$ = new_class_decl(ctx); } + FunctionDecl : /* Storage_opt */ tSUB tIdentifier ArgumentsDecl_opt tNL StatementsNl_opt tEND tSUB { $$ = new_function_decl(ctx, $2, FUNC_SUB, $3, $5); CHECK_ERROR; } @@ -304,6 +315,12 @@ static void source_add_statement(parser_ctx_t *ctx, statement_t *stat) } } +static void source_add_class(parser_ctx_t *ctx, class_decl_t *class_decl) +{ + class_decl->next = ctx->class_decls; + ctx->class_decls = class_decl; +} + static void parse_complete(parser_ctx_t *ctx, BOOL option_explicit) { ctx->parse_complete = TRUE; @@ -545,6 +562,18 @@ static statement_t *new_function_statement(parser_ctx_t *ctx, function_decl_t *d return &stat->stat; } +static class_decl_t *new_class_decl(parser_ctx_t *ctx) +{ + class_decl_t *class_decl; + + class_decl = parser_alloc(ctx, sizeof(*class_decl)); + if(!class_decl) + return NULL; + + class_decl->next = NULL; + return class_decl; +} + void *parser_alloc(parser_ctx_t *ctx, size_t size) { void *ret; @@ -568,6 +597,7 @@ HRESULT parse_script(parser_ctx_t *ctx, const WCHAR *code) ctx->last_token = tNL; ctx->last_nl = 0; ctx->stats = ctx->stats_tail = NULL; + ctx->class_decls = NULL; ctx->option_explicit = FALSE; parser_parse(ctx); diff --git a/dlls/vbscript/tests/lang.vbs b/dlls/vbscript/tests/lang.vbs index b9b5c57..a338e76 100644 --- a/dlls/vbscript/tests/lang.vbs +++ b/dlls/vbscript/tests/lang.vbs @@ -355,4 +355,7 @@ x = false ok SetVal(x, true), "SetVal returned false?" Call ok(x, "x is not set to true by SetVal?") +Class EmptyClass +End Class + reportSuccess()
1
0
0
0
Alexandre Julliard : winex11: Get rid of the WXRFormat typedef.
by Alexandre Julliard
15 Sep '11
15 Sep '11
Module: wine Branch: master Commit: 84ec1acced6a174410af36f8ed692bbf4774fb82 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=84ec1acced6a174410af36f8e…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Sep 15 15:35:32 2011 +0200 winex11: Get rid of the WXRFormat typedef. --- dlls/winex11.drv/xrender.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dlls/winex11.drv/xrender.c b/dlls/winex11.drv/xrender.c index db46eae..34a7bb5 100644 --- a/dlls/winex11.drv/xrender.c +++ b/dlls/winex11.drv/xrender.c @@ -55,7 +55,7 @@ static BOOL X11DRV_XRender_Installed = FALSE; #define RepeatReflect 3 #endif -typedef enum wxr_format +enum wxr_format { WXR_FORMAT_MONO, WXR_FORMAT_GRAY, @@ -71,7 +71,7 @@ typedef enum wxr_format WXR_FORMAT_B8G8R8X8, WXR_NB_FORMATS, WXR_INVALID_FORMAT = WXR_NB_FORMATS -} WXRFormat; +}; typedef struct wine_xrender_format_template { @@ -233,7 +233,7 @@ static CRITICAL_SECTION xrender_cs = { &critsect_debug, -1, 0, 0, 0, 0 }; #define NATIVE_BYTE_ORDER LSBFirst #endif -static WXRFormat get_format_without_alpha( WXRFormat format ) +static enum wxr_format get_format_without_alpha( enum wxr_format format ) { switch (format) { @@ -1331,7 +1331,7 @@ static void UploadGlyph(struct xrender_physdev *physDev, int glyph, AA_Type form gsCacheEntry *entry = glyphsetCache + physDev->cache_index; gsCacheEntryFormat *formatEntry; UINT ggo_format = GGO_GLYPH_INDEX; - WXRFormat wxr_format; + enum wxr_format wxr_format; static const char zero[4]; static const MAT2 identity = { {0,1},{0,0},{0,0},{0,1} };
1
0
0
0
Alexandre Julliard : winex11: Remove a redundant field in the XRender format templates.
by Alexandre Julliard
15 Sep '11
15 Sep '11
Module: wine Branch: master Commit: 1525273bb83318d7cdb7ce86c3becceabbb92e6c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1525273bb83318d7cdb7ce86c…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Sep 15 15:33:59 2011 +0200 winex11: Remove a redundant field in the XRender format templates. --- dlls/winex11.drv/xrender.c | 64 ++++++++++++++++++------------------------- 1 files changed, 27 insertions(+), 37 deletions(-) diff --git a/dlls/winex11.drv/xrender.c b/dlls/winex11.drv/xrender.c index e1139e2..db46eae 100644 --- a/dlls/winex11.drv/xrender.c +++ b/dlls/winex11.drv/xrender.c @@ -75,7 +75,6 @@ typedef enum wxr_format typedef struct wine_xrender_format_template { - WXRFormat wxr_format; unsigned int depth; unsigned int alpha; unsigned int alphaMask; @@ -90,18 +89,18 @@ typedef struct wine_xrender_format_template static const WineXRenderFormatTemplate wxr_formats_template[WXR_NB_FORMATS] = { /* Format depth alpha mask red mask green mask blue mask*/ - {WXR_FORMAT_MONO, 1, 0, 0x01, 0, 0, 0, 0, 0, 0 }, - {WXR_FORMAT_GRAY, 8, 0, 0xff, 0, 0, 0, 0, 0, 0 }, - {WXR_FORMAT_X1R5G5B5, 16, 0, 0, 10, 0x1f, 5, 0x1f, 0, 0x1f }, - {WXR_FORMAT_X1B5G5R5, 16, 0, 0, 0, 0x1f, 5, 0x1f, 10, 0x1f }, - {WXR_FORMAT_R5G6B5, 16, 0, 0, 11, 0x1f, 5, 0x3f, 0, 0x1f }, - {WXR_FORMAT_B5G6R5, 16, 0, 0, 0, 0x1f, 5, 0x3f, 11, 0x1f }, - {WXR_FORMAT_R8G8B8, 24, 0, 0, 16, 0xff, 8, 0xff, 0, 0xff }, - {WXR_FORMAT_B8G8R8, 24, 0, 0, 0, 0xff, 8, 0xff, 16, 0xff }, - {WXR_FORMAT_A8R8G8B8, 32, 24, 0xff, 16, 0xff, 8, 0xff, 0, 0xff }, - {WXR_FORMAT_B8G8R8A8, 32, 0, 0xff, 8, 0xff, 16, 0xff, 24, 0xff }, - {WXR_FORMAT_X8R8G8B8, 32, 0, 0, 16, 0xff, 8, 0xff, 0, 0xff }, - {WXR_FORMAT_B8G8R8X8, 32, 0, 0, 8, 0xff, 16, 0xff, 24, 0xff }, +/* WXR_FORMAT_MONO */ { 1, 0, 0x01, 0, 0, 0, 0, 0, 0 }, +/* WXR_FORMAT_GRAY */ { 8, 0, 0xff, 0, 0, 0, 0, 0, 0 }, +/* WXR_FORMAT_X1R5G5B5 */ { 16, 0, 0, 10, 0x1f, 5, 0x1f, 0, 0x1f }, +/* WXR_FORMAT_X1B5G5R5 */ { 16, 0, 0, 0, 0x1f, 5, 0x1f, 10, 0x1f }, +/* WXR_FORMAT_R5G6B5 */ { 16, 0, 0, 11, 0x1f, 5, 0x3f, 0, 0x1f }, +/* WXR_FORMAT_B5G6R5 */ { 16, 0, 0, 0, 0x1f, 5, 0x3f, 11, 0x1f }, +/* WXR_FORMAT_R8G8B8 */ { 24, 0, 0, 16, 0xff, 8, 0xff, 0, 0xff }, +/* WXR_FORMAT_B8G8R8 */ { 24, 0, 0, 0, 0xff, 8, 0xff, 16, 0xff }, +/* WXR_FORMAT_A8R8G8B8 */ { 32, 24, 0xff, 16, 0xff, 8, 0xff, 0, 0xff }, +/* WXR_FORMAT_B8G8R8A8 */ { 32, 0, 0xff, 8, 0xff, 16, 0xff, 24, 0xff }, +/* WXR_FORMAT_X8R8G8B8 */ { 32, 0, 0, 16, 0xff, 8, 0xff, 0, 0xff }, +/* WXR_FORMAT_B8G8R8X8 */ { 32, 0, 0, 8, 0xff, 16, 0xff, 24, 0xff }, }; static enum wxr_format default_format; @@ -287,15 +286,15 @@ static int load_xrender_formats(void) int count = 0; unsigned int i; - for(i = 0; i < (sizeof(wxr_formats_template) / sizeof(wxr_formats_template[0])); i++) + for (i = 0; i < WXR_NB_FORMATS; i++) { - XRenderPictFormat templ, *pict_format; + XRenderPictFormat templ; if(is_wxrformat_compatible_with_default_visual(&wxr_formats_template[i])) { wine_tsx11_lock(); - pict_format = pXRenderFindVisualFormat(gdi_display, visual); - if(!pict_format) + pict_formats[i] = pXRenderFindVisualFormat(gdi_display, visual); + if (!pict_formats[i]) { /* Xrender doesn't like DirectColor visuals, try to find a TrueColor one instead */ if (visual->class == DirectColor) @@ -304,20 +303,13 @@ static int load_xrender_formats(void) if (XMatchVisualInfo( gdi_display, DefaultScreen(gdi_display), screen_depth, TrueColor, &info )) { - pict_format = pXRenderFindVisualFormat(gdi_display, info.visual); - if (pict_format) visual = info.visual; + pict_formats[i] = pXRenderFindVisualFormat(gdi_display, info.visual); + if (pict_formats[i]) visual = info.visual; } } } wine_tsx11_unlock(); - - if(pict_format) - { - pict_formats[wxr_formats_template[i].wxr_format] = pict_format; - default_format = wxr_formats_template[i].wxr_format; - count++; - TRACE("Loaded pict_format with id=%#lx for wxr_format=%#x\n", pict_format->id, wxr_formats_template[i].wxr_format); - } + if (pict_formats[i]) default_format = i; } else { @@ -325,15 +317,13 @@ static int load_xrender_formats(void) get_xrender_template(&wxr_formats_template[i], &templ, &mask); wine_tsx11_lock(); - pict_format = pXRenderFindFormat(gdi_display, mask, &templ, 0); + pict_formats[i] = pXRenderFindFormat(gdi_display, mask, &templ, 0); wine_tsx11_unlock(); - - if(pict_format) - { - pict_formats[wxr_formats_template[i].wxr_format] = pict_format; - count++; - TRACE("Loaded pict_format with id=%#lx for wxr_format=%#x\n", pict_format->id, wxr_formats_template[i].wxr_format); - } + } + if (pict_formats[i]) + { + count++; + TRACE("Loaded pict_format with id=%#lx for wxr_format=%#x\n", pict_formats[i]->id, i); } } return count; @@ -485,13 +475,13 @@ static enum wxr_format get_xrender_format_from_color_shifts(int depth, ColorShif blueMask = shifts->physicalBlue.max << shifts->physicalBlue.shift; /* Try to locate a format which matches the specification of the dibsection. */ - for(i = 0; i < (sizeof(wxr_formats_template) / sizeof(wxr_formats_template[0])); i++) + for(i = 0; i < WXR_NB_FORMATS; i++) { if( depth == wxr_formats_template[i].depth && redMask == (wxr_formats_template[i].redMask << wxr_formats_template[i].red) && greenMask == (wxr_formats_template[i].greenMask << wxr_formats_template[i].green) && blueMask == (wxr_formats_template[i].blueMask << wxr_formats_template[i].blue) ) - return wxr_formats_template[i].wxr_format; + return i; } /* This should not happen because when we reach 'shifts' must have been set and we only allows shifts which are backed by X */
1
0
0
0
Alexandre Julliard : winex11: Get rid of the WineXRenderFormat structure.
by Alexandre Julliard
15 Sep '11
15 Sep '11
Module: wine Branch: master Commit: 5efaa2082367e41118ba9c7d4f8ab6806473c8cb URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5efaa2082367e41118ba9c7d4…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Sep 15 15:26:44 2011 +0200 winex11: Get rid of the WineXRenderFormat structure. --- dlls/winex11.drv/xrender.c | 111 +++++++++++++++---------------------------- 1 files changed, 39 insertions(+), 72 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=5efaa2082367e41118ba9…
1
0
0
0
Alexandre Julliard : winex11: Store the XRender picture formats in a global array instead of in the format structure .
by Alexandre Julliard
15 Sep '11
15 Sep '11
Module: wine Branch: master Commit: 8860159f1cd1fac12c3d24b779af02d53c23f2d4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8860159f1cd1fac12c3d24b77…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Sep 15 15:10:17 2011 +0200 winex11: Store the XRender picture formats in a global array instead of in the format structure. --- dlls/winex11.drv/xrender.c | 96 +++++++++++++++++++++---------------------- 1 files changed, 47 insertions(+), 49 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=8860159f1cd1fac12c3d2…
1
0
0
0
Alexandre Julliard : winex11: Get rid of the xrender_info structure.
by Alexandre Julliard
15 Sep '11
15 Sep '11
Module: wine Branch: master Commit: ce63099a140f3dd30d7cabe098805e271b1b9f3a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ce63099a140f3dd30d7cabe09…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Sep 15 13:21:45 2011 +0200 winex11: Get rid of the xrender_info structure. --- dlls/winex11.drv/x11drv.h | 3 - dlls/winex11.drv/xrender.c | 174 ++++++++++++++++++-------------------------- 2 files changed, 71 insertions(+), 106 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=ce63099a140f3dd30d7ca…
1
0
0
0
Hans Leidekker : msi: Improve parsing of the package platform.
by Alexandre Julliard
15 Sep '11
15 Sep '11
Module: wine Branch: master Commit: 6ae7061645eb245e49dacb4757b329b6783a10e5 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6ae7061645eb245e49dacb475…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Thu Sep 15 11:48:15 2011 +0200 msi: Improve parsing of the package platform. --- dlls/msi/package.c | 5 +++++ dlls/msi/tests/install.c | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+), 0 deletions(-) diff --git a/dlls/msi/package.c b/dlls/msi/package.c index 1025607..4b59425 100644 --- a/dlls/msi/package.c +++ b/dlls/msi/package.c @@ -1280,6 +1280,7 @@ static UINT msi_parse_summary( MSISUMMARYINFO *si, MSIPACKAGE *package ) return ERROR_PATCH_PACKAGE_INVALID; } *p = 0; + if ((q = strchrW( template, ',' ))) *q = 0; if (!template[0] || !strcmpW( template, szIntel )) package->platform = PLATFORM_INTEL; else if (!strcmpW( template, szIntel64 )) @@ -1329,6 +1330,10 @@ static UINT validate_package( MSIPACKAGE *package ) BOOL is_wow64; UINT i; + if (package->platform == PLATFORM_INTEL64) + { + return ERROR_INSTALL_PLATFORM_UNSUPPORTED; + } IsWow64Process( GetCurrentProcess(), &is_wow64 ); if (package->platform == PLATFORM_X64) { diff --git a/dlls/msi/tests/install.c b/dlls/msi/tests/install.c index 04c709f..b1db7e4 100644 --- a/dlls/msi/tests/install.c +++ b/dlls/msi/tests/install.c @@ -6111,6 +6111,44 @@ static void test_package_validation(void) ok(delete_pf("msitest", FALSE), "directory does not exist\n"); DeleteFile(msifile); + create_database_template(msifile, pv_tables, sizeof(pv_tables)/sizeof(msi_table), 200, "Intel,9999;9999"); + + r = MsiInstallProductA(msifile, NULL); + ok(r == ERROR_INSTALL_LANGUAGE_UNSUPPORTED, "Expected ERROR_INSTALL_LANGUAGE_UNSUPPORTED, got %u\n", r); + + DeleteFile(msifile); + create_database_template(msifile, pv_tables, sizeof(pv_tables)/sizeof(msi_table), 200, "Intel,1033;9999"); + + r = MsiInstallProductA(msifile, NULL); + ok(r == ERROR_INSTALL_LANGUAGE_UNSUPPORTED, "Expected ERROR_INSTALL_LANGUAGE_UNSUPPORTED, got %u\n", r); + + DeleteFile(msifile); + create_database_template(msifile, pv_tables, sizeof(pv_tables)/sizeof(msi_table), 200, "Intel,9999;1033"); + + r = MsiInstallProductA(msifile, NULL); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); + ok(delete_pf("msitest\\maximus", TRUE), "file does not exist\n"); + ok(delete_pf("msitest", FALSE), "directory does not exist\n"); + + DeleteFile(msifile); + create_database_template(msifile, pv_tables, sizeof(pv_tables)/sizeof(msi_table), 200, "Intel64,9999;1033"); + + r = MsiInstallProductA(msifile, NULL); + ok(r == ERROR_INSTALL_PLATFORM_UNSUPPORTED, "Expected ERROR_INSTALL_PLATFORM_UNSUPPORTED, got %u\n", r); + + DeleteFile(msifile); + create_database_template(msifile, pv_tables, sizeof(pv_tables)/sizeof(msi_table), 200, "Intel32,1033;1033"); + + r = MsiInstallProductA(msifile, NULL); + ok(r == ERROR_INSTALL_PLATFORM_UNSUPPORTED, "Expected ERROR_INSTALL_PLATFORM_UNSUPPORTED, got %u\n", r); + + DeleteFile(msifile); + create_database_template(msifile, pv_tables, sizeof(pv_tables)/sizeof(msi_table), 200, "Intel32,9999;1033"); + + r = MsiInstallProductA(msifile, NULL); + ok(r == ERROR_INSTALL_PLATFORM_UNSUPPORTED, "Expected ERROR_INSTALL_PLATFORM_UNSUPPORTED, got %u\n", r); + + DeleteFile(msifile); create_database_template(msifile, pv_tables, sizeof(pv_tables)/sizeof(msi_table), 100, "Intel;9999"); r = MsiInstallProductA(msifile, NULL);
1
0
0
0
Francois Gouget : po: Remove English strings from the Serbian (Latin) translation.
by Alexandre Julliard
15 Sep '11
15 Sep '11
Module: wine Branch: master Commit: de77f0648e1bcb91fd018e0dd17765f69925cfba URL:
http://source.winehq.org/git/wine.git/?a=commit;h=de77f0648e1bcb91fd018e0dd…
Author: Francois Gouget <fgouget(a)free.fr> Date: Thu Sep 15 10:57:30 2011 +0200 po: Remove English strings from the Serbian (Latin) translation. --- po/sr_RS(a)latin.po | 35 ++++++++++------------------------- 1 files changed, 10 insertions(+), 25 deletions(-) diff --git a/po/sr_RS(a)latin.po b/po/sr_RS(a)latin.po index 6b888a3..6e6e3f5 100644 --- a/po/sr_RS(a)latin.po +++ b/po/sr_RS(a)latin.po @@ -4314,9 +4314,8 @@ msgid "Security DB commit failure\n" msgstr "" #: winerror.mc:2256 -#, fuzzy msgid "Account is built-in\n" -msgstr "native, builtin" +msgstr "" #: winerror.mc:2261 msgid "Group is built-in\n" @@ -5781,7 +5780,7 @@ msgstr "Wine Video 1 video kodek" #: oleacc.rc:27 msgid "unknown object" -msgstr "unknown object" +msgstr "" #: oleacc.rc:28 msgid "title bar" @@ -7029,19 +7028,6 @@ msgid "" "along with Wine; if not, write to the Free Software Foundation, Inc., 51 " "Franklin St, Fifth Floor, Boston, MA 02110-1301, USA." msgstr "" -"Wine is free software; you can redistribute it and/or modify it under the " -"terms of the GNU Lesser General Public License as published by the Free " -"Software Foundation; either version 2.1 of the License, or (at your option) " -"any later version.\n" -"\n" -"Wine is distributed in the hope that it will be useful, but WITHOUT ANY " -"WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS " -"FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for " -"more details.\n" -"\n" -"You should have received a copy of the GNU Lesser General Public License " -"along with this library; if not, write to the Free Software Foundation, " -"Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA." #: shell32.rc:266 msgid "Wine License" @@ -7926,7 +7912,7 @@ msgstr "&Digitalni" #: clock.rc:32 notepad.rc:50 winefile.rc:64 wordpad.rc:81 msgid "&Font..." -msgstr "&Font..." +msgstr "" #: clock.rc:34 msgid "&Without Titlebar" @@ -8503,7 +8489,7 @@ msgstr "" #: ipconfig.rc:29 msgid "%s adapter %s\n" -msgstr "%s adapter %s\n" +msgstr "" #: ipconfig.rc:30 msgid "Ethernet" @@ -9450,9 +9436,8 @@ msgid "Modify Binary Data..." msgstr "" #: regedit.rc:109 -#, fuzzy msgid "&Export..." -msgstr "&Font..." +msgstr "" #: regedit.rc:134 msgid "Contains commands for working with the whole registry" @@ -10406,7 +10391,7 @@ msgstr "Izaberite temu" #: winecfg.rc:45 msgid "Folder" -msgstr "Folder" +msgstr "" #: winecfg.rc:46 msgid "Links to" @@ -10580,7 +10565,7 @@ msgstr "Tekst menija" #: winecfg.rc:100 msgid "Scrollbar" -msgstr "Scrollbar" +msgstr "" #: winecfg.rc:101 msgid "Selection Background" @@ -10668,7 +10653,7 @@ msgstr "Kontrola alternativne pozadine" #: winecfg.rc:122 msgid "Hot Tracked Item" -msgstr "Hot Tracked Item" +msgstr "" #: winecfg.rc:123 msgid "Active Title Bar Gradient" @@ -11044,7 +11029,7 @@ msgstr "Uvek na &vrhu" #: winhlp32.rc:56 msgid "&About Wine Help" -msgstr "&Info..." +msgstr "" #: winhlp32.rc:64 msgid "Annotation..." @@ -11068,7 +11053,7 @@ msgstr "Pregled" #: winhlp32.rc:84 msgid "&Index" -msgstr "&Index" +msgstr "" #: winhlp32.rc:88 msgid "Help files (*.hlp)"
1
0
0
0
← Newer
1
...
41
42
43
44
45
46
47
...
100
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
Results per page:
10
25
50
100
200