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
94ee8e8f
Commit
94ee8e8f
authored
Feb 07, 2007
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
widl: Output endpoint information in client and server files.
parent
cc9a07f1
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
58 additions
and
0 deletions
+58
-0
client.c
tools/widl/client.c
+11
-0
server.c
tools/widl/server.c
+11
-0
typegen.c
tools/widl/typegen.c
+35
-0
typegen.h
tools/widl/typegen.h
+1
-0
No files found.
tools/widl/client.c
View file @
94ee8e8f
...
...
@@ -330,6 +330,9 @@ static void write_clientinterfacedecl(type_t *iface)
{
unsigned
long
ver
=
get_attrv
(
iface
->
attrs
,
ATTR_VERSION
);
const
UUID
*
uuid
=
get_attrp
(
iface
->
attrs
,
ATTR_UUID
);
const
str_list_t
*
endpoints
=
get_attrp
(
iface
->
attrs
,
ATTR_ENDPOINT
);
if
(
endpoints
)
write_endpoints
(
client
,
iface
->
name
,
endpoints
);
print_client
(
"static const RPC_CLIENT_INTERFACE %s___RpcClientInterface =
\n
"
,
iface
->
name
);
print_client
(
"{
\n
"
);
...
...
@@ -341,8 +344,16 @@ static void write_clientinterfacedecl(type_t *iface)
uuid
->
Data4
[
7
],
LOWORD
(
ver
),
HIWORD
(
ver
));
print_client
(
"{{0x8a885d04,0x1ceb,0x11c9,{0x9f,0xe8,0x08,0x00,0x2b,0x10,0x48,0x60}},{2,0}},
\n
"
);
/* FIXME */
print_client
(
"0,
\n
"
);
if
(
endpoints
)
{
print_client
(
"%u,
\n
"
,
list_count
(
endpoints
));
print_client
(
"(PRPC_PROTSEQ_ENDPOINT)%s__RpcProtseqEndpoint,
\n
"
,
iface
->
name
);
}
else
{
print_client
(
"0,
\n
"
);
print_client
(
"0,
\n
"
);
}
print_client
(
"0,
\n
"
);
print_client
(
"0,
\n
"
);
print_client
(
"0,
\n
"
);
...
...
tools/widl/server.c
View file @
94ee8e8f
...
...
@@ -358,6 +358,9 @@ static void write_serverinterfacedecl(type_t *iface)
{
unsigned
long
ver
=
get_attrv
(
iface
->
attrs
,
ATTR_VERSION
);
UUID
*
uuid
=
get_attrp
(
iface
->
attrs
,
ATTR_UUID
);
const
str_list_t
*
endpoints
=
get_attrp
(
iface
->
attrs
,
ATTR_ENDPOINT
);
if
(
endpoints
)
write_endpoints
(
server
,
iface
->
name
,
endpoints
);
print_server
(
"extern RPC_DISPATCH_TABLE %s_v%d_%d_DispatchTable;
\n
"
,
iface
->
name
,
LOWORD
(
ver
),
HIWORD
(
ver
));
fprintf
(
server
,
"
\n
"
);
...
...
@@ -371,8 +374,16 @@ static void write_serverinterfacedecl(type_t *iface)
uuid
->
Data4
[
7
],
LOWORD
(
ver
),
HIWORD
(
ver
));
print_server
(
"{{0x8a885d04,0x1ceb,0x11c9,{0x9f,0xe8,0x08,0x00,0x2b,0x10,0x48,0x60}},{2,0}},
\n
"
);
/* FIXME */
print_server
(
"&%s_v%d_%d_DispatchTable,
\n
"
,
iface
->
name
,
LOWORD
(
ver
),
HIWORD
(
ver
));
if
(
endpoints
)
{
print_server
(
"%u,
\n
"
,
list_count
(
endpoints
));
print_server
(
"(PRPC_PROTSEQ_ENDPOINT)%s__RpcProtseqEndpoint,
\n
"
,
iface
->
name
);
}
else
{
print_server
(
"0,
\n
"
);
print_server
(
"0,
\n
"
);
}
print_server
(
"0,
\n
"
);
print_server
(
"0,
\n
"
);
print_server
(
"0,
\n
"
);
...
...
tools/widl/typegen.c
View file @
94ee8e8f
...
...
@@ -2417,3 +2417,38 @@ void write_expr_eval_routine_list(FILE *file, const char *iface)
fprintf
(
file
,
"};
\n\n
"
);
}
void
write_endpoints
(
FILE
*
f
,
const
char
*
prefix
,
const
str_list_t
*
list
)
{
const
struct
str_list_entry_t
*
endpoint
;
const
char
*
p
;
/* this should be an array of RPC_PROTSEQ_ENDPOINT but we want const strings */
print_file
(
f
,
0
,
"static const unsigned char * %s__RpcProtseqEndpoint[][2] =
\n
{
\n
"
,
prefix
);
LIST_FOR_EACH_ENTRY
(
endpoint
,
list
,
const
struct
str_list_entry_t
,
entry
)
{
print_file
(
f
,
1
,
"{ (const unsigned char *)
\"
"
);
for
(
p
=
endpoint
->
str
;
*
p
&&
*
p
!=
':'
;
p
++
)
{
if
(
*
p
==
'"'
||
*
p
==
'\\'
)
fputc
(
'\\'
,
f
);
fputc
(
*
p
,
f
);
}
if
(
!*
p
)
goto
error
;
if
(
p
[
1
]
!=
'['
)
goto
error
;
fprintf
(
f
,
"
\"
, (const unsigned char *)
\"
"
);
for
(
p
+=
2
;
*
p
&&
*
p
!=
']'
;
p
++
)
{
if
(
*
p
==
'"'
||
*
p
==
'\\'
)
fputc
(
'\\'
,
f
);
fputc
(
*
p
,
f
);
}
if
(
*
p
!=
']'
)
goto
error
;
fprintf
(
f
,
"
\"
},
\n
"
);
}
print_file
(
f
,
0
,
"};
\n\n
"
);
return
;
error:
error
(
"Invalid endpoint syntax '%s'
\n
"
,
endpoint
->
str
);
}
tools/widl/typegen.h
View file @
94ee8e8f
...
...
@@ -49,3 +49,4 @@ void assign_stub_out_args( FILE *file, int indent, const func_t *func );
void
declare_stub_args
(
FILE
*
file
,
int
indent
,
const
func_t
*
func
);
int
write_expr_eval_routines
(
FILE
*
file
,
const
char
*
iface
);
void
write_expr_eval_routine_list
(
FILE
*
file
,
const
char
*
iface
);
void
write_endpoints
(
FILE
*
f
,
const
char
*
prefix
,
const
str_list_t
*
list
);
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