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
b7e7243a
Commit
b7e7243a
authored
Aug 16, 2006
by
Dan Hipschman
Committed by
Alexandre Julliard
Aug 17, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
widl: Move format-string declaration output to typegen.c.
parent
cf649262
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
30 additions
and
63 deletions
+30
-63
client.c
tools/widl/client.c
+1
-32
server.c
tools/widl/server.c
+1
-31
typegen.c
tools/widl/typegen.c
+27
-0
typegen.h
tools/widl/typegen.h
+1
-0
No files found.
tools/widl/client.c
View file @
b7e7243a
...
...
@@ -395,37 +395,6 @@ static void write_clientinterfacedecl(type_t *iface)
}
static
void
write_formatdesc
(
const
char
*
str
)
{
print_client
(
"typedef struct _MIDL_%s_FORMAT_STRING
\n
"
,
str
);
print_client
(
"{
\n
"
);
indent
++
;
print_client
(
"short Pad;
\n
"
);
print_client
(
"unsigned char Format[%s_FORMAT_STRING_SIZE];
\n
"
,
str
);
indent
--
;
print_client
(
"} MIDL_%s_FORMAT_STRING;
\n
"
,
str
);
print_client
(
"
\n
"
);
}
static
void
write_formatstringsdecl
(
ifref_t
*
ifaces
)
{
print_client
(
"#define TYPE_FORMAT_STRING_SIZE %d
\n
"
,
get_size_typeformatstring
(
ifaces
));
print_client
(
"#define PROC_FORMAT_STRING_SIZE %d
\n
"
,
get_size_procformatstring
(
ifaces
));
fprintf
(
client
,
"
\n
"
);
write_formatdesc
(
"TYPE"
);
write_formatdesc
(
"PROC"
);
fprintf
(
client
,
"
\n
"
);
print_client
(
"static const MIDL_TYPE_FORMAT_STRING __MIDL_TypeFormatString;
\n
"
);
print_client
(
"static const MIDL_PROC_FORMAT_STRING __MIDL_ProcFormatString;
\n
"
);
print_client
(
"
\n
"
);
}
static
void
write_implicithandledecl
(
type_t
*
iface
)
{
const
char
*
implicit_handle
=
get_attrp
(
iface
->
attrs
,
ATTR_IMPLICIT_HANDLE
);
...
...
@@ -471,7 +440,7 @@ void write_client(ifref_t *ifaces)
if
(
!
client
)
return
;
write_formatstringsdecl
(
ifaces
);
write_formatstringsdecl
(
client
,
indent
,
ifaces
);
for
(;
iface
;
iface
=
PREV_LINK
(
iface
))
{
...
...
tools/widl/server.c
View file @
b7e7243a
...
...
@@ -550,36 +550,6 @@ static void write_serverinterfacedecl(type_t *iface)
fprintf
(
server
,
"
\n
"
);
}
static
void
write_formatdesc
(
const
char
*
str
)
{
print_server
(
"typedef struct _MIDL_%s_FORMAT_STRING
\n
"
,
str
);
print_server
(
"{
\n
"
);
indent
++
;
print_server
(
"short Pad;
\n
"
);
print_server
(
"unsigned char Format[%s_FORMAT_STRING_SIZE];
\n
"
,
str
);
indent
--
;
print_server
(
"} MIDL_%s_FORMAT_STRING;
\n
"
,
str
);
print_server
(
"
\n
"
);
}
static
void
write_formatstringsdecl
(
ifref_t
*
ifaces
)
{
print_server
(
"#define TYPE_FORMAT_STRING_SIZE %d
\n
"
,
get_size_typeformatstring
(
ifaces
));
print_server
(
"#define PROC_FORMAT_STRING_SIZE %d
\n
"
,
get_size_procformatstring
(
ifaces
));
fprintf
(
server
,
"
\n
"
);
write_formatdesc
(
"TYPE"
);
write_formatdesc
(
"PROC"
);
fprintf
(
server
,
"
\n
"
);
print_server
(
"static const MIDL_TYPE_FORMAT_STRING __MIDL_TypeFormatString;
\n
"
);
print_server
(
"static const MIDL_PROC_FORMAT_STRING __MIDL_ProcFormatString;
\n
"
);
print_server
(
"
\n
"
);
}
static
void
init_server
(
void
)
{
...
...
@@ -612,7 +582,7 @@ void write_server(ifref_t *ifaces)
if
(
!
server
)
return
;
write_formatstringsdecl
(
ifaces
);
write_formatstringsdecl
(
server
,
indent
,
ifaces
);
for
(;
iface
;
iface
=
PREV_LINK
(
iface
))
{
...
...
tools/widl/typegen.c
View file @
b7e7243a
...
...
@@ -132,6 +132,33 @@ static int print_file(FILE *file, int indent, const char *format, ...)
return
r
;
}
static
void
write_formatdesc
(
FILE
*
f
,
int
indent
,
const
char
*
str
)
{
print_file
(
f
,
indent
,
"typedef struct _MIDL_%s_FORMAT_STRING
\n
"
,
str
);
print_file
(
f
,
indent
,
"{
\n
"
);
print_file
(
f
,
indent
+
1
,
"short Pad;
\n
"
);
print_file
(
f
,
indent
+
1
,
"unsigned char Format[%s_FORMAT_STRING_SIZE];
\n
"
,
str
);
print_file
(
f
,
indent
,
"} MIDL_%s_FORMAT_STRING;
\n
"
,
str
);
print_file
(
f
,
indent
,
"
\n
"
);
}
void
write_formatstringsdecl
(
FILE
*
f
,
int
indent
,
ifref_t
*
ifaces
)
{
print_file
(
f
,
indent
,
"#define TYPE_FORMAT_STRING_SIZE %d
\n
"
,
get_size_typeformatstring
(
ifaces
));
print_file
(
f
,
indent
,
"#define PROC_FORMAT_STRING_SIZE %d
\n
"
,
get_size_procformatstring
(
ifaces
));
fprintf
(
f
,
"
\n
"
);
write_formatdesc
(
f
,
indent
,
"TYPE"
);
write_formatdesc
(
f
,
indent
,
"PROC"
);
fprintf
(
f
,
"
\n
"
);
print_file
(
f
,
indent
,
"static const MIDL_TYPE_FORMAT_STRING __MIDL_TypeFormatString;
\n
"
);
print_file
(
f
,
indent
,
"static const MIDL_PROC_FORMAT_STRING __MIDL_ProcFormatString;
\n
"
);
print_file
(
f
,
indent
,
"
\n
"
);
}
static
inline
int
type_has_ref
(
const
type_t
*
type
)
{
return
(
type
->
type
==
0
&&
type
->
ref
);
...
...
tools/widl/typegen.h
View file @
b7e7243a
...
...
@@ -35,6 +35,7 @@ enum remoting_phase
PHASE_FREE
};
void
write_formatstringsdecl
(
FILE
*
f
,
int
indent
,
ifref_t
*
ifaces
);
void
write_procformatstring
(
FILE
*
file
,
const
ifref_t
*
ifaces
);
void
write_typeformatstring
(
FILE
*
file
,
const
ifref_t
*
ifaces
);
size_t
get_type_memsize
(
const
type_t
*
type
);
...
...
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