Generate static MIDL_PROC_FORMAT_STRING, MIDL_TYPE_FORMAT_STRING and MIDL_STUB_DESC.
authorEric Kohl <eric.kohl@reactos.org>
Sun, 1 Jan 2006 20:59:39 +0000 (20:59 +0000)
committerEric Kohl <eric.kohl@reactos.org>
Sun, 1 Jan 2006 20:59:39 +0000 (20:59 +0000)
svn path=/trunk/; revision=20525

reactos/tools/widl/ChangeLog
reactos/tools/widl/client.c
reactos/tools/widl/server.c

index 9115154..707fc91 100644 (file)
@@ -1,5 +1,13 @@
 ChangeLog
 
 ChangeLog
 
+2006-01-01 ekohl
+
+   tools/widl/client.c
+   tools/widl/server.c
+
+- Generate static MIDL_PROC_FORMAT_STRING, MIDL_TYPE_FORMAT_STRING and
+  MIDL_STUB_DESC variables.
+
 2005-12-05 ekohl
 
    tools/widl/widl.c
 2005-12-05 ekohl
 
    tools/widl/widl.c
index 794878d..560649e 100644 (file)
@@ -304,7 +304,7 @@ static void write_procformatstring(type_t *iface)
     unsigned int type_offset = 2;
     int in_attr, out_attr;
 
     unsigned int type_offset = 2;
     int in_attr, out_attr;
 
-    print_client("const MIDL_PROC_FORMAT_STRING __MIDL_ProcFormatString =\n");
+    print_client("static const MIDL_PROC_FORMAT_STRING __MIDL_ProcFormatString =\n");
     print_client("{\n");
     indent++;
     print_client("0,\n");
     print_client("{\n");
     indent++;
     print_client("0,\n");
@@ -429,7 +429,7 @@ static void write_typeformatstring(type_t *iface)
     int ptr_attr, ref_attr, unique_attr;
     void *sizeis_attr;
 
     int ptr_attr, ref_attr, unique_attr;
     void *sizeis_attr;
 
-    print_client("const MIDL_TYPE_FORMAT_STRING __MIDL_TypeFormatString =\n");
+    print_client("static const MIDL_TYPE_FORMAT_STRING __MIDL_TypeFormatString =\n");
     print_client("{\n");
     indent++;
     print_client("0,\n");
     print_client("{\n");
     indent++;
     print_client("0,\n");
@@ -1782,7 +1782,7 @@ static void write_bindinghandledecl(type_t *iface)
 
 static void write_stubdescdecl(type_t *iface)
 {
 
 static void write_stubdescdecl(type_t *iface)
 {
-    print_client("extern const MIDL_STUB_DESC %s_StubDesc;\n", iface->name);
+    print_client("static const MIDL_STUB_DESC %s_StubDesc;\n", iface->name);
     fprintf(client, "\n");
 }
 
     fprintf(client, "\n");
 }
 
@@ -1791,7 +1791,7 @@ static void write_stubdescriptor(type_t *iface)
 {
     char *implicit_handle = get_attrp(iface->attrs, ATTR_IMPLICIT_HANDLE);
 
 {
     char *implicit_handle = get_attrp(iface->attrs, ATTR_IMPLICIT_HANDLE);
 
-    print_client("const MIDL_STUB_DESC %s_StubDesc =\n", iface->name);
+    print_client("static const MIDL_STUB_DESC %s_StubDesc =\n", iface->name);
     print_client("{\n");
     indent++;
     print_client("(void __RPC_FAR *)& %s___RpcClientInterface,\n", iface->name);
     print_client("{\n");
     indent++;
     print_client("(void __RPC_FAR *)& %s___RpcClientInterface,\n", iface->name);
@@ -1956,8 +1956,8 @@ static void write_formatstringsdecl(type_t *iface)
     write_formatdesc("TYPE");
     write_formatdesc("PROC");
     fprintf(client, "\n");
     write_formatdesc("TYPE");
     write_formatdesc("PROC");
     fprintf(client, "\n");
-    print_client("extern const MIDL_TYPE_FORMAT_STRING __MIDL_TypeFormatString;\n");
-    print_client("extern const MIDL_PROC_FORMAT_STRING __MIDL_ProcFormatString;\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");
 }
 
     print_client("\n");
 }
 
index e9e94bb..10396b6 100644 (file)
@@ -309,7 +309,7 @@ static void write_procformatstring(type_t *iface)
     unsigned int type_offset = 2;
     int in_attr, out_attr;
 
     unsigned int type_offset = 2;
     int in_attr, out_attr;
 
-    print_server("const MIDL_PROC_FORMAT_STRING __MIDL_ProcFormatString =\n");
+    print_server("static const MIDL_PROC_FORMAT_STRING __MIDL_ProcFormatString =\n");
     print_server("{\n");
     indent++;
     print_server("0,\n");
     print_server("{\n");
     indent++;
     print_server("0,\n");
@@ -426,7 +426,7 @@ static void write_typeformatstring(type_t *iface)
     int ptr_attr, ref_attr, unique_attr;
     void *sizeis_attr;
 
     int ptr_attr, ref_attr, unique_attr;
     void *sizeis_attr;
 
-    print_server("const MIDL_TYPE_FORMAT_STRING __MIDL_TypeFormatString =\n");
+    print_server("static const MIDL_TYPE_FORMAT_STRING __MIDL_TypeFormatString =\n");
     print_server("{\n");
     indent++;
     print_server("0,\n");
     print_server("{\n");
     indent++;
     print_server("0,\n");
@@ -1922,14 +1922,14 @@ static void write_dispatchtable(type_t *iface)
 
 static void write_stubdescdecl(type_t *iface)
 {
 
 static void write_stubdescdecl(type_t *iface)
 {
-    print_server("extern const MIDL_STUB_DESC %s_StubDesc;\n", iface->name);
+    print_server("static const MIDL_STUB_DESC %s_StubDesc;\n", iface->name);
     fprintf(server, "\n");
 }
 
 
 static void write_stubdescriptor(type_t *iface)
 {
     fprintf(server, "\n");
 }
 
 
 static void write_stubdescriptor(type_t *iface)
 {
-    print_server("const MIDL_STUB_DESC %s_StubDesc =\n", iface->name);
+    print_server("static const MIDL_STUB_DESC %s_StubDesc =\n", iface->name);
     print_server("{\n");
     indent++;
     print_server("(void __RPC_FAR *)& %s___RpcServerInterface,\n", iface->name);
     print_server("{\n");
     indent++;
     print_server("(void __RPC_FAR *)& %s___RpcServerInterface,\n", iface->name);
@@ -2093,8 +2093,8 @@ static void write_formatstringsdecl(type_t *iface)
     write_formatdesc("TYPE");
     write_formatdesc("PROC");
     fprintf(server, "\n");
     write_formatdesc("TYPE");
     write_formatdesc("PROC");
     fprintf(server, "\n");
-    print_server("extern const MIDL_TYPE_FORMAT_STRING __MIDL_TypeFormatString;\n");
-    print_server("extern const MIDL_PROC_FORMAT_STRING __MIDL_ProcFormatString;\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");
 }
 
     print_server("\n");
 }