mirror of
https://github.com/reactos/reactos.git
synced 2025-04-22 13:10:39 +00:00
[WIDL]
Update widl to version 1.3.4. svn path=/trunk/; revision=49132
This commit is contained in:
parent
6d0861e9ed
commit
8bfc61d69d
13 changed files with 426 additions and 653 deletions
|
@ -22,7 +22,7 @@ When porting a new DLL from Wine to ReactOS, please do the following steps
|
||||||
The following build tools are shared with Wine.
|
The following build tools are shared with Wine.
|
||||||
|
|
||||||
reactos/tools/unicode # Synced to Wine-1_2rc6
|
reactos/tools/unicode # Synced to Wine-1_2rc6
|
||||||
reactos/tools/widl # Synced to Wine-1_2rc6
|
reactos/tools/widl # Synced to Wine-1_3_4
|
||||||
reactos/tools/winebuild # Synced to Wine-1_1_13
|
reactos/tools/winebuild # Synced to Wine-1_1_13
|
||||||
reactos/tools/wmc # Synced to Wine-20081105 (~Wine-1.1.7)
|
reactos/tools/wmc # Synced to Wine-20081105 (~Wine-1.1.7)
|
||||||
reactos/tools/wpp # Synced to Wine-20081105 (~Wine-1.1.7)
|
reactos/tools/wpp # Synced to Wine-20081105 (~Wine-1.1.7)
|
||||||
|
|
|
@ -513,27 +513,22 @@ static struct expression_type resolve_expression(const struct expr_loc *expr_loc
|
||||||
case EXPR_HEXNUM:
|
case EXPR_HEXNUM:
|
||||||
case EXPR_NUM:
|
case EXPR_NUM:
|
||||||
case EXPR_TRUEFALSE:
|
case EXPR_TRUEFALSE:
|
||||||
result.is_variable = FALSE;
|
|
||||||
result.is_temporary = FALSE;
|
result.is_temporary = FALSE;
|
||||||
result.type = type_new_int(TYPE_BASIC_INT, 0);
|
result.type = type_new_int(TYPE_BASIC_INT, 0);
|
||||||
break;
|
break;
|
||||||
case EXPR_STRLIT:
|
case EXPR_STRLIT:
|
||||||
result.is_variable = FALSE;
|
|
||||||
result.is_temporary = TRUE;
|
result.is_temporary = TRUE;
|
||||||
result.type = type_new_pointer(RPC_FC_UP, type_new_int(TYPE_BASIC_CHAR, 0), NULL);
|
result.type = type_new_pointer(RPC_FC_UP, type_new_int(TYPE_BASIC_CHAR, 0), NULL);
|
||||||
break;
|
break;
|
||||||
case EXPR_WSTRLIT:
|
case EXPR_WSTRLIT:
|
||||||
result.is_variable = FALSE;
|
|
||||||
result.is_temporary = TRUE;
|
result.is_temporary = TRUE;
|
||||||
result.type = type_new_pointer(RPC_FC_UP, type_new_int(TYPE_BASIC_WCHAR, 0), NULL);
|
result.type = type_new_pointer(RPC_FC_UP, type_new_int(TYPE_BASIC_WCHAR, 0), NULL);
|
||||||
break;
|
break;
|
||||||
case EXPR_CHARCONST:
|
case EXPR_CHARCONST:
|
||||||
result.is_variable = FALSE;
|
|
||||||
result.is_temporary = TRUE;
|
result.is_temporary = TRUE;
|
||||||
result.type = type_new_int(TYPE_BASIC_CHAR, 0);
|
result.type = type_new_int(TYPE_BASIC_CHAR, 0);
|
||||||
break;
|
break;
|
||||||
case EXPR_DOUBLE:
|
case EXPR_DOUBLE:
|
||||||
result.is_variable = FALSE;
|
|
||||||
result.is_temporary = TRUE;
|
result.is_temporary = TRUE;
|
||||||
result.type = type_new_basic(TYPE_BASIC_DOUBLE);
|
result.type = type_new_basic(TYPE_BASIC_DOUBLE);
|
||||||
break;
|
break;
|
||||||
|
@ -596,7 +591,6 @@ static struct expression_type resolve_expression(const struct expr_loc *expr_loc
|
||||||
result.type = e->u.tref;
|
result.type = e->u.tref;
|
||||||
break;
|
break;
|
||||||
case EXPR_SIZEOF:
|
case EXPR_SIZEOF:
|
||||||
result.is_variable = FALSE;
|
|
||||||
result.is_temporary = FALSE;
|
result.is_temporary = FALSE;
|
||||||
result.type = type_new_int(TYPE_BASIC_INT, 0);
|
result.type = type_new_int(TYPE_BASIC_INT, 0);
|
||||||
break;
|
break;
|
||||||
|
@ -634,7 +628,6 @@ static struct expression_type resolve_expression(const struct expr_loc *expr_loc
|
||||||
result_right = resolve_expression(expr_loc, cont_type, e->u.ext);
|
result_right = resolve_expression(expr_loc, cont_type, e->u.ext);
|
||||||
check_scalar_type(expr_loc, cont_type, result_left.type);
|
check_scalar_type(expr_loc, cont_type, result_left.type);
|
||||||
check_scalar_type(expr_loc, cont_type, result_right.type);
|
check_scalar_type(expr_loc, cont_type, result_right.type);
|
||||||
result.is_variable = FALSE;
|
|
||||||
result.is_temporary = FALSE;
|
result.is_temporary = FALSE;
|
||||||
result.type = type_new_int(TYPE_BASIC_INT, 0);
|
result.type = type_new_int(TYPE_BASIC_INT, 0);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -39,10 +39,13 @@
|
||||||
typedef struct _user_type_t generic_handle_t;
|
typedef struct _user_type_t generic_handle_t;
|
||||||
|
|
||||||
static int indentation = 0;
|
static int indentation = 0;
|
||||||
|
static int is_object_interface = 0;
|
||||||
user_type_list_t user_type_list = LIST_INIT(user_type_list);
|
user_type_list_t user_type_list = LIST_INIT(user_type_list);
|
||||||
static context_handle_list_t context_handle_list = LIST_INIT(context_handle_list);
|
static context_handle_list_t context_handle_list = LIST_INIT(context_handle_list);
|
||||||
static struct list generic_handle_list = LIST_INIT(generic_handle_list);
|
static struct list generic_handle_list = LIST_INIT(generic_handle_list);
|
||||||
|
|
||||||
|
static void write_type_def_or_decl(FILE *f, type_t *t, int field, const char *name);
|
||||||
|
|
||||||
static void indent(FILE *h, int delta)
|
static void indent(FILE *h, int delta)
|
||||||
{
|
{
|
||||||
int c;
|
int c;
|
||||||
|
@ -366,12 +369,12 @@ static void write_type_v(FILE *h, type_t *t, int is_field, int declonly, const c
|
||||||
if (type_get_type_detect_alias(pt) == TYPE_FUNCTION) {
|
if (type_get_type_detect_alias(pt) == TYPE_FUNCTION) {
|
||||||
int i;
|
int i;
|
||||||
const char *callconv = get_attrp(pt->attrs, ATTR_CALLCONV);
|
const char *callconv = get_attrp(pt->attrs, ATTR_CALLCONV);
|
||||||
if (!callconv) callconv = "";
|
if (!callconv && is_object_interface) callconv = "STDMETHODCALLTYPE";
|
||||||
if (is_attr(pt->attrs, ATTR_INLINE)) fprintf(h, "inline ");
|
if (is_attr(pt->attrs, ATTR_INLINE)) fprintf(h, "inline ");
|
||||||
write_type_left(h, type_function_get_rettype(pt), declonly);
|
write_type_left(h, type_function_get_rettype(pt), declonly);
|
||||||
fputc(' ', h);
|
fputc(' ', h);
|
||||||
if (ptr_level) fputc('(', h);
|
if (ptr_level) fputc('(', h);
|
||||||
fprintf(h, "%s ", callconv);
|
if (callconv) fprintf(h, "%s ", callconv);
|
||||||
for (i = 0; i < ptr_level; i++)
|
for (i = 0; i < ptr_level; i++)
|
||||||
fputc('*', h);
|
fputc('*', h);
|
||||||
} else
|
} else
|
||||||
|
@ -396,7 +399,7 @@ static void write_type_v(FILE *h, type_t *t, int is_field, int declonly, const c
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void write_type_def_or_decl(FILE *f, type_t *t, int field, const char *name)
|
static void write_type_def_or_decl(FILE *f, type_t *t, int field, const char *name)
|
||||||
{
|
{
|
||||||
write_type_v(f, t, field, FALSE, name);
|
write_type_v(f, t, field, FALSE, name);
|
||||||
}
|
}
|
||||||
|
@ -785,7 +788,7 @@ static void write_cpp_method_def(FILE *header, const type_t *iface)
|
||||||
const var_t *func = stmt->u.var;
|
const var_t *func = stmt->u.var;
|
||||||
if (!is_callas(func->attrs)) {
|
if (!is_callas(func->attrs)) {
|
||||||
const char *callconv = get_attrp(func->type->attrs, ATTR_CALLCONV);
|
const char *callconv = get_attrp(func->type->attrs, ATTR_CALLCONV);
|
||||||
if (!callconv) callconv = "";
|
if (!callconv) callconv = "STDMETHODCALLTYPE";
|
||||||
indent(header, 0);
|
indent(header, 0);
|
||||||
fprintf(header, "virtual ");
|
fprintf(header, "virtual ");
|
||||||
write_type_decl_left(header, type_function_get_rettype(func->type));
|
write_type_decl_left(header, type_function_get_rettype(func->type));
|
||||||
|
@ -815,7 +818,7 @@ static void do_write_c_method_def(FILE *header, const type_t *iface, const char
|
||||||
}
|
}
|
||||||
if (!is_callas(func->attrs)) {
|
if (!is_callas(func->attrs)) {
|
||||||
const char *callconv = get_attrp(func->type->attrs, ATTR_CALLCONV);
|
const char *callconv = get_attrp(func->type->attrs, ATTR_CALLCONV);
|
||||||
if (!callconv) callconv = "";
|
if (!callconv) callconv = "STDMETHODCALLTYPE";
|
||||||
indent(header, 0);
|
indent(header, 0);
|
||||||
write_type_decl_left(header, type_function_get_rettype(func->type));
|
write_type_decl_left(header, type_function_get_rettype(func->type));
|
||||||
fprintf(header, " (%s *%s)(\n", callconv, get_name(func));
|
fprintf(header, " (%s *%s)(\n", callconv, get_name(func));
|
||||||
|
@ -846,7 +849,7 @@ static void write_method_proto(FILE *header, const type_t *iface)
|
||||||
|
|
||||||
if (!is_local(func->attrs)) {
|
if (!is_local(func->attrs)) {
|
||||||
const char *callconv = get_attrp(func->type->attrs, ATTR_CALLCONV);
|
const char *callconv = get_attrp(func->type->attrs, ATTR_CALLCONV);
|
||||||
if (!callconv) callconv = "";
|
if (!callconv) callconv = "STDMETHODCALLTYPE";
|
||||||
/* proxy prototype */
|
/* proxy prototype */
|
||||||
write_type_decl_left(header, type_function_get_rettype(func->type));
|
write_type_decl_left(header, type_function_get_rettype(func->type));
|
||||||
fprintf(header, " %s %s_%s_Proxy(\n", callconv, iface->name, get_name(func));
|
fprintf(header, " %s %s_%s_Proxy(\n", callconv, iface->name, get_name(func));
|
||||||
|
@ -1217,6 +1220,7 @@ static void write_header_stmts(FILE *header, const statement_list_t *stmts, cons
|
||||||
if (type_get_type(stmt->u.type) == TYPE_INTERFACE)
|
if (type_get_type(stmt->u.type) == TYPE_INTERFACE)
|
||||||
{
|
{
|
||||||
type_t *iface = stmt->u.type;
|
type_t *iface = stmt->u.type;
|
||||||
|
if (is_object(iface)) is_object_interface++;
|
||||||
if (is_attr(stmt->u.type->attrs, ATTR_DISPINTERFACE) || is_object(stmt->u.type))
|
if (is_attr(stmt->u.type->attrs, ATTR_DISPINTERFACE) || is_object(stmt->u.type))
|
||||||
{
|
{
|
||||||
write_com_interface_start(header, iface);
|
write_com_interface_start(header, iface);
|
||||||
|
@ -1229,6 +1233,7 @@ static void write_header_stmts(FILE *header, const statement_list_t *stmts, cons
|
||||||
write_header_stmts(header, type_iface_get_stmts(iface), iface, FALSE);
|
write_header_stmts(header, type_iface_get_stmts(iface), iface, FALSE);
|
||||||
write_rpc_interface_end(header, iface);
|
write_rpc_interface_end(header, iface);
|
||||||
}
|
}
|
||||||
|
if (is_object(iface)) is_object_interface++;
|
||||||
}
|
}
|
||||||
else if (type_get_type(stmt->u.type) == TYPE_COCLASS)
|
else if (type_get_type(stmt->u.type) == TYPE_COCLASS)
|
||||||
write_coclass(header, stmt->u.type);
|
write_coclass(header, stmt->u.type);
|
||||||
|
@ -1304,16 +1309,14 @@ void write_header(const statement_list_t *stmts)
|
||||||
|
|
||||||
fprintf(header, "#ifndef __WIDL_%s\n", header_token);
|
fprintf(header, "#ifndef __WIDL_%s\n", header_token);
|
||||||
fprintf(header, "#define __WIDL_%s\n\n", header_token);
|
fprintf(header, "#define __WIDL_%s\n\n", header_token);
|
||||||
start_cplusplus_guard(header);
|
|
||||||
|
fprintf(header, "/* Forward declarations */\n\n");
|
||||||
|
write_forward_decls(header, stmts);
|
||||||
|
|
||||||
fprintf(header, "/* Headers for imported files */\n\n");
|
fprintf(header, "/* Headers for imported files */\n\n");
|
||||||
write_imports(header, stmts);
|
write_imports(header, stmts);
|
||||||
fprintf(header, "\n");
|
fprintf(header, "\n");
|
||||||
|
start_cplusplus_guard(header);
|
||||||
/* FIXME: should be before imported file includes */
|
|
||||||
fprintf(header, "/* Forward declarations */\n\n");
|
|
||||||
write_forward_decls(header, stmts);
|
|
||||||
fprintf(header, "\n");
|
|
||||||
|
|
||||||
write_header_stmts(header, stmts, NULL, FALSE);
|
write_header_stmts(header, stmts, NULL, FALSE);
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,6 @@ extern int is_declptr(const type_t *t);
|
||||||
extern const char* get_name(const var_t *v);
|
extern const char* get_name(const var_t *v);
|
||||||
extern void write_type_left(FILE *h, type_t *t, int declonly);
|
extern void write_type_left(FILE *h, type_t *t, int declonly);
|
||||||
extern void write_type_right(FILE *h, type_t *t, int is_field);
|
extern void write_type_right(FILE *h, type_t *t, int is_field);
|
||||||
extern void write_type_def_or_decl(FILE *h, type_t *t, int is_field, const char *name);
|
|
||||||
extern void write_type_decl(FILE *f, type_t *t, const char *name);
|
extern void write_type_decl(FILE *f, type_t *t, const char *name);
|
||||||
extern void write_type_decl_left(FILE *f, type_t *t);
|
extern void write_type_decl_left(FILE *f, type_t *t);
|
||||||
extern int needs_space_after(type_t *t);
|
extern int needs_space_after(type_t *t);
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -201,7 +201,7 @@ typedef union YYSTYPE
|
||||||
{
|
{
|
||||||
|
|
||||||
/* Line 1676 of yacc.c */
|
/* Line 1676 of yacc.c */
|
||||||
#line 154 "parser.y"
|
#line 153 "parser.y"
|
||||||
|
|
||||||
attr_t *attr;
|
attr_t *attr;
|
||||||
attr_list_t *attr_list;
|
attr_list_t *attr_list;
|
||||||
|
|
|
@ -66,7 +66,6 @@
|
||||||
#define YYERROR_VERBOSE
|
#define YYERROR_VERBOSE
|
||||||
|
|
||||||
static unsigned char pointer_default = RPC_FC_UP;
|
static unsigned char pointer_default = RPC_FC_UP;
|
||||||
static int is_object_interface = FALSE;
|
|
||||||
|
|
||||||
typedef struct list typelist_t;
|
typedef struct list typelist_t;
|
||||||
struct typenode {
|
struct typenode {
|
||||||
|
@ -806,7 +805,6 @@ dispinterface: tDISPINTERFACE aIDENTIFIER { $$ = get_type(TYPE_INTERFACE, $2, 0)
|
||||||
;
|
;
|
||||||
|
|
||||||
dispinterfacehdr: attributes dispinterface { attr_t *attrs;
|
dispinterfacehdr: attributes dispinterface { attr_t *attrs;
|
||||||
is_object_interface = TRUE;
|
|
||||||
$$ = $2;
|
$$ = $2;
|
||||||
check_def($$);
|
check_def($$);
|
||||||
attrs = make_attr(ATTR_DISPINTERFACE);
|
attrs = make_attr(ATTR_DISPINTERFACE);
|
||||||
|
@ -836,7 +834,7 @@ dispinterfacedef: dispinterfacehdr '{'
|
||||||
;
|
;
|
||||||
|
|
||||||
inherit: { $$ = NULL; }
|
inherit: { $$ = NULL; }
|
||||||
| ':' aKNOWNTYPE { $$ = find_type_or_error2($2, 0); is_object_interface = 1; }
|
| ':' aKNOWNTYPE { $$ = find_type_or_error2($2, 0); }
|
||||||
;
|
;
|
||||||
|
|
||||||
interface: tINTERFACE aIDENTIFIER { $$ = get_type(TYPE_INTERFACE, $2, 0); }
|
interface: tINTERFACE aIDENTIFIER { $$ = get_type(TYPE_INTERFACE, $2, 0); }
|
||||||
|
@ -849,7 +847,6 @@ interfacehdr: attributes interface { $$.interface = $2;
|
||||||
pointer_default = get_attrv($1, ATTR_POINTERDEFAULT);
|
pointer_default = get_attrv($1, ATTR_POINTERDEFAULT);
|
||||||
check_def($2);
|
check_def($2);
|
||||||
$2->attrs = check_iface_attrs($2->name, $1);
|
$2->attrs = check_iface_attrs($2->name, $1);
|
||||||
is_object_interface = is_object($2);
|
|
||||||
$2->defined = TRUE;
|
$2->defined = TRUE;
|
||||||
}
|
}
|
||||||
;
|
;
|
||||||
|
@ -926,7 +923,8 @@ decl_spec_no_type:
|
||||||
declarator:
|
declarator:
|
||||||
'*' m_type_qual_list declarator %prec PPTR
|
'*' m_type_qual_list declarator %prec PPTR
|
||||||
{ $$ = $3; $$->type = append_ptrchain_type($$->type, type_new_pointer(pointer_default, NULL, $2)); }
|
{ $$ = $3; $$->type = append_ptrchain_type($$->type, type_new_pointer(pointer_default, NULL, $2)); }
|
||||||
| callconv declarator { $$ = $2; $$->type->attrs = append_attr($$->type->attrs, make_attrp(ATTR_CALLCONV, $1)); }
|
| callconv declarator { $$ = $2; if ($$->func_type) $$->func_type->attrs = append_attr($$->func_type->attrs, make_attrp(ATTR_CALLCONV, $1));
|
||||||
|
else if ($$->type) $$->type->attrs = append_attr($$->type->attrs, make_attrp(ATTR_CALLCONV, $1)); }
|
||||||
| direct_declarator
|
| direct_declarator
|
||||||
;
|
;
|
||||||
|
|
||||||
|
@ -944,7 +942,8 @@ direct_declarator:
|
||||||
abstract_declarator:
|
abstract_declarator:
|
||||||
'*' m_type_qual_list m_abstract_declarator %prec PPTR
|
'*' m_type_qual_list m_abstract_declarator %prec PPTR
|
||||||
{ $$ = $3; $$->type = append_ptrchain_type($$->type, type_new_pointer(pointer_default, NULL, $2)); }
|
{ $$ = $3; $$->type = append_ptrchain_type($$->type, type_new_pointer(pointer_default, NULL, $2)); }
|
||||||
| callconv m_abstract_declarator { $$ = $2; $$->type->attrs = append_attr($$->type->attrs, make_attrp(ATTR_CALLCONV, $1)); }
|
| callconv m_abstract_declarator { $$ = $2; if ($$->func_type) $$->func_type->attrs = append_attr($$->func_type->attrs, make_attrp(ATTR_CALLCONV, $1));
|
||||||
|
else if ($$->type) $$->type->attrs = append_attr($$->type->attrs, make_attrp(ATTR_CALLCONV, $1)); }
|
||||||
| abstract_direct_declarator
|
| abstract_direct_declarator
|
||||||
;
|
;
|
||||||
|
|
||||||
|
@ -952,7 +951,8 @@ abstract_declarator:
|
||||||
abstract_declarator_no_direct:
|
abstract_declarator_no_direct:
|
||||||
'*' m_type_qual_list m_any_declarator %prec PPTR
|
'*' m_type_qual_list m_any_declarator %prec PPTR
|
||||||
{ $$ = $3; $$->type = append_ptrchain_type($$->type, type_new_pointer(pointer_default, NULL, $2)); }
|
{ $$ = $3; $$->type = append_ptrchain_type($$->type, type_new_pointer(pointer_default, NULL, $2)); }
|
||||||
| callconv m_any_declarator { $$ = $2; $$->type->attrs = append_attr($$->type->attrs, make_attrp(ATTR_CALLCONV, $1)); }
|
| callconv m_any_declarator { $$ = $2; if ($$->func_type) $$->func_type->attrs = append_attr($$->func_type->attrs, make_attrp(ATTR_CALLCONV, $1));
|
||||||
|
else if ($$->type) $$->type->attrs = append_attr($$->type->attrs, make_attrp(ATTR_CALLCONV, $1)); }
|
||||||
;
|
;
|
||||||
|
|
||||||
/* abstract declarator or empty */
|
/* abstract declarator or empty */
|
||||||
|
@ -1572,12 +1572,6 @@ static var_t *declare_var(attr_list_t *attrs, decl_spec_t *decl_spec, const decl
|
||||||
* function node */
|
* function node */
|
||||||
for (t = v->type; is_ptr(t); t = type_pointer_get_ref(t))
|
for (t = v->type; is_ptr(t); t = type_pointer_get_ref(t))
|
||||||
ft->attrs = move_attr(ft->attrs, t->attrs, ATTR_CALLCONV);
|
ft->attrs = move_attr(ft->attrs, t->attrs, ATTR_CALLCONV);
|
||||||
if (is_object_interface && !is_attr(ft->attrs, ATTR_CALLCONV))
|
|
||||||
{
|
|
||||||
static char *stdmethodcalltype;
|
|
||||||
if (!stdmethodcalltype) stdmethodcalltype = strdup("STDMETHODCALLTYPE");
|
|
||||||
ft->attrs = append_attr(NULL, make_attrp(ATTR_CALLCONV, stdmethodcalltype));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1822,6 +1816,12 @@ static type_t *reg_typedefs(decl_spec_t *decl_spec, declarator_list_t *decls, at
|
||||||
else if (is_attr(attrs, ATTR_UUID) && !is_attr(attrs, ATTR_PUBLIC))
|
else if (is_attr(attrs, ATTR_UUID) && !is_attr(attrs, ATTR_PUBLIC))
|
||||||
attrs = append_attr( attrs, make_attr(ATTR_PUBLIC) );
|
attrs = append_attr( attrs, make_attr(ATTR_PUBLIC) );
|
||||||
|
|
||||||
|
/* Append the SWITCHTYPE attribute to a union if it does not already have one. */
|
||||||
|
if (type_get_type_detect_alias(type) == TYPE_UNION &&
|
||||||
|
is_attr(attrs, ATTR_SWITCHTYPE) &&
|
||||||
|
!is_attr(type->attrs, ATTR_SWITCHTYPE))
|
||||||
|
type->attrs = append_attr(type->attrs, make_attrp(ATTR_SWITCHTYPE, get_attrp(attrs, ATTR_SWITCHTYPE)));
|
||||||
|
|
||||||
LIST_FOR_EACH_ENTRY( decl, decls, const declarator_t, entry )
|
LIST_FOR_EACH_ENTRY( decl, decls, const declarator_t, entry )
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
#define yytext parser_text
|
#define yytext parser_text
|
||||||
#define yywrap parser_wrap
|
#define yywrap parser_wrap
|
||||||
|
|
||||||
|
#line 20 "parser.yy.c"
|
||||||
/* A lexical scanner generated by flex */
|
/* A lexical scanner generated by flex */
|
||||||
|
|
||||||
/* Scanner skeleton version:
|
/* Scanner skeleton version:
|
||||||
|
@ -662,7 +663,7 @@ UUID *parse_uuid(const char *u)
|
||||||
* The flexer starts here
|
* The flexer starts here
|
||||||
**************************************************************************
|
**************************************************************************
|
||||||
*/
|
*/
|
||||||
#line 666 "lex.parser_.c"
|
#line 667 "parser.yy.c"
|
||||||
|
|
||||||
/* Macros after this point can all be overridden by user definitions in
|
/* Macros after this point can all be overridden by user definitions in
|
||||||
* section 1.
|
* section 1.
|
||||||
|
@ -818,7 +819,7 @@ YY_DECL
|
||||||
|
|
||||||
#line 127 "parser.l"
|
#line 127 "parser.l"
|
||||||
|
|
||||||
#line 822 "lex.parser_.c"
|
#line 823 "parser.yy.c"
|
||||||
|
|
||||||
if ( yy_init )
|
if ( yy_init )
|
||||||
{
|
{
|
||||||
|
@ -1137,7 +1138,7 @@ YY_RULE_SETUP
|
||||||
#line 210 "parser.l"
|
#line 210 "parser.l"
|
||||||
ECHO;
|
ECHO;
|
||||||
YY_BREAK
|
YY_BREAK
|
||||||
#line 1141 "lex.parser_.c"
|
#line 1142 "parser.yy.c"
|
||||||
|
|
||||||
case YY_END_OF_BUFFER:
|
case YY_END_OF_BUFFER:
|
||||||
{
|
{
|
||||||
|
|
|
@ -280,7 +280,7 @@ static void gen_proxy(type_t *iface, const var_t *func, int idx,
|
||||||
int has_ret = !is_void(type_function_get_rettype(func->type));
|
int has_ret = !is_void(type_function_get_rettype(func->type));
|
||||||
int has_full_pointer = is_full_pointer_function(func);
|
int has_full_pointer = is_full_pointer_function(func);
|
||||||
const char *callconv = get_attrp(func->type->attrs, ATTR_CALLCONV);
|
const char *callconv = get_attrp(func->type->attrs, ATTR_CALLCONV);
|
||||||
if (!callconv) callconv = "";
|
if (!callconv) callconv = "STDMETHODCALLTYPE";
|
||||||
|
|
||||||
indent = 0;
|
indent = 0;
|
||||||
print_proxy( "static void __finally_%s_%s_Proxy( struct __proxy_frame *__frame )\n",
|
print_proxy( "static void __finally_%s_%s_Proxy( struct __proxy_frame *__frame )\n",
|
||||||
|
|
|
@ -873,7 +873,7 @@ static unsigned int write_procformatstring_type(FILE *file, int indent,
|
||||||
print_file(file, indent, "0x4d, /* FC_IN_PARAM */\n");
|
print_file(file, indent, "0x4d, /* FC_IN_PARAM */\n");
|
||||||
|
|
||||||
print_file(file, indent, "0x01,\n");
|
print_file(file, indent, "0x01,\n");
|
||||||
print_file(file, indent, "NdrFcShort(0x%hx),\n", type->typestring_offset);
|
print_file(file, indent, "NdrFcShort(0x%hx),\n", (unsigned short)type->typestring_offset);
|
||||||
size = 4; /* includes param type prefix */
|
size = 4; /* includes param type prefix */
|
||||||
}
|
}
|
||||||
return size;
|
return size;
|
||||||
|
@ -1137,7 +1137,7 @@ static unsigned int write_conf_or_var_desc(FILE *file, const type_t *structure,
|
||||||
print_file(file, 2, "0x%x, /* %s */\n", operator_type,
|
print_file(file, 2, "0x%x, /* %s */\n", operator_type,
|
||||||
operator_type ? string_of_type(operator_type) : "no operators");
|
operator_type ? string_of_type(operator_type) : "no operators");
|
||||||
print_file(file, 2, "NdrFcShort(0x%hx),\t/* offset = %d */\n",
|
print_file(file, 2, "NdrFcShort(0x%hx),\t/* offset = %d */\n",
|
||||||
offset, offset);
|
(unsigned short)offset, offset);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1172,7 +1172,7 @@ static unsigned int write_conf_or_var_desc(FILE *file, const type_t *structure,
|
||||||
|
|
||||||
print_file(file, 2, "0x%x, /* Corr desc: %s */\n", conftype, conftype_string);
|
print_file(file, 2, "0x%x, /* Corr desc: %s */\n", conftype, conftype_string);
|
||||||
print_file(file, 2, "0x%x, /* %s */\n", RPC_FC_CALLBACK, "FC_CALLBACK");
|
print_file(file, 2, "0x%x, /* %s */\n", RPC_FC_CALLBACK, "FC_CALLBACK");
|
||||||
print_file(file, 2, "NdrFcShort(0x%hx),\t/* %u */\n", callback_offset, callback_offset);
|
print_file(file, 2, "NdrFcShort(0x%hx),\t/* %u */\n", (unsigned short)callback_offset, callback_offset);
|
||||||
}
|
}
|
||||||
return 4;
|
return 4;
|
||||||
}
|
}
|
||||||
|
@ -1654,8 +1654,8 @@ static void write_user_tfs(FILE *file, type_t *type, unsigned int *tfsoff)
|
||||||
print_file(file, 2, "0x%x,\t/* Alignment= %d, Flags= %02x */\n",
|
print_file(file, 2, "0x%x,\t/* Alignment= %d, Flags= %02x */\n",
|
||||||
flags | (ualign - 1), ualign - 1, flags);
|
flags | (ualign - 1), ualign - 1, flags);
|
||||||
print_file(file, 2, "NdrFcShort(0x%hx),\t/* Function offset= %hu */\n", funoff, funoff);
|
print_file(file, 2, "NdrFcShort(0x%hx),\t/* Function offset= %hu */\n", funoff, funoff);
|
||||||
print_file(file, 2, "NdrFcShort(0x%hx),\t/* %u */\n", size, size);
|
print_file(file, 2, "NdrFcShort(0x%hx),\t/* %u */\n", (unsigned short)size, size);
|
||||||
print_file(file, 2, "NdrFcShort(0x%hx),\t/* %u */\n", usize, usize);
|
print_file(file, 2, "NdrFcShort(0x%hx),\t/* %u */\n", (unsigned short)usize, usize);
|
||||||
*tfsoff += 8;
|
*tfsoff += 8;
|
||||||
reloff = absoff - *tfsoff;
|
reloff = absoff - *tfsoff;
|
||||||
print_file(file, 2, "NdrFcShort(0x%hx),\t/* Offset= %hd (%u) */\n", reloff, reloff, absoff);
|
print_file(file, 2, "NdrFcShort(0x%hx),\t/* Offset= %hd (%u) */\n", reloff, reloff, absoff);
|
||||||
|
@ -1786,8 +1786,8 @@ static int write_pointer_description_offsets(
|
||||||
* note that MSDN states that for pointer layouts in structures,
|
* note that MSDN states that for pointer layouts in structures,
|
||||||
* this is a negative offset from the end of the structure, but
|
* this is a negative offset from the end of the structure, but
|
||||||
* this statement is incorrect. all offsets are positive */
|
* this statement is incorrect. all offsets are positive */
|
||||||
print_file(file, 2, "NdrFcShort(0x%hx),\t/* Memory offset = %d */\n", *offset_in_memory, *offset_in_memory);
|
print_file(file, 2, "NdrFcShort(0x%hx),\t/* Memory offset = %d */\n", (unsigned short)*offset_in_memory, *offset_in_memory);
|
||||||
print_file(file, 2, "NdrFcShort(0x%hx),\t/* Buffer offset = %d */\n", *offset_in_buffer, *offset_in_buffer);
|
print_file(file, 2, "NdrFcShort(0x%hx),\t/* Buffer offset = %d */\n", (unsigned short)*offset_in_buffer, *offset_in_buffer);
|
||||||
|
|
||||||
memsize = type_memsize(type);
|
memsize = type_memsize(type);
|
||||||
*offset_in_memory += memsize;
|
*offset_in_memory += memsize;
|
||||||
|
@ -1940,10 +1940,10 @@ static int write_fixed_array_pointer_descriptions(
|
||||||
|
|
||||||
print_file(file, 2, "0x%02x, /* FC_FIXED_REPEAT */\n", RPC_FC_FIXED_REPEAT);
|
print_file(file, 2, "0x%02x, /* FC_FIXED_REPEAT */\n", RPC_FC_FIXED_REPEAT);
|
||||||
print_file(file, 2, "0x%02x, /* FC_PAD */\n", RPC_FC_PAD);
|
print_file(file, 2, "0x%02x, /* FC_PAD */\n", RPC_FC_PAD);
|
||||||
print_file(file, 2, "NdrFcShort(0x%hx),\t/* Iterations = %d */\n", type_array_get_dim(type), type_array_get_dim(type));
|
print_file(file, 2, "NdrFcShort(0x%hx),\t/* Iterations = %d */\n", (unsigned short)type_array_get_dim(type), type_array_get_dim(type));
|
||||||
print_file(file, 2, "NdrFcShort(0x%hx),\t/* Increment = %d */\n", increment_size, increment_size);
|
print_file(file, 2, "NdrFcShort(0x%hx),\t/* Increment = %d */\n", (unsigned short)increment_size, increment_size);
|
||||||
print_file(file, 2, "NdrFcShort(0x%hx),\t/* Offset to array = %d */\n", *offset_in_memory, *offset_in_memory);
|
print_file(file, 2, "NdrFcShort(0x%hx),\t/* Offset to array = %d */\n", (unsigned short)*offset_in_memory, *offset_in_memory);
|
||||||
print_file(file, 2, "NdrFcShort(0x%hx),\t/* Number of pointers = %d */\n", pointer_count, pointer_count);
|
print_file(file, 2, "NdrFcShort(0x%hx),\t/* Number of pointers = %d */\n", (unsigned short)pointer_count, pointer_count);
|
||||||
*typestring_offset += 10;
|
*typestring_offset += 10;
|
||||||
|
|
||||||
pointer_count = write_pointer_description_offsets(
|
pointer_count = write_pointer_description_offsets(
|
||||||
|
@ -2014,9 +2014,9 @@ static int write_conformant_array_pointer_descriptions(
|
||||||
|
|
||||||
print_file(file, 2, "0x%02x, /* FC_VARIABLE_REPEAT */\n", RPC_FC_VARIABLE_REPEAT);
|
print_file(file, 2, "0x%02x, /* FC_VARIABLE_REPEAT */\n", RPC_FC_VARIABLE_REPEAT);
|
||||||
print_file(file, 2, "0x%02x, /* FC_FIXED_OFFSET */\n", RPC_FC_FIXED_OFFSET);
|
print_file(file, 2, "0x%02x, /* FC_FIXED_OFFSET */\n", RPC_FC_FIXED_OFFSET);
|
||||||
print_file(file, 2, "NdrFcShort(0x%hx),\t/* Increment = %d */\n", increment_size, increment_size);
|
print_file(file, 2, "NdrFcShort(0x%hx),\t/* Increment = %d */\n", (unsigned short)increment_size, increment_size);
|
||||||
print_file(file, 2, "NdrFcShort(0x%hx),\t/* Offset to array = %d */\n", offset_in_memory, offset_in_memory);
|
print_file(file, 2, "NdrFcShort(0x%hx),\t/* Offset to array = %d */\n", (unsigned short)offset_in_memory, offset_in_memory);
|
||||||
print_file(file, 2, "NdrFcShort(0x%hx),\t/* Number of pointers = %d */\n", pointer_count, pointer_count);
|
print_file(file, 2, "NdrFcShort(0x%hx),\t/* Number of pointers = %d */\n", (unsigned short)pointer_count, pointer_count);
|
||||||
*typestring_offset += 8;
|
*typestring_offset += 8;
|
||||||
|
|
||||||
pointer_count = write_pointer_description_offsets(
|
pointer_count = write_pointer_description_offsets(
|
||||||
|
@ -2056,9 +2056,9 @@ static int write_varying_array_pointer_descriptions(
|
||||||
|
|
||||||
print_file(file, 2, "0x%02x, /* FC_VARIABLE_REPEAT */\n", RPC_FC_VARIABLE_REPEAT);
|
print_file(file, 2, "0x%02x, /* FC_VARIABLE_REPEAT */\n", RPC_FC_VARIABLE_REPEAT);
|
||||||
print_file(file, 2, "0x%02x, /* FC_VARIABLE_OFFSET */\n", RPC_FC_VARIABLE_OFFSET);
|
print_file(file, 2, "0x%02x, /* FC_VARIABLE_OFFSET */\n", RPC_FC_VARIABLE_OFFSET);
|
||||||
print_file(file, 2, "NdrFcShort(0x%hx),\t/* Increment = %d */\n", increment_size, increment_size);
|
print_file(file, 2, "NdrFcShort(0x%hx),\t/* Increment = %d */\n", (unsigned short)increment_size, increment_size);
|
||||||
print_file(file, 2, "NdrFcShort(0x%hx),\t/* Offset to array = %d */\n", *offset_in_memory, *offset_in_memory);
|
print_file(file, 2, "NdrFcShort(0x%hx),\t/* Offset to array = %d */\n", (unsigned short)*offset_in_memory, *offset_in_memory);
|
||||||
print_file(file, 2, "NdrFcShort(0x%hx),\t/* Number of pointers = %d */\n", pointer_count, pointer_count);
|
print_file(file, 2, "NdrFcShort(0x%hx),\t/* Number of pointers = %d */\n", (unsigned short)pointer_count, pointer_count);
|
||||||
*typestring_offset += 8;
|
*typestring_offset += 8;
|
||||||
|
|
||||||
pointer_count = write_pointer_description_offsets(
|
pointer_count = write_pointer_description_offsets(
|
||||||
|
@ -2221,7 +2221,7 @@ static unsigned int write_string_tfs(FILE *file, const attr_list_t *attrs,
|
||||||
print_file(file, 2, "0x%x, /* FC_PAD */\n", RPC_FC_PAD);
|
print_file(file, 2, "0x%x, /* FC_PAD */\n", RPC_FC_PAD);
|
||||||
*typestring_offset += 2;
|
*typestring_offset += 2;
|
||||||
|
|
||||||
print_file(file, 2, "NdrFcShort(0x%hx),\t/* %d */\n", dim, dim);
|
print_file(file, 2, "NdrFcShort(0x%hx),\t/* %d */\n", (unsigned short)dim, dim);
|
||||||
*typestring_offset += 2;
|
*typestring_offset += 2;
|
||||||
|
|
||||||
return start_offset;
|
return start_offset;
|
||||||
|
@ -2298,7 +2298,7 @@ static unsigned int write_array_tfs(FILE *file, const attr_list_t *attrs, type_t
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print_file(file, 2, "NdrFcShort(0x%hx),\t/* %u */\n", size, size);
|
print_file(file, 2, "NdrFcShort(0x%hx),\t/* %u */\n", (unsigned short)size, size);
|
||||||
*typestring_offset += 2;
|
*typestring_offset += 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2319,11 +2319,11 @@ static unsigned int write_array_tfs(FILE *file, const attr_list_t *attrs, type_t
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print_file(file, 2, "NdrFcShort(0x%hx),\t/* %u */\n", dim, dim);
|
print_file(file, 2, "NdrFcShort(0x%hx),\t/* %u */\n", (unsigned short)dim, dim);
|
||||||
*typestring_offset += 2;
|
*typestring_offset += 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
print_file(file, 2, "NdrFcShort(0x%hx),\t/* %u */\n", elsize, elsize);
|
print_file(file, 2, "NdrFcShort(0x%hx),\t/* %u */\n", (unsigned short)elsize, elsize);
|
||||||
*typestring_offset += 2;
|
*typestring_offset += 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2349,7 +2349,7 @@ static unsigned int write_array_tfs(FILE *file, const attr_list_t *attrs, type_t
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
unsigned int dim = size_is ? 0 : type_array_get_dim(type);
|
unsigned int dim = size_is ? 0 : type_array_get_dim(type);
|
||||||
print_file(file, 2, "NdrFcShort(0x%hx),\t/* %u */\n", dim, dim);
|
print_file(file, 2, "NdrFcShort(0x%hx),\t/* %u */\n", (unsigned short)dim, dim);
|
||||||
*typestring_offset += 2;
|
*typestring_offset += 2;
|
||||||
*typestring_offset
|
*typestring_offset
|
||||||
+= write_conf_or_var_desc(file, current_structure, baseoff,
|
+= write_conf_or_var_desc(file, current_structure, baseoff,
|
||||||
|
@ -2487,7 +2487,7 @@ static unsigned int write_struct_tfs(FILE *file, type_t *type,
|
||||||
print_start_tfs_comment(file, type, start_offset);
|
print_start_tfs_comment(file, type, start_offset);
|
||||||
print_file(file, 2, "0x%x,\t/* %s */\n", fc, string_of_type(fc));
|
print_file(file, 2, "0x%x,\t/* %s */\n", fc, string_of_type(fc));
|
||||||
print_file(file, 2, "0x%x,\t/* %d */\n", align - 1, align - 1);
|
print_file(file, 2, "0x%x,\t/* %d */\n", align - 1, align - 1);
|
||||||
print_file(file, 2, "NdrFcShort(0x%hx),\t/* %d */\n", total_size, total_size);
|
print_file(file, 2, "NdrFcShort(0x%hx),\t/* %d */\n", (unsigned short)total_size, total_size);
|
||||||
*tfsoff += 4;
|
*tfsoff += 4;
|
||||||
|
|
||||||
if (array)
|
if (array)
|
||||||
|
@ -2513,7 +2513,7 @@ static unsigned int write_struct_tfs(FILE *file, type_t *type,
|
||||||
int reloff = absoff - *tfsoff;
|
int reloff = absoff - *tfsoff;
|
||||||
assert( reloff >= 0 );
|
assert( reloff >= 0 );
|
||||||
print_file(file, 2, "NdrFcShort(0x%hx),\t/* Offset= %d (%u) */\n",
|
print_file(file, 2, "NdrFcShort(0x%hx),\t/* Offset= %d (%u) */\n",
|
||||||
reloff, reloff, absoff);
|
(unsigned short)reloff, reloff, absoff);
|
||||||
*tfsoff += 2;
|
*tfsoff += 2;
|
||||||
}
|
}
|
||||||
else if ((fc == RPC_FC_PSTRUCT) ||
|
else if ((fc == RPC_FC_PSTRUCT) ||
|
||||||
|
@ -2713,8 +2713,8 @@ static unsigned int write_union_tfs(FILE *file, type_t *type, unsigned int *tfso
|
||||||
print_file(file, 0, "/* %u */\n", *tfsoff);
|
print_file(file, 0, "/* %u */\n", *tfsoff);
|
||||||
}
|
}
|
||||||
|
|
||||||
print_file(file, 2, "NdrFcShort(0x%hx),\t/* %d */\n", size, size);
|
print_file(file, 2, "NdrFcShort(0x%hx),\t/* %d */\n", (unsigned short)size, size);
|
||||||
print_file(file, 2, "NdrFcShort(0x%hx),\t/* %d */\n", nbranch, nbranch);
|
print_file(file, 2, "NdrFcShort(0x%hx),\t/* %d */\n", (unsigned short)nbranch, nbranch);
|
||||||
*tfsoff += 4;
|
*tfsoff += 4;
|
||||||
|
|
||||||
if (fields) LIST_FOR_EACH_ENTRY(f, fields, var_t, entry)
|
if (fields) LIST_FOR_EACH_ENTRY(f, fields, var_t, entry)
|
||||||
|
|
|
@ -694,6 +694,7 @@ int main(int argc,char *argv[])
|
||||||
if (do_server) server_token = dup_basename_token(server_name,"_s.c");
|
if (do_server) server_token = dup_basename_token(server_name,"_s.c");
|
||||||
|
|
||||||
add_widl_version_define();
|
add_widl_version_define();
|
||||||
|
wpp_add_define("_WIN32", NULL);
|
||||||
|
|
||||||
atexit(rm_tempfile);
|
atexit(rm_tempfile);
|
||||||
if (!no_preprocess)
|
if (!no_preprocess)
|
||||||
|
|
|
@ -1,16 +1,6 @@
|
||||||
--- client.c 2008-09-27 21:56:02.000000000 +0200
|
diff -u wine-1.3.4/tools/widl/hash.c tools/widl/hash.c
|
||||||
+++ client.c 2008-09-27 20:49:05.000000000 +0200
|
--- wine-1.3.4/tools/widl/hash.c 2010-09-19 17:48:47.640625000 +0200
|
||||||
@@ -113,7 +113,7 @@
|
+++ tools/widl/hash.c 2010-09-19 19:17:19.000000000 +0200
|
||||||
}
|
|
||||||
if (explicit_handle)
|
|
||||||
{
|
|
||||||
- if (!explicit_handle_var || !explicit_generic_handle_var || !context_handle_var)
|
|
||||||
+ if (!explicit_handle_var && !explicit_generic_handle_var && !context_handle_var)
|
|
||||||
{
|
|
||||||
error("%s() does not define an explicit binding handle!\n", def->name);
|
|
||||||
return;
|
|
||||||
--- hash.c 2008-09-27 21:56:02.000000000 +0200
|
|
||||||
+++ hash.c 2008-09-22 00:14:35.703125000 +0200
|
|
||||||
@@ -21,9 +21,7 @@
|
@@ -21,9 +21,7 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
@ -20,202 +10,27 @@
|
||||||
-#include "winnls.h"
|
-#include "winnls.h"
|
||||||
+#include <host/nls.h>
|
+#include <host/nls.h>
|
||||||
|
|
||||||
|
#include "widltypes.h"
|
||||||
#include "hash.h"
|
#include "hash.h"
|
||||||
|
diff -u wine-1.3.4/tools/widl/parser.y tools/widl/parser.y
|
||||||
|
--- wine-1.3.4/tools/widl/parser.y 2010-09-19 17:49:40.578125000 +0200
|
||||||
|
+++ tools/widl/parser.y 2010-10-03 16:44:18.781250000 +0200
|
||||||
|
@@ -1816,6 +1816,12 @@
|
||||||
|
else if (is_attr(attrs, ATTR_UUID) && !is_attr(attrs, ATTR_PUBLIC))
|
||||||
|
attrs = append_attr( attrs, make_attr(ATTR_PUBLIC) );
|
||||||
|
|
||||||
@@ -535,6 +533,7 @@
|
+ /* Append the SWITCHTYPE attribute to a union if it does not already have one. */
|
||||||
case LANG_SWEDISH: case LANG_SYRIAC: case LANG_TAMIL:
|
+ if (type_get_type_detect_alias(type) == TYPE_UNION &&
|
||||||
case LANG_TATAR: case LANG_TELUGU: case LANG_THAI:
|
+ is_attr(attrs, ATTR_SWITCHTYPE) &&
|
||||||
case LANG_UKRAINIAN: case LANG_URDU: case LANG_UZBEK:
|
+ !is_attr(type->attrs, ATTR_SWITCHTYPE))
|
||||||
+#ifndef __REACTOS__
|
+ type->attrs = append_attr(type->attrs, make_attrp(ATTR_SWITCHTYPE, get_attrp(attrs, ATTR_SWITCHTYPE)));
|
||||||
case LANG_VIETNAMESE: case LANG_GAELIC: case LANG_MALTESE:
|
|
||||||
case LANG_TAJIK: case LANG_ROMANSH: case LANG_IRISH:
|
|
||||||
case LANG_SAMI: case LANG_UPPER_SORBIAN: case LANG_SUTU:
|
|
||||||
@@ -542,6 +541,12 @@
|
|
||||||
case LANG_XHOSA: case LANG_ZULU: case LANG_ESPERANTO:
|
|
||||||
case LANG_WALON: case LANG_CORNISH: case LANG_WELSH:
|
|
||||||
case LANG_BRETON:
|
|
||||||
+#else
|
|
||||||
+ case LANG_VIETNAMESE: case LANG_MALTESE: case LANG_IRISH:
|
|
||||||
+ case LANG_SAMI: case LANG_UPPER_SORBIAN: case LANG_TSWANA:
|
|
||||||
+ case LANG_XHOSA: case LANG_ZULU: case LANG_WELSH:
|
|
||||||
+ case LANG_BRETON:
|
|
||||||
+#endif
|
|
||||||
nOffset = 16;
|
|
||||||
pnLookup = Lookup_16;
|
|
||||||
break;
|
|
||||||
--- header.c 2008-09-27 21:56:02.000000000 +0200
|
|
||||||
+++ header.c 2008-09-27 20:49:05.000000000 +0200
|
|
||||||
@@ -891,6 +891,8 @@
|
|
||||||
const char *implicit_handle = get_attrp(iface->attrs, ATTR_IMPLICIT_HANDLE);
|
|
||||||
int explicit_handle = is_attr(iface->attrs, ATTR_EXPLICIT_HANDLE);
|
|
||||||
const var_t* explicit_handle_var;
|
|
||||||
+ const var_t* explicit_generic_handle_var = NULL;
|
|
||||||
+ const var_t* context_handle_var = NULL;
|
|
||||||
const func_t *cur;
|
|
||||||
int prefixes_differ = strcmp(prefix_client, prefix_server);
|
|
||||||
|
|
||||||
@@ -901,8 +903,14 @@
|
|
||||||
|
|
||||||
/* check for a defined binding handle */
|
|
||||||
explicit_handle_var = get_explicit_handle_var(cur);
|
|
||||||
+ if (!explicit_handle_var)
|
|
||||||
+ {
|
|
||||||
+ explicit_generic_handle_var = get_explicit_generic_handle_var(cur);
|
|
||||||
+ if (!explicit_generic_handle_var)
|
|
||||||
+ context_handle_var = get_context_handle_var(cur);
|
|
||||||
+ }
|
|
||||||
if (explicit_handle) {
|
|
||||||
- if (!explicit_handle_var) {
|
|
||||||
+ if (!explicit_handle_var && !explicit_generic_handle_var && !context_handle_var) {
|
|
||||||
error("%s() does not define an explicit binding handle!\n", def->name);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
--- header.h 2008-09-27 21:56:02.000000000 +0200
|
|
||||||
+++ header.h 2008-09-23 21:14:50.781250000 +0200
|
|
||||||
@@ -66,6 +66,7 @@
|
|
||||||
extern const var_t* get_explicit_handle_var(const func_t* func);
|
|
||||||
extern const type_t* get_explicit_generic_handle_type(const var_t* var);
|
|
||||||
extern const var_t* get_explicit_generic_handle_var(const func_t* func);
|
|
||||||
+extern const var_t* get_context_handle_var(const func_t* func);
|
|
||||||
extern int has_out_arg_or_return(const func_t *func);
|
|
||||||
extern void write_guid(FILE *f, const char *guid_prefix, const char *name,
|
|
||||||
const UUID *uuid);
|
|
||||||
@@ -88,11 +89,19 @@
|
|
||||||
|
|
||||||
static inline int is_context_handle(const type_t *type)
|
|
||||||
{
|
|
||||||
- const type_t *t;
|
|
||||||
- for (t = type; is_ptr(t); t = t->ref)
|
|
||||||
- if (is_attr(t->attrs, ATTR_CONTEXTHANDLE))
|
|
||||||
+ if (is_attr(type->attrs, ATTR_CONTEXTHANDLE))
|
|
||||||
+ return 1;
|
|
||||||
+
|
+
|
||||||
+ for (;;)
|
LIST_FOR_EACH_ENTRY( decl, decls, const declarator_t, entry )
|
||||||
+ {
|
{
|
||||||
+ if (is_attr(type->attrs, ATTR_CONTEXTHANDLE))
|
|
||||||
return 1;
|
|
||||||
- return 0;
|
|
||||||
+ else if (type->kind == TKIND_ALIAS)
|
|
||||||
+ type = type->orig;
|
|
||||||
+ else if (is_ptr(type))
|
|
||||||
+ type = type->ref;
|
|
||||||
+ else return 0;
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
diff -u wine-1.3.4/tools/widl/typelib.c tools/widl/typelib.c
|
||||||
--- proxy.c 2008-09-27 21:56:02.000000000 +0200
|
--- wine-1.3.4/tools/widl/typelib.c 2010-09-19 17:50:24.000000000 +0200
|
||||||
+++ proxy.c 2008-09-27 20:49:05.000000000 +0200
|
+++ tools/widl/typelib.c 2010-09-26 20:23:47.000000000 +0200
|
||||||
@@ -463,41 +463,45 @@
|
|
||||||
print_proxy("\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
-static int write_proxy_methods(type_t *iface)
|
|
||||||
+static int write_proxy_methods(type_t *iface, int skip)
|
|
||||||
{
|
|
||||||
const func_t *cur;
|
|
||||||
int i = 0;
|
|
||||||
|
|
||||||
- if (iface->ref) i = write_proxy_methods(iface->ref);
|
|
||||||
+ if (iface->ref) i = write_proxy_methods(iface->ref, iface->ref->ref != NULL);
|
|
||||||
if (iface->funcs) LIST_FOR_EACH_ENTRY( cur, iface->funcs, const func_t, entry ) {
|
|
||||||
var_t *def = cur->def;
|
|
||||||
if (!is_callas(def->attrs)) {
|
|
||||||
if (i) fprintf(proxy, ",\n");
|
|
||||||
- print_proxy( "%s_", iface->name);
|
|
||||||
+ print_proxy( "%s%s_", skip ? "0\t/* " : "", iface->name);
|
|
||||||
write_name(proxy, def);
|
|
||||||
- fprintf(proxy, "_Proxy");
|
|
||||||
+ fprintf(proxy, "_Proxy%s", skip ? " */" : "");
|
|
||||||
i++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return i;
|
|
||||||
}
|
|
||||||
|
|
||||||
-static int write_stub_methods(type_t *iface)
|
|
||||||
+static int write_stub_methods(type_t *iface, int skip)
|
|
||||||
{
|
|
||||||
const func_t *cur;
|
|
||||||
int i = 0;
|
|
||||||
|
|
||||||
- if (iface->ref) i = write_stub_methods(iface->ref);
|
|
||||||
+ if (iface->ref) i = write_stub_methods(iface->ref, TRUE);
|
|
||||||
else return i; /* skip IUnknown */
|
|
||||||
|
|
||||||
if (iface->funcs) LIST_FOR_EACH_ENTRY( cur, iface->funcs, const func_t, entry ) {
|
|
||||||
var_t *def = cur->def;
|
|
||||||
if (!is_local(def->attrs)) {
|
|
||||||
- if (i) fprintf(proxy,",\n");
|
|
||||||
- print_proxy( "%s_", iface->name);
|
|
||||||
- write_name(proxy, def);
|
|
||||||
- fprintf(proxy, "_Stub");
|
|
||||||
- i++;
|
|
||||||
+ if (skip)
|
|
||||||
+ print_proxy("STUB_FORWARDING_FUNCTION,\n");
|
|
||||||
+ else {
|
|
||||||
+ if (i) fprintf(proxy,",\n");
|
|
||||||
+ print_proxy( "%s_", iface->name);
|
|
||||||
+ write_name(proxy, def);
|
|
||||||
+ fprintf(proxy, "_Stub");
|
|
||||||
+ i++;
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return i;
|
|
||||||
@@ -551,7 +555,7 @@
|
|
||||||
print_proxy( "},\n");
|
|
||||||
print_proxy( "{\n");
|
|
||||||
indent++;
|
|
||||||
- write_proxy_methods(iface);
|
|
||||||
+ write_proxy_methods(iface, FALSE);
|
|
||||||
fprintf(proxy, "\n");
|
|
||||||
indent--;
|
|
||||||
print_proxy( "}\n");
|
|
||||||
@@ -563,7 +567,7 @@
|
|
||||||
print_proxy( "static const PRPC_STUB_FUNCTION %s_table[] =\n", iface->name);
|
|
||||||
print_proxy( "{\n");
|
|
||||||
indent++;
|
|
||||||
- stubs = write_stub_methods(iface);
|
|
||||||
+ stubs = write_stub_methods(iface, FALSE);
|
|
||||||
fprintf(proxy, "\n");
|
|
||||||
indent--;
|
|
||||||
fprintf(proxy, "};\n");
|
|
||||||
--- server.c 2008-09-27 21:56:02.000000000 +0200
|
|
||||||
+++ server.c 2008-09-27 20:49:05.000000000 +0200
|
|
||||||
@@ -60,13 +60,21 @@
|
|
||||||
LIST_FOR_EACH_ENTRY( func, iface->funcs, const func_t, entry )
|
|
||||||
{
|
|
||||||
const var_t *def = func->def;
|
|
||||||
+ const var_t* context_handle_var = NULL;
|
|
||||||
+ const var_t* explicit_generic_handle_var = NULL;
|
|
||||||
int has_full_pointer = is_full_pointer_function(func);
|
|
||||||
|
|
||||||
/* check for a defined binding handle */
|
|
||||||
explicit_handle_var = get_explicit_handle_var(func);
|
|
||||||
+ if (!explicit_handle_var)
|
|
||||||
+ {
|
|
||||||
+ explicit_generic_handle_var = get_explicit_generic_handle_var(func);
|
|
||||||
+ if (!explicit_generic_handle_var)
|
|
||||||
+ context_handle_var = get_context_handle_var(func);
|
|
||||||
+ }
|
|
||||||
if (explicit_handle)
|
|
||||||
{
|
|
||||||
- if (!explicit_handle_var)
|
|
||||||
+ if (!explicit_handle_var && !explicit_generic_handle_var && !context_handle_var)
|
|
||||||
{
|
|
||||||
error("%s() does not define an explicit binding handle!\n", def->name);
|
|
||||||
return;
|
|
||||||
@@ -399,6 +407,7 @@
|
|
||||||
print_server("/*** Autogenerated by WIDL %s from %s - Do not edit ***/\n", PACKAGE_VERSION, input_name);
|
|
||||||
print_server("#include <string.h>\n");
|
|
||||||
fprintf(server, "\n");
|
|
||||||
+ print_server("#define _SEH_NO_NATIVE_NLG\n");
|
|
||||||
print_server("#include \"%s\"\n", header_name);
|
|
||||||
fprintf(server, "\n");
|
|
||||||
}
|
|
||||||
--- typelib.c 2008-09-27 21:56:02.000000000 +0200
|
|
||||||
+++ typelib.c 2008-09-27 20:49:05.000000000 +0200
|
|
||||||
@@ -35,8 +35,7 @@
|
@@ -35,8 +35,7 @@
|
||||||
#define NONAMELESSUNION
|
#define NONAMELESSUNION
|
||||||
#define NONAMELESSSTRUCT
|
#define NONAMELESSSTRUCT
|
||||||
|
@ -226,21 +41,9 @@
|
||||||
|
|
||||||
#include "widl.h"
|
#include "widl.h"
|
||||||
#include "utils.h"
|
#include "utils.h"
|
||||||
@@ -360,10 +359,10 @@
|
diff -u wine-1.3.4/tools/widl/typelib_struct.h tools/widl/typelib_struct.h
|
||||||
|
--- wine-1.3.4/tools/widl/typelib_struct.h 2010-09-19 17:50:40.953125000 +0200
|
||||||
file_name = wpp_find_include(importlib->name, NULL);
|
+++ tools/widl/typelib_struct.h 2010-10-10 00:50:32.921875000 +0200
|
||||||
if(file_name) {
|
|
||||||
- fd = open(file_name, O_RDONLY);
|
|
||||||
+ fd = open(file_name, O_RDONLY | O_BINARY);
|
|
||||||
free(file_name);
|
|
||||||
}else {
|
|
||||||
- fd = open(importlib->name, O_RDONLY);
|
|
||||||
+ fd = open(importlib->name, O_RDONLY | O_BINARY);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(fd < 0)
|
|
||||||
--- typelib_struct.h 2008-09-27 21:56:02.000000000 +0200
|
|
||||||
+++ typelib_struct.h 2008-09-22 00:14:35.703125000 +0200
|
|
||||||
@@ -302,7 +302,7 @@
|
@@ -302,7 +302,7 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@ -259,39 +62,9 @@
|
||||||
|
|
||||||
/*---------------------------END--------------------------------------------*/
|
/*---------------------------END--------------------------------------------*/
|
||||||
#endif
|
#endif
|
||||||
--- widl.c 2008-09-27 21:56:02.000000000 +0200
|
diff -u wine-1.3.4/tools/widl/widltypes.h tools/widl/widltypes.h
|
||||||
+++ widl.c 2008-09-27 20:49:05.000000000 +0200
|
--- wine-1.3.4/tools/widl/widltypes.h 2010-09-19 17:51:38.890625000 +0200
|
||||||
@@ -174,7 +174,7 @@
|
+++ tools/widl/widltypes.h 2010-09-19 19:17:19.656250000 +0200
|
||||||
token = xstrdup(name);
|
|
||||||
for (i=0; token[i]; i++) {
|
|
||||||
if (!isalnum(token[i])) token[i] = '_';
|
|
||||||
- else token[i] = toupper(token[i]);
|
|
||||||
+ else token[i] = tolower(token[i]);
|
|
||||||
}
|
|
||||||
return token;
|
|
||||||
}
|
|
||||||
@@ -561,8 +561,8 @@
|
|
||||||
fprintf(header, "/*** Autogenerated by WIDL %s from %s - Do not edit ***/\n", PACKAGE_VERSION, input_name);
|
|
||||||
fprintf(header, "#include <rpc.h>\n" );
|
|
||||||
fprintf(header, "#include <rpcndr.h>\n\n" );
|
|
||||||
- fprintf(header, "#ifndef __WIDL_%s\n", header_token);
|
|
||||||
- fprintf(header, "#define __WIDL_%s\n", header_token);
|
|
||||||
+ fprintf(header, "#ifndef __%s__\n", header_token);
|
|
||||||
+ fprintf(header, "#define __%s__\n", header_token);
|
|
||||||
start_cplusplus_guard(header);
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -607,7 +607,7 @@
|
|
||||||
fprintf(header, "/* End additional prototypes */\n");
|
|
||||||
fprintf(header, "\n");
|
|
||||||
end_cplusplus_guard(header);
|
|
||||||
- fprintf(header, "#endif /* __WIDL_%s */\n", header_token);
|
|
||||||
+ fprintf(header, "#endif /* __%s__ */\n", header_token);
|
|
||||||
fclose(header);
|
|
||||||
}
|
|
||||||
|
|
||||||
--- widltypes.h 2008-09-27 21:56:02.000000000 +0200
|
|
||||||
+++ widltypes.h 2008-09-26 19:42:52.859375000 +0200
|
|
||||||
@@ -21,6 +21,13 @@
|
@@ -21,6 +21,13 @@
|
||||||
#ifndef __WIDL_WIDLTYPES_H
|
#ifndef __WIDL_WIDLTYPES_H
|
||||||
#define __WIDL_WIDLTYPES_H
|
#define __WIDL_WIDLTYPES_H
|
||||||
|
@ -304,9 +77,9 @@
|
||||||
+#define max(a, b) ((a) > (b) ? a : b)
|
+#define max(a, b) ((a) > (b) ? a : b)
|
||||||
+
|
+
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
#include <assert.h>
|
||||||
#include "guiddef.h"
|
#include "guiddef.h"
|
||||||
#include "wine/rpcfc.h"
|
@@ -32,7 +39,9 @@
|
||||||
@@ -31,7 +38,9 @@
|
|
||||||
typedef GUID UUID;
|
typedef GUID UUID;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -315,9 +88,10 @@
|
||||||
+#endif
|
+#endif
|
||||||
#define FALSE 0
|
#define FALSE 0
|
||||||
|
|
||||||
#define RPC_FC_FUNCTION 0xfe
|
typedef struct _loc_info_t loc_info_t;
|
||||||
--- write_msft.c 2008-09-27 21:56:02.000000000 +0200
|
diff -u wine-1.3.4/tools/widl/write_msft.c tools/widl/write_msft.c
|
||||||
+++ write_msft.c 2008-09-27 20:49:05.000000000 +0200
|
--- wine-1.3.4/tools/widl/write_msft.c 2010-09-19 17:51:48.531250000 +0200
|
||||||
|
+++ tools/widl/write_msft.c 2010-09-26 20:23:47.000000000 +0200
|
||||||
@@ -40,10 +40,8 @@
|
@@ -40,10 +40,8 @@
|
||||||
#define NONAMELESSUNION
|
#define NONAMELESSUNION
|
||||||
#define NONAMELESSSTRUCT
|
#define NONAMELESSSTRUCT
|
||||||
|
@ -329,5 +103,5 @@
|
||||||
+#include <host/typedefs.h>
|
+#include <host/typedefs.h>
|
||||||
+#include <host/nls.h>
|
+#include <host/nls.h>
|
||||||
|
|
||||||
#include "widltypes.h"
|
#include "widl.h"
|
||||||
#include "typelib.h"
|
#include "typelib.h"
|
||||||
|
|
|
@ -39,7 +39,9 @@
|
||||||
typedef GUID UUID;
|
typedef GUID UUID;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef TRUE
|
||||||
#define TRUE 1
|
#define TRUE 1
|
||||||
|
#endif
|
||||||
#define FALSE 0
|
#define FALSE 0
|
||||||
|
|
||||||
typedef struct _loc_info_t loc_info_t;
|
typedef struct _loc_info_t loc_info_t;
|
||||||
|
|
Loading…
Reference in a new issue