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
435e36e3
Commit
435e36e3
authored
Dec 13, 2005
by
Robert Shearman
Committed by
Alexandre Julliard
Dec 13, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
widl: Start generating type format strings.
Based on a patch by Eric Kohl.
parent
c4173f7b
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
64 additions
and
4 deletions
+64
-4
client.c
tools/widl/client.c
+1
-1
server.c
tools/widl/server.c
+1
-1
typegen.c
tools/widl/typegen.c
+61
-1
typegen.h
tools/widl/typegen.h
+1
-1
No files found.
tools/widl/client.c
View file @
435e36e3
...
...
@@ -504,7 +504,7 @@ void write_client(ifref_t *ifaces)
fprintf
(
client
,
"
\n
"
);
write_procformatstring
(
client
,
iface
->
iface
);
write_typeformatstring
(
client
);
write_typeformatstring
(
client
,
iface
->
iface
);
fprintf
(
client
,
"
\n
"
);
...
...
tools/widl/server.c
View file @
435e36e3
...
...
@@ -514,7 +514,7 @@ void write_server(ifref_t *ifaces)
fprintf
(
server
,
"
\n
"
);
write_procformatstring
(
server
,
iface
->
iface
);
write_typeformatstring
(
server
);
write_typeformatstring
(
server
,
iface
->
iface
);
fprintf
(
server
,
"
\n
"
);
...
...
tools/widl/typegen.c
View file @
435e36e3
...
...
@@ -137,9 +137,52 @@ void write_procformatstring(FILE *file, type_t *iface)
}
void
write_typeformatstring
(
FILE
*
file
)
static
void
write_typeformatstring_var
(
FILE
*
file
,
int
indent
,
var_t
*
var
)
{
int
ptr_level
=
var
->
ptr_level
;
/* basic types don't need a type format string */
if
(
ptr_level
==
0
)
return
;
if
(
ptr_level
==
1
)
{
switch
(
var
->
type
->
type
)
{
#define CASE_BASETYPE(fctype) \
case RPC_##fctype: \
print_file(file, indent, "0x11, 0x08,
/* FC_RP [simple_pointer] */
\n"); \
print_file(file, indent, "0x%02x,
/* " #fctype " */
\n", var->type->type); \
print_file(file, indent, "0x5c,
/* FC_PAD */
\n"); \
break
CASE_BASETYPE
(
FC_BYTE
);
CASE_BASETYPE
(
FC_CHAR
);
CASE_BASETYPE
(
FC_SMALL
);
CASE_BASETYPE
(
FC_USMALL
);
CASE_BASETYPE
(
FC_WCHAR
);
CASE_BASETYPE
(
FC_SHORT
);
CASE_BASETYPE
(
FC_USHORT
);
CASE_BASETYPE
(
FC_LONG
);
CASE_BASETYPE
(
FC_ULONG
);
CASE_BASETYPE
(
FC_FLOAT
);
CASE_BASETYPE
(
FC_HYPER
);
CASE_BASETYPE
(
FC_DOUBLE
);
CASE_BASETYPE
(
FC_ENUM16
);
CASE_BASETYPE
(
FC_ENUM32
);
CASE_BASETYPE
(
FC_IGNORE
);
CASE_BASETYPE
(
FC_ERROR_STATUS_T
);
default:
error
(
"write_typeformatstring_var: Unknown/unsupported type: %s (0x%02x)
\n
"
,
var
->
name
,
var
->
type
->
type
);
}
}
}
void
write_typeformatstring
(
FILE
*
file
,
type_t
*
iface
)
{
int
indent
=
0
;
func_t
*
func
=
iface
->
funcs
;
var_t
*
var
;
print_file
(
file
,
indent
,
"static const MIDL_TYPE_FORMAT_STRING __MIDL_TypeFormatString =
\n
"
);
print_file
(
file
,
indent
,
"{
\n
"
);
indent
++
;
...
...
@@ -147,6 +190,23 @@ void write_typeformatstring(FILE *file)
print_file
(
file
,
indent
,
"{
\n
"
);
indent
++
;
print_file
(
file
,
indent
,
"NdrFcShort(0x0),
\n
"
);
while
(
NEXT_LINK
(
func
))
func
=
NEXT_LINK
(
func
);
while
(
func
)
{
if
(
func
->
args
)
{
var
=
func
->
args
;
while
(
NEXT_LINK
(
var
))
var
=
NEXT_LINK
(
var
);
while
(
var
)
{
write_typeformatstring_var
(
file
,
indent
,
var
);
var
=
PREV_LINK
(
var
);
}
}
func
=
PREV_LINK
(
func
);
}
print_file
(
file
,
indent
,
"0x0
\n
"
);
indent
--
;
print_file
(
file
,
indent
,
"}
\n
"
);
...
...
tools/widl/typegen.h
View file @
435e36e3
...
...
@@ -21,7 +21,7 @@
void
write_procformatstring
(
FILE
*
file
,
type_t
*
iface
);
void
write_typeformatstring
(
FILE
*
file
);
void
write_typeformatstring
(
FILE
*
file
,
type_t
*
iface
);
unsigned
int
get_required_buffer_size
(
type_t
*
type
);
void
marshall_arguments
(
FILE
*
file
,
int
indent
,
func_t
*
func
);
void
unmarshall_arguments
(
FILE
*
file
,
int
indent
,
func_t
*
func
);
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