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
11a7b29a
Commit
11a7b29a
authored
Oct 21, 2004
by
Francois Gouget
Committed by
Alexandre Julliard
Oct 21, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Declare DO_DUMP_FUNC() before calling it and call normally so that
perl can check its prototype.
parent
0218e0af
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
44 additions
and
44 deletions
+44
-44
make_requests
tools/make_requests
+44
-44
No files found.
tools/make_requests
View file @
11a7b29a
...
...
@@ -49,6 +49,48 @@ my @trace_lines = ();
### Generate a dumping function
sub
DO_DUMP_FUNC
($$@)
{
my
$name
=
shift
;
my
$req
=
shift
;
push
@trace_lines
,
"static void dump_${name}_$req( const struct ${name}_$req *req )\n{\n"
;
while
(
$#_
>=
0
)
{
my
$type
=
shift
;
my
$var
=
shift
;
if
(
defined
(
$formats
{
$type
}))
{
if
(
$formats
{
$type
}
=~
/^&(.*)/
)
{
my
$func
=
$1
;
push
@trace_lines
,
" fprintf( stderr, \" $var=\" );\n"
;
push
@trace_lines
,
" $func( &req->$var );\n"
;
push
@trace_lines
,
" fprintf( stderr, \",\" );\n"
if
(
$#_
>
0
);
}
else
{
push
@trace_lines
,
" fprintf( stderr, \" $var=$formats{$type}"
;
push
@trace_lines
,
","
if
(
$#_
>
0
);
push
@trace_lines
,
"\", "
;
# In the case of time_t we need to cast the parameter to
# long to match the associated "%ld" printf modifier.
push
@trace_lines
,
"(long)"
if
(
$type
eq
"time_t"
);
push
@trace_lines
,
"req->$var );\n"
;
}
}
else
# must be some varargs format
{
my
$func
=
$type
;
push
@trace_lines
,
" fprintf( stderr, \" $var=\" );\n"
;
push
@trace_lines
,
" $func;\n"
;
push
@trace_lines
,
" fputc( ',', stderr );\n"
if
(
$#_
>
0
);
}
}
push
@trace_lines
,
"}\n\n"
;
}
### Parse the request definitions
sub
PARSE_REQUESTS
()
...
...
@@ -116,11 +158,11 @@ sub PARSE_REQUESTS()
# got a complete request
push
@requests
,
$name
;
&
DO_DUMP_FUNC
(
$name
,
"request"
,
@in_struct
);
DO_DUMP_FUNC
(
$name
,
"request"
,
@in_struct
);
if
(
$#out_struct
>=
0
)
{
$replies
{
$name
}
=
1
;
&
DO_DUMP_FUNC
(
$name
,
"reply"
,
@out_struct
);
DO_DUMP_FUNC
(
$name
,
"reply"
,
@out_struct
);
}
$state
=
1
;
next
;
...
...
@@ -167,48 +209,6 @@ sub PARSE_REQUESTS()
close
PROTOCOL
;
}
### Generate a dumping function
sub
DO_DUMP_FUNC
($$@)
{
my
$name
=
shift
;
my
$req
=
shift
;
push
@trace_lines
,
"static void dump_${name}_$req( const struct ${name}_$req *req )\n{\n"
;
while
(
$#_
>=
0
)
{
my
$type
=
shift
;
my
$var
=
shift
;
if
(
defined
(
$formats
{
$type
}))
{
if
(
$formats
{
$type
}
=~
/^&(.*)/
)
{
my
$func
=
$1
;
push
@trace_lines
,
" fprintf( stderr, \" $var=\" );\n"
;
push
@trace_lines
,
" $func( &req->$var );\n"
;
push
@trace_lines
,
" fprintf( stderr, \",\" );\n"
if
(
$#_
>
0
);
}
else
{
push
@trace_lines
,
" fprintf( stderr, \" $var=$formats{$type}"
;
push
@trace_lines
,
","
if
(
$#_
>
0
);
push
@trace_lines
,
"\", "
;
# In the case of time_t we need to cast the parameter to
# long to match the associated "%ld" printf modifier.
push
@trace_lines
,
"(long)"
if
(
$type
eq
"time_t"
);
push
@trace_lines
,
"req->$var );\n"
;
}
}
else
# must be some varargs format
{
my
$func
=
$type
;
push
@trace_lines
,
" fprintf( stderr, \" $var=\" );\n"
;
push
@trace_lines
,
" $func;\n"
;
push
@trace_lines
,
" fputc( ',', stderr );\n"
if
(
$#_
>
0
);
}
}
push
@trace_lines
,
"}\n\n"
;
}
### Retrieve the server protocol version from the existing server_protocol.h file
sub
GET_PROTOCOL_VERSION
()
...
...
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