Commit 6744d4e3 authored by Eric Kohl's avatar Eric Kohl Committed by Alexandre Julliard

widl: Support multiple interfaces per file.

parent f4356a64
...@@ -386,37 +386,47 @@ static void init_client(void) ...@@ -386,37 +386,47 @@ static void init_client(void)
void write_client(ifref_t *ifaces) void write_client(ifref_t *ifaces)
{ {
ifref_t *lcur = ifaces; ifref_t *iface = ifaces;
if (!do_client) if (!do_client)
return; return;
if (!lcur) if (!iface)
return; return;
END_OF_LIST(lcur); END_OF_LIST(iface);
init_client(); init_client();
if (!client) if (!client)
return; return;
write_formatstringsdecl(lcur->iface); while (iface)
write_implicithandledecl(lcur->iface); {
fprintf(client, "/*****************************************************************************\n");
fprintf(client, " * %s interface\n", iface->iface->name);
fprintf(client, " */\n");
fprintf(client, "\n");
write_clientinterfacedecl(lcur->iface); write_formatstringsdecl(iface->iface);
write_stubdescdecl(lcur->iface); write_implicithandledecl(iface->iface);
write_bindinghandledecl(lcur->iface);
write_function_stubs(lcur->iface); write_clientinterfacedecl(iface->iface);
write_stubdescriptor(lcur->iface); write_stubdescdecl(iface->iface);
write_bindinghandledecl(iface->iface);
print_client("#if !defined(__RPC_WIN32__)\n"); write_function_stubs(iface->iface);
print_client("#error Invalid build platform for this stub.\n"); write_stubdescriptor(iface->iface);
print_client("#endif\n");
fprintf(client, "\n"); print_client("#if !defined(__RPC_WIN32__)\n");
print_client("#error Invalid build platform for this stub.\n");
print_client("#endif\n");
fprintf(client, "\n");
write_procformatstring(client, lcur->iface); write_procformatstring(client, iface->iface);
write_typeformatstring(client); write_typeformatstring(client);
fprintf(client, "\n"); fprintf(client, "\n");
iface = PREV_LINK(iface);
}
fclose(client); fclose(client);
} }
...@@ -432,36 +432,46 @@ static void init_server(void) ...@@ -432,36 +432,46 @@ static void init_server(void)
void write_server(ifref_t *ifaces) void write_server(ifref_t *ifaces)
{ {
ifref_t *lcur = ifaces; ifref_t *iface = ifaces;
if (!do_server) if (!do_server)
return; return;
if (!lcur) if (!iface)
return; return;
END_OF_LIST(lcur); END_OF_LIST(iface);
init_server(); init_server();
if (!server) if (!server)
return; return;
write_formatstringsdecl(lcur->iface); while (iface)
write_serverinterfacedecl(lcur->iface); {
write_stubdescdecl(lcur->iface); fprintf(server, "/*****************************************************************************\n");
fprintf(server, " * %s interface\n", iface->iface->name);
fprintf(server, " */\n");
fprintf(server, "\n");
write_function_stubs(lcur->iface); write_formatstringsdecl(iface->iface);
write_serverinterfacedecl(iface->iface);
write_stubdescdecl(iface->iface);
write_stubdescriptor(lcur->iface); write_function_stubs(iface->iface);
write_dispatchtable(lcur->iface);
print_server("#if !defined(__RPC_WIN32__)\n"); write_stubdescriptor(iface->iface);
print_server("#error Invalid build platform for this stub.\n"); write_dispatchtable(iface->iface);
print_server("#endif\n");
fprintf(server, "\n");
write_procformatstring(server, lcur->iface); print_server("#if !defined(__RPC_WIN32__)\n");
write_typeformatstring(server); print_server("#error Invalid build platform for this stub.\n");
print_server("#endif\n");
fprintf(server, "\n");
fprintf(server, "\n"); write_procformatstring(server, iface->iface);
write_typeformatstring(server);
fprintf(server, "\n");
iface = PREV_LINK(iface);
}
fclose(server); fclose(server);
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment