mirror of
https://github.com/reactos/reactos.git
synced 2025-01-04 21:38:43 +00:00
Implement '-o' option. This is equivalent to MIDLs '/oldnames' option.
svn path=/trunk/; revision=13916
This commit is contained in:
parent
33c313a6ff
commit
2517dde027
6 changed files with 47 additions and 14 deletions
|
@ -1,5 +1,16 @@
|
||||||
ChangeLog
|
ChangeLog
|
||||||
|
|
||||||
|
2005-03-10 ekohl
|
||||||
|
|
||||||
|
tools/widl/client.c
|
||||||
|
tools/widl/header.c
|
||||||
|
tools/widl/server.c
|
||||||
|
tools/widl/widl.c
|
||||||
|
tools/widl/widl.h
|
||||||
|
|
||||||
|
Implement '-o' option. This is equivalent to MIDLs '/oldnames' option.
|
||||||
|
|
||||||
|
|
||||||
2005-03-06 ekohl
|
2005-03-06 ekohl
|
||||||
|
|
||||||
tools/widl/client.c
|
tools/widl/client.c
|
||||||
|
@ -20,13 +31,13 @@ Support pointers to simple types as input arguments.
|
||||||
tools/widl/typelib.c
|
tools/widl/typelib.c
|
||||||
|
|
||||||
Merge in Winehq changes to reduce noise.
|
Merge in Winehq changes to reduce noise.
|
||||||
|
|
||||||
tools/widl/server.h
|
tools/widl/server.h
|
||||||
tools/widl/client.h
|
tools/widl/client.h
|
||||||
tools/widl/proxy.h
|
tools/widl/proxy.h
|
||||||
|
|
||||||
Deleted unneeded headers.
|
Deleted unneeded headers.
|
||||||
|
|
||||||
2005-02-26 ekohl
|
2005-02-26 ekohl
|
||||||
tools/widl/server.c
|
tools/widl/server.c
|
||||||
|
|
||||||
|
|
|
@ -672,8 +672,12 @@ static void write_clientinterfacedecl(type_t *iface)
|
||||||
print_client("0,\n");
|
print_client("0,\n");
|
||||||
indent--;
|
indent--;
|
||||||
print_client("};\n");
|
print_client("};\n");
|
||||||
print_client("RPC_IF_HANDLE %s_v%d_%d_c_ifspec = (RPC_IF_HANDLE)& %s___RpcClientInterface;\n",
|
if (old_names)
|
||||||
iface->name, LOWORD(ver), HIWORD(ver), iface->name);
|
print_client("RPC_IF_HANDLE %s_ClientIfHandle = (RPC_IF_HANDLE)& %s___RpcClientInterface;\n",
|
||||||
|
iface->name, iface->name);
|
||||||
|
else
|
||||||
|
print_client("RPC_IF_HANDLE %s_v%d_%d_c_ifspec = (RPC_IF_HANDLE)& %s___RpcClientInterface;\n",
|
||||||
|
iface->name, LOWORD(ver), HIWORD(ver), iface->name);
|
||||||
fprintf(client, "\n");
|
fprintf(client, "\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -851,8 +851,16 @@ void write_rpc_interface(type_t *iface)
|
||||||
{
|
{
|
||||||
fprintf(header, "extern handle_t %s;\n", var);
|
fprintf(header, "extern handle_t %s;\n", var);
|
||||||
}
|
}
|
||||||
fprintf(header, "extern RPC_IF_HANDLE %s_v%d_%d_c_ifspec;\n", iface->name, LOWORD(ver), HIWORD(ver));
|
if (old_names)
|
||||||
fprintf(header, "extern RPC_IF_HANDLE %s_v%d_%d_s_ifspec;\n", iface->name, LOWORD(ver), HIWORD(ver));
|
{
|
||||||
|
fprintf(header, "extern RPC_IF_HANDLE %s_ClientIfHandle;\n", iface->name);
|
||||||
|
fprintf(header, "extern RPC_IF_HANDLE %s_ServerIfHandle;\n", iface->name);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
fprintf(header, "extern RPC_IF_HANDLE %s_v%d_%d_c_ifspec;\n", iface->name, LOWORD(ver), HIWORD(ver));
|
||||||
|
fprintf(header, "extern RPC_IF_HANDLE %s_v%d_%d_s_ifspec;\n", iface->name, LOWORD(ver), HIWORD(ver));
|
||||||
|
}
|
||||||
write_function_proto(iface);
|
write_function_proto(iface);
|
||||||
fprintf(header, "\n");
|
fprintf(header, "\n");
|
||||||
|
|
||||||
|
|
|
@ -677,8 +677,12 @@ static void write_serverinterfacedecl(type_t *iface)
|
||||||
print_server("0,\n");
|
print_server("0,\n");
|
||||||
indent--;
|
indent--;
|
||||||
print_server("};\n");
|
print_server("};\n");
|
||||||
print_server("RPC_IF_HANDLE %s_v%d_%d_s_ifspec = (RPC_IF_HANDLE)& %s___RpcServerInterface;\n",
|
if (old_names)
|
||||||
iface->name, LOWORD(ver), HIWORD(ver), iface->name);
|
print_server("RPC_IF_HANDLE %s_ServerIfHandle = (RPC_IF_HANDLE)& %s___RpcServerInterface;\n",
|
||||||
|
iface->name, iface->name);
|
||||||
|
else
|
||||||
|
print_server("RPC_IF_HANDLE %s_v%d_%d_s_ifspec = (RPC_IF_HANDLE)& %s___RpcServerInterface;\n",
|
||||||
|
iface->name, LOWORD(ver), HIWORD(ver), iface->name);
|
||||||
fprintf(server, "\n");
|
fprintf(server, "\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -58,6 +58,7 @@ static char usage[] =
|
||||||
" -H file Name of header file (default is infile.h)\n"
|
" -H file Name of header file (default is infile.h)\n"
|
||||||
" -I path Set include search dir to path (multiple -I allowed)\n"
|
" -I path Set include search dir to path (multiple -I allowed)\n"
|
||||||
" -N Do not preprocess input\n"
|
" -N Do not preprocess input\n"
|
||||||
|
" -o Use old naming conventions\n"
|
||||||
" -p Generate proxy\n"
|
" -p Generate proxy\n"
|
||||||
" -P file Name of proxy file (default is infile_p.c)\n"
|
" -P file Name of proxy file (default is infile_p.c)\n"
|
||||||
" -s Generate server stub\n"
|
" -s Generate server stub\n"
|
||||||
|
@ -90,6 +91,7 @@ int do_proxies = 0;
|
||||||
int do_client = 0;
|
int do_client = 0;
|
||||||
int do_server = 0;
|
int do_server = 0;
|
||||||
int no_preprocess = 0;
|
int no_preprocess = 0;
|
||||||
|
int old_names = 0;
|
||||||
|
|
||||||
char *input_name;
|
char *input_name;
|
||||||
char *header_name;
|
char *header_name;
|
||||||
|
@ -142,8 +144,8 @@ int main(int argc,char *argv[])
|
||||||
|
|
||||||
now = time(NULL);
|
now = time(NULL);
|
||||||
|
|
||||||
while((optc = getopt(argc, argv, "cC:d:D:EhH:I:NpP:sS:tT:VW")) != EOF) {
|
while((optc = getopt(argc, argv, "cC:d:D:EhH:I:NopP:sS:tT:VW")) != EOF) {
|
||||||
switch(optc) {
|
switch (optc) {
|
||||||
case 'c':
|
case 'c':
|
||||||
do_everything = 0;
|
do_everything = 0;
|
||||||
do_client = 1;
|
do_client = 1;
|
||||||
|
@ -174,6 +176,9 @@ int main(int argc,char *argv[])
|
||||||
case 'N':
|
case 'N':
|
||||||
no_preprocess = 1;
|
no_preprocess = 1;
|
||||||
break;
|
break;
|
||||||
|
case 'o':
|
||||||
|
old_names = 1;
|
||||||
|
break;
|
||||||
case 'p':
|
case 'p':
|
||||||
do_everything = 0;
|
do_everything = 0;
|
||||||
do_proxies = 1;
|
do_proxies = 1;
|
||||||
|
@ -207,10 +212,10 @@ int main(int argc,char *argv[])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(do_everything) {
|
if (do_everything) {
|
||||||
do_header = do_typelib = do_proxies = do_client = do_server = 1;
|
do_header = do_typelib = do_proxies = do_client = do_server = 1;
|
||||||
}
|
}
|
||||||
if(optind < argc) {
|
if (optind < argc) {
|
||||||
input_name = xstrdup(argv[optind]);
|
input_name = xstrdup(argv[optind]);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -218,7 +223,7 @@ int main(int argc,char *argv[])
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(debuglevel)
|
if (debuglevel)
|
||||||
{
|
{
|
||||||
setbuf(stdout,0);
|
setbuf(stdout,0);
|
||||||
setbuf(stderr,0);
|
setbuf(stderr,0);
|
||||||
|
|
|
@ -43,6 +43,7 @@ extern int do_typelib;
|
||||||
extern int do_proxies;
|
extern int do_proxies;
|
||||||
extern int do_client;
|
extern int do_client;
|
||||||
extern int do_server;
|
extern int do_server;
|
||||||
|
extern int old_names;
|
||||||
|
|
||||||
extern char *input_name;
|
extern char *input_name;
|
||||||
extern char *header_name;
|
extern char *header_name;
|
||||||
|
|
Loading…
Reference in a new issue