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
80e26220
Commit
80e26220
authored
Dec 08, 2005
by
Eric Kohl
Committed by
Alexandre Julliard
Dec 08, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
widl: Rename some variables.
parent
1d4bec79
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
45 additions
and
45 deletions
+45
-45
client.c
tools/widl/client.c
+25
-25
server.c
tools/widl/server.c
+20
-20
No files found.
tools/widl/client.c
View file @
80e26220
...
...
@@ -67,7 +67,7 @@ static int print_client( const char *format, ... )
static
void
write_procformatstring
(
type_t
*
iface
)
{
func_t
*
cur
=
iface
->
funcs
;
func_t
*
func
=
iface
->
funcs
;
print_client
(
"static const MIDL_PROC_FORMAT_STRING __MIDL_ProcFormatString =
\n
"
);
print_client
(
"{
\n
"
);
...
...
@@ -76,10 +76,10 @@ static void write_procformatstring(type_t *iface)
print_client
(
"{
\n
"
);
indent
++
;
while
(
NEXT_LINK
(
cur
))
cur
=
NEXT_LINK
(
cur
);
while
(
cur
)
while
(
NEXT_LINK
(
func
))
func
=
NEXT_LINK
(
func
);
while
(
func
)
{
var_t
*
def
=
cur
->
def
;
var_t
*
def
=
func
->
def
;
if
(
is_void
(
def
->
type
,
NULL
))
{
...
...
@@ -92,7 +92,7 @@ static void write_procformatstring(type_t *iface)
print_client
(
"0x%02x, /* <type> */
\n
"
,
def
->
type
->
type
);
}
cur
=
PREV_LINK
(
cur
);
func
=
PREV_LINK
(
func
);
}
print_client
(
"0x0
\n
"
);
...
...
@@ -124,23 +124,23 @@ static void write_typeformatstring(void)
static
void
write_function_stubs
(
type_t
*
iface
)
{
func_t
*
cur
=
iface
->
funcs
;
char
*
handle_nam
e
=
get_attrp
(
iface
->
attrs
,
ATTR_IMPLICIT_HANDLE
);
func_t
*
func
=
iface
->
funcs
;
char
*
implicit_handl
e
=
get_attrp
(
iface
->
attrs
,
ATTR_IMPLICIT_HANDLE
);
int
method_count
=
0
;
unsigned
int
proc_offset
=
0
;
while
(
NEXT_LINK
(
cur
))
cur
=
NEXT_LINK
(
cur
);
while
(
cur
)
while
(
NEXT_LINK
(
func
))
func
=
NEXT_LINK
(
func
);
while
(
func
)
{
var_t
*
def
=
cur
->
def
;
var_t
*
def
=
func
->
def
;
write_type
(
client
,
def
->
type
,
def
,
def
->
tname
);
fprintf
(
client
,
" "
);
write_name
(
client
,
def
);
fprintf
(
client
,
"(
\n
"
);
indent
++
;
if
(
cur
->
args
)
write_args
(
client
,
cur
->
args
,
iface
->
name
,
0
,
TRUE
);
if
(
func
->
args
)
write_args
(
client
,
func
->
args
,
iface
->
name
,
0
,
TRUE
);
else
print_client
(
"void"
);
fprintf
(
client
,
")
\n
"
);
...
...
@@ -158,7 +158,7 @@ static void write_function_stubs(type_t *iface)
fprintf
(
client
,
" _RetVal;
\n
"
);
}
if
(
handle_nam
e
)
if
(
implicit_handl
e
)
print_client
(
"RPC_BINDING_HANDLE _Handle = 0;
\n
"
);
print_client
(
"RPC_MESSAGE _RpcMessage;
\n
"
);
...
...
@@ -177,8 +177,8 @@ static void write_function_stubs(type_t *iface)
indent
--
;
fprintf
(
client
,
"
\n
"
);
if
(
handle_nam
e
)
print_client
(
"_Handle = %s;
\n
"
,
handle_nam
e
);
if
(
implicit_handl
e
)
print_client
(
"_Handle = %s;
\n
"
,
implicit_handl
e
);
/* FIXME: marshal arguments */
print_client
(
"_StubMsg.BufferLength = 0UL;
\n
"
);
...
...
@@ -187,7 +187,7 @@ static void write_function_stubs(type_t *iface)
indent
++
;
print_client
(
"(PMIDL_STUB_MESSAGE)&_StubMsg,
\n
"
);
print_client
(
"_StubMsg.BufferLength,
\n
"
);
if
(
handle_nam
e
)
if
(
implicit_handl
e
)
print_client
(
"%_Handle);
\n
"
);
else
print_client
(
"%s__MIDL_AutoBindHandle);
\n
"
,
iface
->
name
);
...
...
@@ -259,7 +259,7 @@ static void write_function_stubs(type_t *iface)
fprintf
(
client
,
"
\n
"
);
method_count
++
;
cur
=
PREV_LINK
(
cur
);
func
=
PREV_LINK
(
func
);
}
}
...
...
@@ -280,7 +280,7 @@ static void write_stubdescdecl(type_t *iface)
static
void
write_stubdescriptor
(
type_t
*
iface
)
{
char
*
handle_nam
e
=
get_attrp
(
iface
->
attrs
,
ATTR_IMPLICIT_HANDLE
);
char
*
implicit_handl
e
=
get_attrp
(
iface
->
attrs
,
ATTR_IMPLICIT_HANDLE
);
print_client
(
"static const MIDL_STUB_DESC %s_StubDesc =
\n
"
,
iface
->
name
);
print_client
(
"{
\n
"
);
...
...
@@ -288,8 +288,8 @@ static void write_stubdescriptor(type_t *iface)
print_client
(
"(void __RPC_FAR *)& %s___RpcClientInterface,
\n
"
,
iface
->
name
);
print_client
(
"MIDL_user_allocate,
\n
"
);
print_client
(
"MIDL_user_free,
\n
"
);
if
(
handle_nam
e
)
print_client
(
"&%s,
\n
"
,
handle_nam
e
);
if
(
implicit_handl
e
)
print_client
(
"&%s,
\n
"
,
implicit_handl
e
);
else
print_client
(
"&%s__MIDL_AutoBindHandle,
\n
"
,
iface
->
name
);
print_client
(
"0,
\n
"
);
...
...
@@ -357,18 +357,18 @@ static void write_formatdesc( const char *str )
static
void
write_formatstringsdecl
(
type_t
*
iface
)
{
func_t
*
cur
;
func_t
*
func
;
int
byte_count
=
1
;
print_client
(
"#define TYPE_FORMAT_STRING_SIZE %d
\n
"
,
3
);
/* FIXME */
/* determine the proc format string size */
cur
=
iface
->
funcs
;
while
(
NEXT_LINK
(
cur
))
cur
=
NEXT_LINK
(
cur
);
while
(
cur
)
func
=
iface
->
funcs
;
while
(
NEXT_LINK
(
func
))
func
=
NEXT_LINK
(
func
);
while
(
func
)
{
byte_count
+=
2
;
/* FIXME: determine real size */
cur
=
PREV_LINK
(
cur
);
func
=
PREV_LINK
(
func
);
}
print_client
(
"#define PROC_FORMAT_STRING_SIZE %d
\n
"
,
byte_count
);
...
...
tools/widl/server.c
View file @
80e26220
...
...
@@ -69,7 +69,7 @@ static int print_server(const char *format, ...)
static
void
write_procformatstring
(
type_t
*
iface
)
{
func_t
*
cur
=
iface
->
funcs
;
func_t
*
func
=
iface
->
funcs
;
print_server
(
"static const MIDL_PROC_FORMAT_STRING __MIDL_ProcFormatString =
\n
"
);
print_server
(
"{
\n
"
);
...
...
@@ -78,10 +78,10 @@ static void write_procformatstring(type_t *iface)
print_server
(
"{
\n
"
);
indent
++
;
while
(
NEXT_LINK
(
cur
))
cur
=
NEXT_LINK
(
cur
);
while
(
cur
)
while
(
NEXT_LINK
(
func
))
func
=
NEXT_LINK
(
func
);
while
(
func
)
{
var_t
*
def
=
cur
->
def
;
var_t
*
def
=
func
->
def
;
if
(
is_void
(
def
->
type
,
NULL
))
{
...
...
@@ -94,7 +94,7 @@ static void write_procformatstring(type_t *iface)
print_server
(
"0x%02x, /* <type> */
\n
"
,
def
->
type
->
type
);
}
cur
=
PREV_LINK
(
cur
);
func
=
PREV_LINK
(
func
);
}
print_server
(
"0x0
\n
"
);
...
...
@@ -149,11 +149,11 @@ static unsigned int get_required_stack_size(type_t *type)
static
void
write_function_stubs
(
type_t
*
iface
)
{
func_t
*
cur
=
iface
->
funcs
;
while
(
NEXT_LINK
(
cur
))
cur
=
NEXT_LINK
(
cur
);
while
(
cur
)
func_t
*
func
=
iface
->
funcs
;
while
(
NEXT_LINK
(
func
))
func
=
NEXT_LINK
(
func
);
while
(
func
)
{
var_t
*
def
=
cur
->
def
;
var_t
*
def
=
func
->
def
;
write_type
(
server
,
def
->
type
,
def
,
def
->
tname
);
fprintf
(
server
,
" __RPC_STUB
\n
"
);
...
...
@@ -260,7 +260,7 @@ static void write_function_stubs(type_t *iface)
fprintf
(
server
,
"}
\n
"
);
fprintf
(
server
,
"
\n
"
);
cur
=
PREV_LINK
(
cur
);
func
=
PREV_LINK
(
func
);
}
}
...
...
@@ -269,22 +269,22 @@ static void write_dispatchtable(type_t *iface)
{
unsigned
long
ver
=
get_attrv
(
iface
->
attrs
,
ATTR_VERSION
);
unsigned
long
method_count
=
0
;
func_t
*
cur
=
iface
->
funcs
;
func_t
*
func
=
iface
->
funcs
;
print_server
(
"static RPC_DISPATCH_FUNCTION %s_table[] =
\n
"
,
iface
->
name
);
print_server
(
"{
\n
"
);
indent
++
;
while
(
NEXT_LINK
(
cur
))
cur
=
NEXT_LINK
(
cur
);
while
(
cur
)
while
(
NEXT_LINK
(
func
))
func
=
NEXT_LINK
(
func
);
while
(
func
)
{
var_t
*
def
=
cur
->
def
;
var_t
*
def
=
func
->
def
;
print_server
(
"%s_"
,
iface
->
name
);
write_name
(
server
,
def
);
fprintf
(
server
,
",
\n
"
);
method_count
++
;
cur
=
PREV_LINK
(
cur
);
func
=
PREV_LINK
(
func
);
}
print_server
(
"0
\n
"
);
indent
--
;
...
...
@@ -382,18 +382,18 @@ static void write_formatdesc( const char *str )
static
void
write_formatstringsdecl
(
type_t
*
iface
)
{
func_t
*
cur
;
func_t
*
func
;
int
byte_count
=
1
;
print_server
(
"#define TYPE_FORMAT_STRING_SIZE %d
\n
"
,
3
);
/* FIXME */
/* determine the proc format string size */
cur
=
iface
->
funcs
;
while
(
NEXT_LINK
(
cur
))
cur
=
NEXT_LINK
(
cur
);
while
(
cur
)
func
=
iface
->
funcs
;
while
(
NEXT_LINK
(
func
))
func
=
NEXT_LINK
(
func
);
while
(
func
)
{
byte_count
+=
2
;
/* FIXME: determine real size */
cur
=
PREV_LINK
(
cur
);
func
=
PREV_LINK
(
func
);
}
print_server
(
"#define PROC_FORMAT_STRING_SIZE %d
\n
"
,
byte_count
);
...
...
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