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
f1bb0a47
Commit
f1bb0a47
authored
Feb 07, 2006
by
Robert Shearman
Committed by
Alexandre Julliard
Feb 07, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
widl: Yet more const attributes.
parent
511463f3
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
30 additions
and
30 deletions
+30
-30
client.c
tools/widl/client.c
+9
-9
header.c
tools/widl/header.c
+5
-5
header.h
tools/widl/header.h
+2
-2
proxy.c
tools/widl/proxy.c
+3
-3
server.c
tools/widl/server.c
+7
-7
typegen.c
tools/widl/typegen.c
+2
-2
typegen.h
tools/widl/typegen.h
+2
-2
No files found.
tools/widl/client.c
View file @
f1bb0a47
...
...
@@ -66,13 +66,13 @@ static int print_client( const char *format, ... )
}
static
void
print_message_buffer_size
(
func_t
*
func
)
static
void
print_message_buffer_size
(
const
func_t
*
func
)
{
unsigned
int
total_size
=
0
;
if
(
func
->
args
)
{
var_t
*
var
=
func
->
args
;
const
var_t
*
var
=
func
->
args
;
while
(
NEXT_LINK
(
var
))
var
=
NEXT_LINK
(
var
);
while
(
var
)
{
...
...
@@ -90,8 +90,8 @@ static void print_message_buffer_size(func_t *func)
static
void
write_function_stubs
(
type_t
*
iface
)
{
func_t
*
func
=
iface
->
funcs
;
char
*
implicit_handle
=
get_attrp
(
iface
->
attrs
,
ATTR_IMPLICIT_HANDLE
);
const
func_t
*
func
=
iface
->
funcs
;
c
onst
c
har
*
implicit_handle
=
get_attrp
(
iface
->
attrs
,
ATTR_IMPLICIT_HANDLE
);
int
explicit_handle
=
is_attr
(
iface
->
attrs
,
ATTR_EXPLICIT_HANDLE
);
var_t
*
var
;
int
method_count
=
0
;
...
...
@@ -101,8 +101,8 @@ static void write_function_stubs(type_t *iface)
while
(
NEXT_LINK
(
func
))
func
=
NEXT_LINK
(
func
);
while
(
func
)
{
var_t
*
def
=
func
->
def
;
var_t
*
explicit_handle_var
;
const
var_t
*
def
=
func
->
def
;
const
var_t
*
explicit_handle_var
;
unsigned
int
type_offset_func
;
/* check for a defined binding handle */
...
...
@@ -301,7 +301,7 @@ static void write_stubdescdecl(type_t *iface)
static
void
write_stubdescriptor
(
type_t
*
iface
,
int
expr_eval_routines
)
{
char
*
implicit_handle
=
get_attrp
(
iface
->
attrs
,
ATTR_IMPLICIT_HANDLE
);
c
onst
c
har
*
implicit_handle
=
get_attrp
(
iface
->
attrs
,
ATTR_IMPLICIT_HANDLE
);
print_client
(
"static const MIDL_STUB_DESC %s_StubDesc =
\n
"
,
iface
->
name
);
print_client
(
"{
\n
"
);
...
...
@@ -341,7 +341,7 @@ static void write_stubdescriptor(type_t *iface, int expr_eval_routines)
static
void
write_clientinterfacedecl
(
type_t
*
iface
)
{
unsigned
long
ver
=
get_attrv
(
iface
->
attrs
,
ATTR_VERSION
);
UUID
*
uuid
=
get_attrp
(
iface
->
attrs
,
ATTR_UUID
);
const
UUID
*
uuid
=
get_attrp
(
iface
->
attrs
,
ATTR_UUID
);
print_client
(
"static const RPC_CLIENT_INTERFACE %s___RpcClientInterface =
\n
"
,
iface
->
name
);
print_client
(
"{
\n
"
);
...
...
@@ -423,7 +423,7 @@ static void write_formatstringsdecl(type_t *iface)
static
void
write_implicithandledecl
(
type_t
*
iface
)
{
char
*
implicit_handle
=
get_attrp
(
iface
->
attrs
,
ATTR_IMPLICIT_HANDLE
);
c
onst
c
har
*
implicit_handle
=
get_attrp
(
iface
->
attrs
,
ATTR_IMPLICIT_HANDLE
);
if
(
implicit_handle
)
{
...
...
tools/widl/header.c
View file @
f1bb0a47
...
...
@@ -491,16 +491,16 @@ void write_externdef(const var_t *v)
}
void
write_library
(
const
char
*
name
,
attr_t
*
attr
)
{
UUID
*
uuid
=
get_attrp
(
attr
,
ATTR_UUID
);
const
UUID
*
uuid
=
get_attrp
(
attr
,
ATTR_UUID
);
fprintf
(
header
,
"
\n
"
);
write_guid
(
"LIBID"
,
name
,
uuid
);
fprintf
(
header
,
"
\n
"
);
}
var_t
*
get_explicit_handle_var
(
func_t
*
func
)
const
var_t
*
get_explicit_handle_var
(
const
func_t
*
func
)
{
var_t
*
var
;
const
var_t
*
var
;
if
(
!
func
->
args
)
return
NULL
;
...
...
@@ -535,7 +535,7 @@ int is_local(attr_t *a)
return
is_attr
(
a
,
ATTR_LOCAL
);
}
var_t
*
is_callas
(
attr_t
*
a
)
const
var_t
*
is_callas
(
attr_t
*
a
)
{
return
get_attrp
(
a
,
ATTR_CALLAS
);
}
...
...
@@ -893,7 +893,7 @@ static void write_com_interface(type_t *iface)
static
void
write_rpc_interface
(
const
type_t
*
iface
)
{
unsigned
long
ver
=
get_attrv
(
iface
->
attrs
,
ATTR_VERSION
);
char
*
var
=
get_attrp
(
iface
->
attrs
,
ATTR_IMPLICIT_HANDLE
);
c
onst
c
har
*
var
=
get_attrp
(
iface
->
attrs
,
ATTR_IMPLICIT_HANDLE
);
if
(
!
iface
->
funcs
)
return
;
...
...
tools/widl/header.h
View file @
f1bb0a47
...
...
@@ -30,7 +30,7 @@ extern const char* get_name(const var_t *v);
extern
void
write_type
(
FILE
*
h
,
type_t
*
t
,
const
var_t
*
v
,
const
char
*
n
);
extern
int
is_object
(
attr_t
*
a
);
extern
int
is_local
(
attr_t
*
a
);
extern
var_t
*
is_callas
(
attr_t
*
a
);
extern
const
var_t
*
is_callas
(
attr_t
*
a
);
extern
void
write_args
(
FILE
*
h
,
var_t
*
arg
,
const
char
*
name
,
int
obj
,
int
do_indent
);
extern
void
write_array
(
FILE
*
h
,
const
expr_t
*
v
,
int
field
);
extern
void
write_forward
(
type_t
*
iface
);
...
...
@@ -43,7 +43,7 @@ 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
);
extern
void
write_user_types
(
void
);
extern
var_t
*
get_explicit_handle_var
(
func_t
*
func
);
extern
const
var_t
*
get_explicit_handle_var
(
const
func_t
*
func
);
static
inline
int
is_string_type
(
const
attr_t
*
attrs
,
int
ptr_level
,
const
expr_t
*
array
)
{
...
...
tools/widl/proxy.c
View file @
f1bb0a47
...
...
@@ -889,13 +889,13 @@ static void write_proxy(type_t *iface)
fprintf
(
proxy
,
" * %s interface
\n
"
,
iface
->
name
);
fprintf
(
proxy
,
" */
\n
"
);
while
(
cur
)
{
var_t
*
def
=
cur
->
def
;
const
var_t
*
def
=
cur
->
def
;
if
(
!
is_local
(
def
->
attrs
))
{
var_t
*
cas
=
is_callas
(
def
->
attrs
);
const
var_t
*
cas
=
is_callas
(
def
->
attrs
);
const
char
*
cname
=
cas
?
cas
->
name
:
NULL
;
int
idx
=
cur
->
idx
;
if
(
cname
)
{
func_t
*
m
=
iface
->
funcs
;
const
func_t
*
m
=
iface
->
funcs
;
while
(
m
&&
strcmp
(
get_name
(
m
->
def
),
cname
))
m
=
NEXT_LINK
(
m
);
idx
=
m
->
idx
;
...
...
tools/widl/server.c
View file @
f1bb0a47
...
...
@@ -68,9 +68,9 @@ static int print_server(const char *format, ...)
}
static
void
write_parameters_init
(
func_t
*
func
)
static
void
write_parameters_init
(
const
func_t
*
func
)
{
var_t
*
var
;
const
var_t
*
var
;
if
(
!
func
->
args
)
return
;
...
...
@@ -91,16 +91,16 @@ static void write_function_stubs(type_t *iface)
{
char
*
implicit_handle
=
get_attrp
(
iface
->
attrs
,
ATTR_IMPLICIT_HANDLE
);
int
explicit_handle
=
is_attr
(
iface
->
attrs
,
ATTR_EXPLICIT_HANDLE
);
func_t
*
func
=
iface
->
funcs
;
var_t
*
var
;
var_t
*
explicit_handle_var
;
const
func_t
*
func
=
iface
->
funcs
;
const
var_t
*
var
;
const
var_t
*
explicit_handle_var
;
unsigned
int
proc_offset
=
0
;
unsigned
int
type_offset
=
2
;
while
(
NEXT_LINK
(
func
))
func
=
NEXT_LINK
(
func
);
while
(
func
)
{
var_t
*
def
=
func
->
def
;
const
var_t
*
def
=
func
->
def
;
unsigned
long
buffer_size
=
0
;
unsigned
int
type_offset_func
;
...
...
@@ -260,7 +260,7 @@ static void write_function_stubs(type_t *iface)
if
(
func
->
args
)
{
var_t
*
var
=
func
->
args
;
const
var_t
*
var
=
func
->
args
;
while
(
NEXT_LINK
(
var
))
var
=
NEXT_LINK
(
var
);
while
(
var
)
{
...
...
tools/widl/typegen.c
View file @
f1bb0a47
...
...
@@ -1338,7 +1338,7 @@ unsigned int get_required_buffer_size(const var_t *var, unsigned int *alignment)
return
get_required_buffer_size_type
(
var
->
type
,
var
->
ptr_level
,
var
->
array
,
var
->
name
,
alignment
);
}
void
marshall_arguments
(
FILE
*
file
,
int
indent
,
func_t
*
func
,
void
marshall_arguments
(
FILE
*
file
,
int
indent
,
const
func_t
*
func
,
unsigned
int
*
type_offset
,
enum
pass
pass
)
{
unsigned
int
last_size
=
0
;
...
...
@@ -1533,7 +1533,7 @@ void marshall_arguments(FILE *file, int indent, func_t *func,
}
}
void
unmarshall_arguments
(
FILE
*
file
,
int
indent
,
func_t
*
func
,
void
unmarshall_arguments
(
FILE
*
file
,
int
indent
,
const
func_t
*
func
,
unsigned
int
*
type_offset
,
enum
pass
pass
)
{
unsigned
int
last_size
=
0
;
...
...
tools/widl/typegen.h
View file @
f1bb0a47
...
...
@@ -30,8 +30,8 @@ enum pass
void
write_procformatstring
(
FILE
*
file
,
type_t
*
iface
);
void
write_typeformatstring
(
FILE
*
file
,
type_t
*
iface
);
unsigned
int
get_required_buffer_size
(
const
var_t
*
var
,
unsigned
int
*
alignment
);
void
marshall_arguments
(
FILE
*
file
,
int
indent
,
func_t
*
func
,
unsigned
int
*
type_offset
,
enum
pass
pass
);
void
unmarshall_arguments
(
FILE
*
file
,
int
indent
,
func_t
*
func
,
unsigned
int
*
type_offset
,
enum
pass
pass
);
void
marshall_arguments
(
FILE
*
file
,
int
indent
,
const
func_t
*
func
,
unsigned
int
*
type_offset
,
enum
pass
pass
);
void
unmarshall_arguments
(
FILE
*
file
,
int
indent
,
const
func_t
*
func
,
unsigned
int
*
type_offset
,
enum
pass
pass
);
size_t
get_size_procformatstring_var
(
const
var_t
*
var
);
size_t
get_size_typeformatstring_var
(
const
var_t
*
var
);
int
write_expr_eval_routines
(
FILE
*
file
,
const
char
*
iface
);
...
...
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