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
78c8ab96
Commit
78c8ab96
authored
Sep 09, 2004
by
Mike McCormack
Committed by
Alexandre Julliard
Sep 09, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Output intermediate variables for the method to write into in stubs.
parent
ba5fe46f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
18 deletions
+33
-18
proxy.c
tools/widl/proxy.c
+33
-18
No files found.
tools/widl/proxy.c
View file @
78c8ab96
...
@@ -377,21 +377,34 @@ static void gen_proxy(type_t *iface, func_t *cur, int idx)
...
@@ -377,21 +377,34 @@ static void gen_proxy(type_t *iface, func_t *cur, int idx)
print_proxy
(
"
\n
"
);
print_proxy
(
"
\n
"
);
}
}
static
void
stub_
clear_output_var
s
(
var_t
*
arg
)
static
void
stub_
write_local
s
(
var_t
*
arg
)
{
{
int
n
=
0
;
while
(
arg
)
{
while
(
arg
)
{
print_proxy
(
"("
);
int
outptr
=
is_attr
(
arg
->
attrs
,
ATTR_OUT
);
/* create a temporary variable to store the output */
if
(
outptr
)
{
var_t
temp
;
memset
(
&
temp
,
0
,
sizeof
temp
);
temp
.
ptr_level
=
arg
->
ptr_level
-
1
;
/* dereference once */
print_proxy
(
""
);
write_type
(
proxy
,
arg
->
type
,
&
temp
,
arg
->
tname
);
fprintf
(
proxy
,
" _M%d;
\n
"
,
n
++
);
}
print_proxy
(
""
);
write_type
(
proxy
,
arg
->
type
,
arg
,
arg
->
tname
);
write_type
(
proxy
,
arg
->
type
,
arg
,
arg
->
tname
);
fprintf
(
proxy
,
"
)
"
);
fprintf
(
proxy
,
" "
);
write_name
(
proxy
,
arg
);
write_name
(
proxy
,
arg
);
fprintf
(
proxy
,
" = 0;
\n
"
);
/* if (outptr) fprintf(proxy, " = &_M%d;\n",n++); */
fprintf
(
proxy
,
";
\n
"
);
arg
=
NEXT_LINK
(
arg
);
arg
=
NEXT_LINK
(
arg
);
}
}
fprintf
(
proxy
,
"
\n
"
);
}
}
static
void
stub_unmarshall
(
var_t
*
arg
)
static
void
stub_unmarshall
(
var_t
*
arg
)
{
{
int
n
=
0
;
if
(
arg
)
{
if
(
arg
)
{
while
(
NEXT_LINK
(
arg
))
while
(
NEXT_LINK
(
arg
))
arg
=
NEXT_LINK
(
arg
);
arg
=
NEXT_LINK
(
arg
);
...
@@ -426,6 +439,12 @@ static void stub_unmarshall( var_t *arg )
...
@@ -426,6 +439,12 @@ static void stub_unmarshall( var_t *arg )
printf
(
"FIXME: arg %s has unknown type %d
\n
"
,
arg
->
name
,
type
->
type
);
printf
(
"FIXME: arg %s has unknown type %d
\n
"
,
arg
->
name
,
type
->
type
);
}
}
}
}
else
if
(
is_attr
(
arg
->
attrs
,
ATTR_OUT
))
{
print_proxy
(
""
);
write_name
(
proxy
,
arg
);
fprintf
(
proxy
,
" = &_M%d;
\n
"
,
n
);
print_proxy
(
"_M%d = 0;
\n
"
,
n
++
);
}
arg
=
PREV_LINK
(
arg
);
arg
=
PREV_LINK
(
arg
);
}
}
}
}
...
@@ -549,7 +568,7 @@ static void gen_stub(type_t *iface, func_t *cur, char *cas)
...
@@ -549,7 +568,7 @@ static void gen_stub(type_t *iface, func_t *cur, char *cas)
print_proxy
(
"IRpcStubBuffer* This,
\n
"
);
print_proxy
(
"IRpcStubBuffer* This,
\n
"
);
print_proxy
(
"IRpcChannelBuffer* pRpcChannelBuffer,
\n
"
);
print_proxy
(
"IRpcChannelBuffer* pRpcChannelBuffer,
\n
"
);
print_proxy
(
"PRPC_MESSAGE pRpcMessage,
\n
"
);
print_proxy
(
"PRPC_MESSAGE pRpcMessage,
\n
"
);
print_proxy
(
"DWORD* pdwStubPhase)
\n
"
);
print_proxy
(
"DWORD*
_
pdwStubPhase)
\n
"
);
indent
--
;
indent
--
;
print_proxy
(
"{
\n
"
);
print_proxy
(
"{
\n
"
);
indent
++
;
indent
++
;
...
@@ -561,15 +580,7 @@ static void gen_stub(type_t *iface, func_t *cur, char *cas)
...
@@ -561,15 +580,7 @@ static void gen_stub(type_t *iface, func_t *cur, char *cas)
}
}
print_proxy
(
"%s* _This = (%s*)((CStdStubBuffer*)This)->pvServerObject;
\n
"
,
iface
->
name
,
iface
->
name
);
print_proxy
(
"%s* _This = (%s*)((CStdStubBuffer*)This)->pvServerObject;
\n
"
,
iface
->
name
,
iface
->
name
);
print_proxy
(
"MIDL_STUB_MESSAGE _StubMsg;
\n
"
);
print_proxy
(
"MIDL_STUB_MESSAGE _StubMsg;
\n
"
);
arg
=
cur
->
args
;
stub_write_locals
(
cur
->
args
);
while
(
arg
)
{
print_proxy
(
""
);
write_type
(
proxy
,
arg
->
type
,
arg
,
arg
->
tname
);
fprintf
(
proxy
,
" "
);
write_name
(
proxy
,
arg
);
fprintf
(
proxy
,
";
\n
"
);
arg
=
NEXT_LINK
(
arg
);
}
fprintf
(
proxy
,
"
\n
"
);
fprintf
(
proxy
,
"
\n
"
);
/* FIXME: trace */
/* FIXME: trace */
...
@@ -580,11 +591,12 @@ static void gen_stub(type_t *iface, func_t *cur, char *cas)
...
@@ -580,11 +591,12 @@ static void gen_stub(type_t *iface, func_t *cur, char *cas)
print_proxy
(
"RpcTryFinally
\n
"
);
print_proxy
(
"RpcTryFinally
\n
"
);
print_proxy
(
"{
\n
"
);
print_proxy
(
"{
\n
"
);
indent
++
;
indent
++
;
stub_clear_output_vars
(
cur
->
args
);
stub_unmarshall
(
cur
->
args
);
stub_unmarshall
(
cur
->
args
);
fprintf
(
proxy
,
"
\n
"
);
print_proxy
(
"*pdwStubPhase = STUB_CALL_SERVER;
\n
"
);
print_proxy
(
"*_pdwStubPhase = STUB_CALL_SERVER;
\n
"
);
fprintf
(
proxy
,
"
\n
"
);
print_proxy
(
""
);
print_proxy
(
""
);
if
(
has_ret
)
fprintf
(
proxy
,
"_Ret = "
);
if
(
has_ret
)
fprintf
(
proxy
,
"_Ret = "
);
fprintf
(
proxy
,
"%s_"
,
iface
->
name
);
fprintf
(
proxy
,
"%s_"
,
iface
->
name
);
...
@@ -601,9 +613,12 @@ static void gen_stub(type_t *iface, func_t *cur, char *cas)
...
@@ -601,9 +613,12 @@ static void gen_stub(type_t *iface, func_t *cur, char *cas)
}
}
}
}
fprintf
(
proxy
,
");
\n
"
);
fprintf
(
proxy
,
");
\n
"
);
print_proxy
(
"*pdwStubPhase = STUB_MARSHAL;
\n
"
);
fprintf
(
proxy
,
"
\n
"
);
print_proxy
(
"*_pdwStubPhase = STUB_MARSHAL;
\n
"
);
fprintf
(
proxy
,
"
\n
"
);
stub_genmarshall
(
cur
->
args
);
stub_genmarshall
(
cur
->
args
);
fprintf
(
proxy
,
"
\n
"
);
if
(
has_ret
)
{
if
(
has_ret
)
{
/*
/*
...
...
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