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
f5baddf8
Commit
f5baddf8
authored
Jun 05, 2007
by
Dan Hipschman
Committed by
Alexandre Julliard
Jun 06, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
widl: Replace get_name with a field reference.
parent
6cf8e6bd
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
13 deletions
+7
-13
header.c
tools/widl/header.c
+6
-11
header.h
tools/widl/header.h
+0
-1
proxy.c
tools/widl/proxy.c
+1
-1
No files found.
tools/widl/header.c
View file @
f5baddf8
...
...
@@ -141,11 +141,6 @@ void write_prefix_name(FILE *h, const char *prefix, const var_t *v)
write_name
(
h
,
v
);
}
const
char
*
get_name
(
const
var_t
*
v
)
{
return
v
->
name
;
}
void
write_array
(
FILE
*
h
,
array_dims_t
*
dims
,
int
field
)
{
expr_t
*
v
;
...
...
@@ -170,7 +165,7 @@ static void write_field(FILE *h, var_t *v)
if
(
v
->
type
)
{
indent
(
h
,
0
);
write_type
(
h
,
v
->
type
);
if
(
get_name
(
v
)
)
if
(
v
->
name
)
fprintf
(
h
,
" %s"
,
v
->
name
);
else
{
/* not all C/C++ compilers support anonymous structs and unions */
...
...
@@ -210,7 +205,7 @@ static void write_enums(FILE *h, var_list_t *enums)
if
(
!
enums
)
return
;
LIST_FOR_EACH_ENTRY
(
v
,
enums
,
var_t
,
entry
)
{
if
(
get_name
(
v
)
)
{
if
(
v
->
name
)
{
indent
(
h
,
0
);
write_name
(
h
,
v
);
if
(
v
->
eval
)
{
...
...
@@ -444,7 +439,7 @@ void write_expr(FILE *h, const expr_t *e, int brackets)
void
write_constdef
(
const
var_t
*
v
)
{
fprintf
(
header
,
"#define %s ("
,
get_name
(
v
)
);
fprintf
(
header
,
"#define %s ("
,
v
->
name
);
write_expr
(
header
,
v
->
eval
,
0
);
fprintf
(
header
,
")
\n\n
"
);
}
...
...
@@ -453,7 +448,7 @@ void write_externdef(const var_t *v)
{
fprintf
(
header
,
"extern const "
);
write_type
(
header
,
v
->
type
);
if
(
get_name
(
v
)
)
if
(
v
->
name
)
fprintf
(
header
,
" %s"
,
v
->
name
);
fprintf
(
header
,
";
\n\n
"
);
}
...
...
@@ -688,7 +683,7 @@ static void write_method_proto(const type_t *iface)
if
(
cas
)
{
const
func_t
*
m
;
LIST_FOR_EACH_ENTRY
(
m
,
iface
->
funcs
,
const
func_t
,
entry
)
if
(
!
strcmp
(
get_name
(
m
->
def
)
,
cas
->
name
))
break
;
if
(
!
strcmp
(
m
->
def
->
name
,
cas
->
name
))
break
;
if
(
&
m
->
entry
!=
iface
->
funcs
)
{
const
var_t
*
mdef
=
m
->
def
;
/* proxy prototype - use local prototype */
...
...
@@ -707,7 +702,7 @@ static void write_method_proto(const type_t *iface)
fprintf
(
header
,
");
\n
"
);
}
else
{
parser_warning
(
"invalid call_as attribute (%s -> %s)
\n
"
,
get_name
(
def
)
,
cas
->
name
);
parser_warning
(
"invalid call_as attribute (%s -> %s)
\n
"
,
def
->
name
,
cas
->
name
);
}
}
}
...
...
tools/widl/header.h
View file @
f5baddf8
...
...
@@ -32,7 +32,6 @@ extern int is_conformant_array( const array_dims_t *array );
extern
int
is_non_void
(
const
expr_list_t
*
list
);
extern
void
write_name
(
FILE
*
h
,
const
var_t
*
v
);
extern
void
write_prefix_name
(
FILE
*
h
,
const
char
*
prefix
,
const
var_t
*
v
);
extern
const
char
*
get_name
(
const
var_t
*
v
);
extern
void
write_type
(
FILE
*
h
,
type_t
*
t
);
extern
int
is_object
(
const
attr_list_t
*
list
);
extern
int
is_local
(
const
attr_list_t
*
list
);
...
...
tools/widl/proxy.c
View file @
f5baddf8
...
...
@@ -507,7 +507,7 @@ static void write_proxy(type_t *iface, unsigned int *proc_offset)
if
(
cname
)
{
const
func_t
*
m
;
LIST_FOR_EACH_ENTRY
(
m
,
iface
->
funcs
,
const
func_t
,
entry
)
if
(
!
strcmp
(
get_name
(
m
->
def
)
,
cname
))
if
(
!
strcmp
(
m
->
def
->
name
,
cname
))
{
idx
=
m
->
idx
;
break
;
...
...
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