Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
97d5f340
Commit
97d5f340
authored
Nov 07, 2009
by
Rob Shearman
Committed by
Alexandre Julliard
Nov 09, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
widl: Add support for varargs functions.
parent
cdec0fe4
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
21 additions
and
5 deletions
+21
-5
server.c
dlls/rpcrt4/tests/server.c
+3
-0
server.idl
dlls/rpcrt4/tests/server.idl
+2
-0
header.c
tools/widl/header.c
+6
-2
parser.l
tools/widl/parser.l
+1
-0
parser.y
tools/widl/parser.y
+9
-3
No files found.
dlls/rpcrt4/tests/server.c
View file @
97d5f340
...
...
@@ -42,6 +42,9 @@ static NDR_SCONTEXT (WINAPI *pNDRSContextUnmarshall2)(RPC_BINDING_HANDLE, void*,
static
RPC_STATUS
(
WINAPI
*
pRpcServerRegisterIfEx
)(
RPC_IF_HANDLE
,
UUID
*
,
RPC_MGR_EPV
*
,
unsigned
int
,
unsigned
int
,
RPC_IF_CALLBACK_FN
*
);
/* type check statements generated in header file */
fnprintf
*
p_printf
=
printf
;
static
void
InitFunctionPointers
(
void
)
{
HMODULE
hrpcrt4
=
GetModuleHandleA
(
"rpcrt4.dll"
);
...
...
dlls/rpcrt4/tests/server.idl
View file @
97d5f340
...
...
@@ -27,6 +27,8 @@ typedef struct tag_vector
int
z
;
}
vector_t
;
typedef
int
fnprintf
(
const
char
*
format
,
...
)
;
[
uuid
(
00000000
-
4114
-
0704
-
2301
-
000000000000
),
#
ifndef
__midl
...
...
tools/widl/header.c
View file @
97d5f340
...
...
@@ -348,11 +348,12 @@ void write_type_right(FILE *h, type_t *t, int is_field)
static
void
write_type_v
(
FILE
*
h
,
type_t
*
t
,
int
is_field
,
int
declonly
,
const
char
*
name
)
{
type_t
*
pt
;
type_t
*
pt
=
NULL
;
int
ptr_level
=
0
;
if
(
!
h
)
return
;
if
(
t
)
{
for
(
pt
=
t
;
is_ptr
(
pt
);
pt
=
type_pointer_get_ref
(
pt
),
ptr_level
++
)
;
...
...
@@ -369,9 +370,11 @@ static void write_type_v(FILE *h, type_t *t, int is_field, int declonly, const c
fputc
(
'*'
,
h
);
}
else
write_type_left
(
h
,
t
,
declonly
);
}
if
(
name
)
fprintf
(
h
,
"%s%s"
,
needs_space_after
(
t
)
?
" "
:
""
,
name
);
if
(
name
)
fprintf
(
h
,
"%s%s"
,
!
t
||
needs_space_after
(
t
)
?
" "
:
""
,
name
);
if
(
t
)
{
if
(
type_get_type_detect_alias
(
pt
)
==
TYPE_FUNCTION
)
{
const
var_list_t
*
args
=
type_function_get_args
(
pt
);
...
...
@@ -384,6 +387,7 @@ static void write_type_v(FILE *h, type_t *t, int is_field, int declonly, const c
fputc
(
')'
,
h
);
}
else
write_type_right
(
h
,
t
,
is_field
);
}
}
void
write_type_def_or_decl
(
FILE
*
f
,
type_t
*
t
,
int
field
,
const
char
*
name
)
...
...
tools/widl/parser.l
View file @
97d5f340
...
...
@@ -193,6 +193,7 @@ SAFEARRAY{ws}*/\( return tSAFEARRAY;
<INITIAL,ATTR>\<= return LESSEQUAL;
<INITIAL,ATTR>\|\| return LOGICALOR;
<INITIAL,ATTR>&& return LOGICALAND;
<INITIAL,ATTR>\.\.\. return ELLIPSIS;
<INITIAL,ATTR>. return yytext[0];
<<EOF>> {
if (import_stack_ptr)
...
...
tools/widl/parser.y
View file @
97d5f340
...
...
@@ -194,6 +194,7 @@ static statement_list_t *append_statement(statement_list_t *list, statement_t *s
%token EQUALITY INEQUALITY
%token GREATEREQUAL LESSEQUAL
%token LOGICALOR LOGICALAND
%token ELLIPSIS
%token tAGGREGATABLE tALLOCATE tANNOTATION tAPPOBJECT tASYNC tASYNCUUID
%token tAUTOHANDLE tBINDABLE tBOOLEAN tBROADCAST tBYTE tBYTECOUNT
%token tCALLAS tCALLBACK tCASE tCDECL tCHAR tCOCLASS tCODE tCOMMSTATUS
...
...
@@ -292,7 +293,8 @@ static statement_list_t *append_statement(statement_list_t *list, statement_t *s
%type <ifref> coclass_int
%type <ifref_list> coclass_ints
%type <var> arg ne_union_field union_field s_field case enum declaration
%type <var_list> m_args args fields ne_union_fields cases enums enum_list dispint_props field
%type <var_list> m_args arg_list args
%type <var_list> fields ne_union_fields cases enums enum_list dispint_props field
%type <var> m_ident ident
%type <declarator> declarator direct_declarator init_declarator struct_declarator
%type <declarator> m_any_declarator any_declarator any_declarator_no_ident any_direct_declarator
...
...
@@ -426,8 +428,12 @@ m_args: { $$ = NULL; }
| args
;
args: arg { check_arg_attrs($1); $$ = append_var( NULL, $1 ); }
| args ',' arg { check_arg_attrs($3); $$ = append_var( $1, $3); }
arg_list: arg { check_arg_attrs($1); $$ = append_var( NULL, $1 ); }
| arg_list ',' arg { check_arg_attrs($3); $$ = append_var( $1, $3 ); }
;
args: arg_list
| arg_list ',' ELLIPSIS { $$ = append_var( $1, make_var(strdup("...")) ); }
;
/* split into two rules to get bison to resolve a tVOID conflict */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment