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
ed10b24e
Commit
ed10b24e
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: Use typegen.c format-string functions in proxy.c.
parent
b7e7243a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
57 deletions
+6
-57
proxy.c
tools/widl/proxy.c
+6
-57
No files found.
tools/widl/proxy.c
View file @
ed10b24e
...
@@ -36,6 +36,7 @@
...
@@ -36,6 +36,7 @@
#include "utils.h"
#include "utils.h"
#include "parser.h"
#include "parser.h"
#include "header.h"
#include "header.h"
#include "typegen.h"
#define END_OF_LIST(list) \
#define END_OF_LIST(list) \
do { \
do { \
...
@@ -91,59 +92,7 @@ static void write_stubdesc(void)
...
@@ -91,59 +92,7 @@ static void write_stubdesc(void)
print_proxy
(
"
\n
"
);
print_proxy
(
"
\n
"
);
}
}
static
void
write_formatdesc
(
const
char
*
str
)
static
void
init_proxy
(
ifref_t
*
ifaces
)
{
print_proxy
(
"typedef struct _MIDL_%s_FORMAT_STRING
\n
"
,
str
);
indent
++
;
print_proxy
(
"{
\n
"
);
print_proxy
(
"short Pad;
\n
"
);
print_proxy
(
"unsigned char Format[%s_FORMAT_STRING_SIZE];
\n
"
,
str
);
indent
--
;
print_proxy
(
"} MIDL_%s_FORMAT_STRING;
\n
"
,
str
);
print_proxy
(
"
\n
"
);
}
static
void
write_formatstringsdecl
(
void
)
{
print_proxy
(
"#define TYPE_FORMAT_STRING_SIZE %d
\n
"
,
1
);
/* FIXME */
print_proxy
(
"#define PROC_FORMAT_STRING_SIZE %d
\n
"
,
1
);
/* FIXME */
fprintf
(
proxy
,
"
\n
"
);
write_formatdesc
(
"TYPE"
);
write_formatdesc
(
"PROC"
);
fprintf
(
proxy
,
"
\n
"
);
print_proxy
(
"static const MIDL_TYPE_FORMAT_STRING __MIDL_TypeFormatString;
\n
"
);
print_proxy
(
"static const MIDL_PROC_FORMAT_STRING __MIDL_ProcFormatString;
\n
"
);
print_proxy
(
"
\n
"
);
}
static
void
write_formatstring
(
int
proc
)
{
const
char
*
t
,
*
n
;
if
(
!
proc
)
{
t
=
"TYPE"
;
n
=
"Type"
;
}
else
{
t
=
"PROC"
;
n
=
"Proc"
;
}
print_proxy
(
"static const MIDL_%s_FORMAT_STRING __MIDL_%sFormatString =
\n
"
,
t
,
n
);
print_proxy
(
"{
\n
"
);
indent
++
;
print_proxy
(
"0,
\n
"
);
print_proxy
(
"{
\n
"
);
indent
++
;
print_proxy
(
"0
\n
"
);
indent
--
;
print_proxy
(
"}
\n
"
);
indent
--
;
print_proxy
(
"};
\n
"
);
print_proxy
(
"
\n
"
);
}
static
void
init_proxy
(
void
)
{
{
if
(
proxy
)
return
;
if
(
proxy
)
return
;
if
(
!
(
proxy
=
fopen
(
proxy_name
,
"w"
)))
if
(
!
(
proxy
=
fopen
(
proxy_name
,
"w"
)))
...
@@ -161,7 +110,7 @@ static void init_proxy(void)
...
@@ -161,7 +110,7 @@ static void init_proxy(void)
print_proxy
(
"
\n
"
);
print_proxy
(
"
\n
"
);
print_proxy
(
"#include
\"
%s
\"\n
"
,
header_name
);
print_proxy
(
"#include
\"
%s
\"\n
"
,
header_name
);
print_proxy
(
"
\n
"
);
print_proxy
(
"
\n
"
);
write_formatstringsdecl
();
write_formatstringsdecl
(
proxy
,
indent
,
ifaces
);
write_stubdescproto
();
write_stubdescproto
();
}
}
...
@@ -1064,7 +1013,7 @@ void write_proxies(ifref_t *ifaces)
...
@@ -1064,7 +1013,7 @@ void write_proxies(ifref_t *ifaces)
if
(
!
lcur
)
return
;
if
(
!
lcur
)
return
;
END_OF_LIST
(
lcur
);
END_OF_LIST
(
lcur
);
init_proxy
();
init_proxy
(
ifaces
);
if
(
!
proxy
)
return
;
if
(
!
proxy
)
return
;
cur
=
lcur
;
cur
=
lcur
;
...
@@ -1082,8 +1031,8 @@ void write_proxies(ifref_t *ifaces)
...
@@ -1082,8 +1031,8 @@ void write_proxies(ifref_t *ifaces)
print_proxy
(
"#error Currently only Wine and WIN32 are supported.
\n
"
);
print_proxy
(
"#error Currently only Wine and WIN32 are supported.
\n
"
);
print_proxy
(
"#endif
\n
"
);
print_proxy
(
"#endif
\n
"
);
print_proxy
(
"
\n
"
);
print_proxy
(
"
\n
"
);
write_
formatstring
(
1
);
write_
procformatstring
(
proxy
,
ifaces
);
write_
formatstring
(
0
);
write_
typeformatstring
(
proxy
,
ifaces
);
fprintf
(
proxy
,
"const CInterfaceProxyVtbl* _%s_ProxyVtblList[] =
\n
"
,
file_id
);
fprintf
(
proxy
,
"const CInterfaceProxyVtbl* _%s_ProxyVtblList[] =
\n
"
,
file_id
);
fprintf
(
proxy
,
"{
\n
"
);
fprintf
(
proxy
,
"{
\n
"
);
...
...
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