Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
6ae51005
Commit
6ae51005
authored
Jun 01, 2011
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
widl: Add a -O option to specify stub style.
parent
2db27725
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
3 deletions
+26
-3
typegen.c
tools/widl/typegen.c
+1
-1
widl.c
tools/widl/widl.c
+11
-2
widl.h
tools/widl/widl.h
+8
-0
widl.man.in
tools/widl/widl.man.in
+6
-0
No files found.
tools/widl/typegen.c
View file @
6ae51005
...
@@ -962,7 +962,7 @@ int is_interpreted_func( const type_t *iface, const var_t *func )
...
@@ -962,7 +962,7 @@ int is_interpreted_func( const type_t *iface, const var_t *func )
if
((
str
=
get_attrp
(
func
->
attrs
,
ATTR_OPTIMIZE
)))
return
!
strcmp
(
str
,
"i"
);
if
((
str
=
get_attrp
(
func
->
attrs
,
ATTR_OPTIMIZE
)))
return
!
strcmp
(
str
,
"i"
);
if
((
str
=
get_attrp
(
iface
->
attrs
,
ATTR_OPTIMIZE
)))
return
!
strcmp
(
str
,
"i"
);
if
((
str
=
get_attrp
(
iface
->
attrs
,
ATTR_OPTIMIZE
)))
return
!
strcmp
(
str
,
"i"
);
return
0
;
return
(
stub_mode
!=
MODE_Os
)
;
}
}
static
void
write_procformatstring_func
(
FILE
*
file
,
int
indent
,
static
void
write_procformatstring_func
(
FILE
*
file
,
int
indent
,
...
...
tools/widl/widl.c
View file @
6ae51005
...
@@ -46,7 +46,6 @@
...
@@ -46,7 +46,6 @@
/* future options to reserve characters for: */
/* future options to reserve characters for: */
/* A = ACF input filename */
/* A = ACF input filename */
/* J = do not search standard include path */
/* J = do not search standard include path */
/* O = generate interpreted stubs */
/* w = select win16/win32 output (?) */
/* w = select win16/win32 output (?) */
static
const
char
usage
[]
=
static
const
char
usage
[]
=
...
@@ -65,6 +64,7 @@ static const char usage[] =
...
@@ -65,6 +64,7 @@ static const char usage[] =
" -N Do not preprocess input
\n
"
" -N Do not preprocess input
\n
"
" --oldnames Use old naming conventions
\n
"
" --oldnames Use old naming conventions
\n
"
" -o, --output=NAME Set the output file name
\n
"
" -o, --output=NAME Set the output file name
\n
"
" -Otype Type of stubs to generate (-Os, -Oi, -Oif)
\n
"
" -p Generate proxy
\n
"
" -p Generate proxy
\n
"
" --prefix-all=p Prefix names of client stubs / server functions with 'p'
\n
"
" --prefix-all=p Prefix names of client stubs / server functions with 'p'
\n
"
" --prefix-client=p Prefix names of client stubs with 'p'
\n
"
" --prefix-client=p Prefix names of client stubs with 'p'
\n
"
...
@@ -111,6 +111,7 @@ int do_win32 = 1;
...
@@ -111,6 +111,7 @@ int do_win32 = 1;
int
do_win64
=
1
;
int
do_win64
=
1
;
int
win32_packing
=
8
;
int
win32_packing
=
8
;
int
win64_packing
=
8
;
int
win64_packing
=
8
;
enum
stub_mode
stub_mode
=
MODE_Os
;
char
*
input_name
;
char
*
input_name
;
char
*
header_name
;
char
*
header_name
;
...
@@ -156,7 +157,7 @@ enum {
...
@@ -156,7 +157,7 @@ enum {
};
};
static
const
char
short_options
[]
=
static
const
char
short_options
[]
=
"b:cC:d:D:EhH:I:m:No:pP:rsS:tT:uU:VW"
;
"b:cC:d:D:EhH:I:m:No:
O:
pP:rsS:tT:uU:VW"
;
static
const
struct
option
long_options
[]
=
{
static
const
struct
option
long_options
[]
=
{
{
"dlldata"
,
1
,
NULL
,
DLLDATA_OPTION
},
{
"dlldata"
,
1
,
NULL
,
DLLDATA_OPTION
},
{
"dlldata-only"
,
0
,
NULL
,
DLLDATA_ONLY_OPTION
},
{
"dlldata-only"
,
0
,
NULL
,
DLLDATA_ONLY_OPTION
},
...
@@ -582,6 +583,14 @@ int main(int argc,char *argv[])
...
@@ -582,6 +583,14 @@ int main(int argc,char *argv[])
case
'o'
:
case
'o'
:
output_name
=
xstrdup
(
optarg
);
output_name
=
xstrdup
(
optarg
);
break
;
break
;
case
'O'
:
if
(
!
strcmp
(
optarg
,
"s"
))
stub_mode
=
MODE_Os
;
else
if
(
!
strcmp
(
optarg
,
"i"
))
stub_mode
=
MODE_Oi
;
else
if
(
!
strcmp
(
optarg
,
"ic"
))
stub_mode
=
MODE_Oif
;
else
if
(
!
strcmp
(
optarg
,
"if"
))
stub_mode
=
MODE_Oif
;
else
if
(
!
strcmp
(
optarg
,
"icf"
))
stub_mode
=
MODE_Oif
;
else
error
(
"Invalid argument '-O%s'
\n
"
,
optarg
);
break
;
case
'p'
:
case
'p'
:
do_everything
=
0
;
do_everything
=
0
;
do_proxies
=
1
;
do_proxies
=
1
;
...
...
tools/widl/widl.h
View file @
6ae51005
...
@@ -72,6 +72,14 @@ extern time_t now;
...
@@ -72,6 +72,14 @@ extern time_t now;
extern
int
line_number
;
extern
int
line_number
;
extern
int
char_number
;
extern
int
char_number
;
enum
stub_mode
{
MODE_Os
,
/* inline stubs */
MODE_Oi
,
/* old-style interpreted stubs */
MODE_Oif
/* new-style fully interpreted stubs */
};
extern
enum
stub_mode
stub_mode
;
extern
void
write_header
(
const
statement_list_t
*
stmts
);
extern
void
write_header
(
const
statement_list_t
*
stmts
);
extern
void
write_id_data
(
const
statement_list_t
*
stmts
);
extern
void
write_id_data
(
const
statement_list_t
*
stmts
);
extern
void
write_proxies
(
const
statement_list_t
*
stmts
);
extern
void
write_proxies
(
const
statement_list_t
*
stmts
);
...
...
tools/widl/widl.man.in
View file @
6ae51005
...
@@ -59,6 +59,12 @@ Generate a UUID file. The default output filename is \fIinfile\fB_i.c\fR.
...
@@ -59,6 +59,12 @@ Generate a UUID file. The default output filename is \fIinfile\fB_i.c\fR.
.B Proxy/stub generation options:
.B Proxy/stub generation options:
.IP "\fB-c\fR"
.IP "\fB-c\fR"
Generate a client stub file. The default output filename is \fIinfile\fB_c.c\fR.
Generate a client stub file. The default output filename is \fIinfile\fB_c.c\fR.
.IP "\fB-Os\fR"
Generate inline stubs.
.IP "\fB-Oi\fR"
Generate old-style interpreted stubs.
.IP "\fB-Oif, -Oic, -Oicf\fR"
Generate new-style fully interpreted stubs.
.IP "\fB-p\fR"
.IP "\fB-p\fR"
Generate a proxy. The default output filename is \fIinfile\fB_p.c\fR.
Generate a proxy. The default output filename is \fIinfile\fB_p.c\fR.
.IP "\fB--prefix-all=\fIprefix\fR"
.IP "\fB--prefix-all=\fIprefix\fR"
...
...
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