WIDL: various formatting fixes

Mike McCormack mike at codeweavers.com
Tue Sep 21 03:25:33 CDT 2004


This patch is mostly the same as the previous WIDL patch, but excluding 
the __RPC_FAR changes.

Mike


ChangeLog:
* various formatting fixes
-------------- next part --------------
? tools/widl/proxy-chunk.diff
? tools/widl/proxy-guid-comment.diff
? tools/widl/proxy-stuff.diff
? tools/widl/widl-20040921.diff
? tools/widl/widl-20040921a.diff
? tools/widl/x
Index: tools/widl/proxy.c
===================================================================
RCS file: /home/wine/wine/tools/widl/proxy.c,v
retrieving revision 1.16
diff -u -r1.16 proxy.c
--- tools/widl/proxy.c	20 Sep 2004 19:11:16 -0000	1.16
+++ tools/widl/proxy.c	21 Sep 2004 06:47:11 -0000
@@ -262,7 +262,7 @@
       temp.type = type->ref;
       temp.name = arg->name; /* FIXME */
 #if 0
-      print_proxy( "/* FIXME: %s use the right name for %s\n", __FUNCTION__, arg->name );
+      print_proxy( "/* FIXME: %s use the right name for %s */\n", __FUNCTION__, arg->name );
 #endif
       marshall_size_arg( &temp );
     }
@@ -349,7 +349,7 @@
       temp.type = type->ref;
       temp.name = arg->name; /* FIXME */
 #if 0
-      print_proxy( "/* FIXME: %s use the right name for %s\n", __FUNCTION__, arg->name );
+      print_proxy( "/* FIXME: %s use the right name for %s */\n", __FUNCTION__, arg->name );
 #endif
       marshall_copy_arg( &temp );
     }
@@ -446,7 +446,7 @@
       temp.type = type->ref;
       temp.name = arg->name; /* FIXME */
 #if 1
-      print_proxy( "/* FIXME: %s use the right name for %s\n", __FUNCTION__, arg->name );
+      print_proxy( "/* FIXME: %s use the right name for %s */\n", __FUNCTION__, arg->name );
 #endif
       unmarshall_copy_arg( &temp );
     }
@@ -896,15 +896,23 @@
   }
 
   /* proxy vtable */
-  print_proxy( "const CINTERFACE_PROXY_VTABLE(%d) %sProxyVtbl =\n", midx, iface->name);
+  print_proxy( "const CINTERFACE_PROXY_VTABLE(%d) _%sProxyVtbl =\n", midx, iface->name);
+  print_proxy( "{\n");
+  indent++;
+  print_proxy( "{\n", iface->name);
+  indent++;
+  print_proxy( "&IID_%s,\n", iface->name);
+  indent--;
+  print_proxy( "},\n");
   print_proxy( "{\n");
   indent++;
-  print_proxy( "{&IID_%s},{\n", iface->name);
   write_proxy_methods(iface);
-  fprintf(proxy, "}\n");
+  fprintf(proxy, "\n");
+  indent--;
+  print_proxy( "}\n");
   indent--;
   print_proxy( "};\n");
-  print_proxy( "\n");
+  fprintf(proxy, "\n\n");
 
   /* stub vtable */
   print_proxy( "static const PRPC_STUB_FUNCTION %s_table[] =\n", iface->name);
@@ -915,13 +923,22 @@
   indent--;
   fprintf(proxy, "};\n");
   print_proxy( "\n");
-  print_proxy( "const CInterfaceStubVtbl %sStubVtbl = {\n", iface->name);
+  print_proxy( "const CInterfaceStubVtbl _%sStubVtbl =\n", iface->name);
+  print_proxy( "{\n");
+  indent++;
+  print_proxy( "{\n");
+  indent++;
+  print_proxy( "&IID_%s,\n", iface->name);
+  print_proxy( "0,\n");
+  print_proxy( "%d,\n", stubs+3);
+  print_proxy( "&%s_table[-3],\n", iface->name);
+  indent--;
+  print_proxy( "},\n", iface->name);
+  print_proxy( "{\n");
   indent++;
-  print_proxy( "{&IID_%s,\n", iface->name);
-  print_proxy( " 0,\n");
-  print_proxy( " %d,\n", stubs+3);
-  print_proxy( " &%s_table[-3]},\n", iface->name);
-  print_proxy( "{CStdStubBuffer_METHODS}\n");
+  print_proxy( "CStdStubBuffer_METHODS\n");
+  indent--;
+  print_proxy( "}\n");
   indent--;
   print_proxy( "};\n");
   print_proxy( "\n");
@@ -964,7 +981,7 @@
   while (cur) {
     if(cur->iface->ref && cur->iface->funcs &&
        is_object(cur->iface->attrs) && !is_local(cur->iface->attrs))
-      fprintf(proxy, "    (CInterfaceProxyVtbl*)&%sProxyVtbl,\n", cur->iface->name);
+      fprintf(proxy, "    (CInterfaceProxyVtbl*)&_%sProxyVtbl,\n", cur->iface->name);
     cur = PREV_LINK(cur);
   }
   fprintf(proxy, "    0\n");
@@ -977,14 +994,14 @@
   while (cur) {
     if(cur->iface->ref && cur->iface->funcs &&
        is_object(cur->iface->attrs) && !is_local(cur->iface->attrs))
-      fprintf(proxy, "    (CInterfaceStubVtbl*)&%sStubVtbl,\n", cur->iface->name);
+      fprintf(proxy, "    (CInterfaceStubVtbl*)&_%sStubVtbl,\n", cur->iface->name);
     cur = PREV_LINK(cur);
   }
   fprintf(proxy, "    0\n");
   fprintf(proxy, "};\n");
   fprintf(proxy, "\n");
 
-  fprintf(proxy, "const PCInterfaceName _%s_InterfaceNamesList[] =\n", file_id);
+  fprintf(proxy, "PCInterfaceName const _%s_InterfaceNamesList[] =\n", file_id);
   fprintf(proxy, "{\n");
   cur = lcur;
   while (cur) {
@@ -1006,7 +1023,8 @@
   while (cur) {
     if(cur->iface->ref)
     {
-      fprintf(proxy, "    if (!_%s_CHECK_IID(%d)) {\n", file_id, c);
+      fprintf(proxy, "    if (!_%s_CHECK_IID(%d))\n", file_id, c);
+      fprintf(proxy, "    {\n");
       fprintf(proxy, "        *pIndex = %d;\n", c);
       fprintf(proxy, "        return 1;\n");
       fprintf(proxy, "    }\n");


More information about the wine-patches mailing list