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
ae94c220
Commit
ae94c220
authored
Dec 31, 2005
by
Robert Shearman
Committed by
Alexandre Julliard
Dec 31, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
widl: Export the bracket adding functionality of do_write_expr outside
of header.c.
parent
b7270b8c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
25 deletions
+20
-25
header.c
tools/widl/header.c
+16
-21
header.h
tools/widl/header.h
+1
-1
proxy.c
tools/widl/proxy.c
+3
-3
No files found.
tools/widl/header.c
View file @
ae94c220
...
...
@@ -189,7 +189,7 @@ static void write_enums(FILE *h, var_t *v)
write_name
(
h
,
v
);
if
(
v
->
eval
)
{
fprintf
(
h
,
" = "
);
write_expr
(
h
,
v
->
eval
);
write_expr
(
h
,
v
->
eval
,
0
);
}
}
if
(
PREV_LINK
(
v
))
...
...
@@ -399,7 +399,7 @@ void write_typedef(type_t *type, const var_t *names)
fprintf
(
header
,
";
\n
"
);
}
static
void
do_write_expr
(
FILE
*
h
,
expr_t
*
e
,
int
p
)
void
write_expr
(
FILE
*
h
,
const
expr_t
*
e
,
int
brackets
)
{
switch
(
e
->
type
)
{
case
EXPR_VOID
:
...
...
@@ -415,21 +415,21 @@ static void do_write_expr(FILE *h, expr_t *e, int p)
break
;
case
EXPR_NEG
:
fprintf
(
h
,
"-"
);
do_
write_expr
(
h
,
e
->
ref
,
1
);
write_expr
(
h
,
e
->
ref
,
1
);
break
;
case
EXPR_NOT
:
fprintf
(
h
,
"~"
);
do_
write_expr
(
h
,
e
->
ref
,
1
);
write_expr
(
h
,
e
->
ref
,
1
);
break
;
case
EXPR_PPTR
:
fprintf
(
h
,
"*"
);
do_
write_expr
(
h
,
e
->
ref
,
1
);
write_expr
(
h
,
e
->
ref
,
1
);
break
;
case
EXPR_CAST
:
fprintf
(
h
,
"("
);
write_type
(
h
,
e
->
u
.
tref
->
ref
,
NULL
,
e
->
u
.
tref
->
name
);
fprintf
(
h
,
")"
);
do_
write_expr
(
h
,
e
->
ref
,
1
);
write_expr
(
h
,
e
->
ref
,
1
);
break
;
case
EXPR_SIZEOF
:
fprintf
(
h
,
"sizeof("
);
...
...
@@ -444,8 +444,8 @@ static void do_write_expr(FILE *h, expr_t *e, int p)
case
EXPR_SUB
:
case
EXPR_AND
:
case
EXPR_OR
:
if
(
p
)
fprintf
(
h
,
"("
);
do_
write_expr
(
h
,
e
->
ref
,
1
);
if
(
brackets
)
fprintf
(
h
,
"("
);
write_expr
(
h
,
e
->
ref
,
1
);
switch
(
e
->
type
)
{
case
EXPR_SHL
:
fprintf
(
h
,
" << "
);
break
;
case
EXPR_SHR
:
fprintf
(
h
,
" >> "
);
break
;
...
...
@@ -457,30 +457,25 @@ static void do_write_expr(FILE *h, expr_t *e, int p)
case
EXPR_OR
:
fprintf
(
h
,
" | "
);
break
;
default:
break
;
}
do_
write_expr
(
h
,
e
->
u
.
ext
,
1
);
if
(
p
)
fprintf
(
h
,
")"
);
write_expr
(
h
,
e
->
u
.
ext
,
1
);
if
(
brackets
)
fprintf
(
h
,
")"
);
break
;
case
EXPR_COND
:
if
(
p
)
fprintf
(
h
,
"("
);
do_
write_expr
(
h
,
e
->
ref
,
1
);
if
(
brackets
)
fprintf
(
h
,
"("
);
write_expr
(
h
,
e
->
ref
,
1
);
fprintf
(
h
,
" ? "
);
do_
write_expr
(
h
,
e
->
u
.
ext
,
1
);
write_expr
(
h
,
e
->
u
.
ext
,
1
);
fprintf
(
h
,
" : "
);
do_
write_expr
(
h
,
e
->
ext2
,
1
);
if
(
p
)
fprintf
(
h
,
")"
);
write_expr
(
h
,
e
->
ext2
,
1
);
if
(
brackets
)
fprintf
(
h
,
")"
);
break
;
}
}
void
write_expr
(
FILE
*
h
,
expr_t
*
e
)
{
do_write_expr
(
h
,
e
,
0
);
}
void
write_constdef
(
const
var_t
*
v
)
{
fprintf
(
header
,
"#define %s ("
,
get_name
(
v
));
write_expr
(
header
,
v
->
eval
);
write_expr
(
header
,
v
->
eval
,
0
);
fprintf
(
header
,
")
\n\n
"
);
}
...
...
tools/widl/header.h
View file @
ae94c220
...
...
@@ -38,7 +38,7 @@ extern void write_interface(type_t *iface);
extern
void
write_dispinterface
(
type_t
*
iface
);
extern
void
write_coclass
(
class_t
*
iface
);
extern
void
write_typedef
(
type_t
*
type
,
const
var_t
*
names
);
extern
void
write_expr
(
FILE
*
h
,
expr_t
*
e
);
extern
void
write_expr
(
FILE
*
h
,
const
expr_t
*
e
,
int
brackets
);
extern
void
write_constdef
(
const
var_t
*
v
);
extern
void
write_externdef
(
const
var_t
*
v
);
extern
void
write_library
(
const
char
*
name
,
attr_t
*
attr
);
...
...
tools/widl/proxy.c
View file @
ae94c220
...
...
@@ -213,7 +213,7 @@ static void marshall_size_arg( var_t *arg )
if
(
expr
)
{
print_proxy
(
"_StubMsg.MaxCount = "
,
arg
->
name
);
write_expr
(
proxy
,
expr
);
write_expr
(
proxy
,
expr
,
0
);
fprintf
(
proxy
,
";
\n\n
"
);
print_proxy
(
"NdrConformantArrayBufferSize( &_StubMsg, (unsigned char*)%s, "
,
arg
->
name
);
fprintf
(
proxy
,
"&__MIDL_TypeFormatString.Format[%d]);
\n
"
,
index
);
...
...
@@ -305,7 +305,7 @@ static void marshall_copy_arg( var_t *arg )
if
(
expr
)
{
print_proxy
(
"_StubMsg.MaxCount = "
,
arg
->
name
);
write_expr
(
proxy
,
expr
);
write_expr
(
proxy
,
expr
,
0
);
fprintf
(
proxy
,
";
\n\n
"
);
print_proxy
(
"NdrConformantArrayMarshall( &_StubMsg, (unsigned char*)%s, "
,
arg
->
name
);
fprintf
(
proxy
,
"&__MIDL_TypeFormatString.Format[%d]);
\n
"
,
index
);
...
...
@@ -494,7 +494,7 @@ static void free_variable( var_t *arg )
if
(
expr
)
{
print_proxy
(
"_StubMsg.MaxCount = "
,
arg
->
name
);
write_expr
(
proxy
,
expr
);
write_expr
(
proxy
,
expr
,
0
);
fprintf
(
proxy
,
";
\n\n
"
);
print_proxy
(
"NdrClearOutParameters( &_StubMsg, "
);
fprintf
(
proxy
,
"&__MIDL_TypeFormatString.Format[%d], "
,
index
);
...
...
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