Alexandre Julliard : widl: Some cosmetic fixes in generated code.

Alexandre Julliard julliard at wine.codeweavers.com
Thu Feb 2 07:09:19 CST 2006


Module: wine
Branch: refs/heads/master
Commit: a488901256f74887dfe17651a2673386554a0abc
URL:    http://source.winehq.org/git/?p=wine.git;a=commit;h=a488901256f74887dfe17651a2673386554a0abc

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Thu Feb  2 13:23:28 2006 +0100

widl: Some cosmetic fixes in generated code.

---

 tools/widl/client.c |    2 +-
 tools/widl/proxy.c  |   10 +++++-----
 tools/widl/server.c |    2 +-
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/tools/widl/client.c b/tools/widl/client.c
index 1c3d187..91b4b39 100644
--- a/tools/widl/client.c
+++ b/tools/widl/client.c
@@ -233,7 +233,7 @@ static void write_function_stubs(type_t 
             print_client("_RetVal = *(");
             write_type(client, def->type, def, def->tname);
             fprintf(client, " *)_StubMsg.Buffer;\n");
-            fprintf(client, "_StubMsg.Buffer += sizeof(");
+            print_client("_StubMsg.Buffer += sizeof(");
             write_type(client, def->type, def, def->tname);
             fprintf(client, ");\n");
         }
diff --git a/tools/widl/proxy.c b/tools/widl/proxy.c
index a953ff5..97b471d 100644
--- a/tools/widl/proxy.c
+++ b/tools/widl/proxy.c
@@ -326,7 +326,7 @@ static void marshall_copy_arg( var_t *ar
     print_proxy( "*(");
     write_type(proxy, arg->type, arg, arg->tname);
     fprintf(proxy, " *)_StubMsg.Buffer = %s;\n", arg->name );
-    fprintf(proxy, "_StubMsg.Buffer += sizeof(");
+    print_proxy("_StubMsg.Buffer += sizeof(");
     write_type(proxy, arg->type, arg, arg->tname);
     fprintf(proxy, ");\n");
     break;
@@ -425,7 +425,7 @@ static void unmarshall_copy_arg( var_t *
     print_proxy( "%s = *(", arg->name );
     write_type(proxy, arg->type, arg, arg->tname);
     fprintf(proxy," *)_StubMsg.Buffer;\n");
-    fprintf(proxy, "_StubMsg.Buffer += sizeof(");
+    print_proxy("_StubMsg.Buffer += sizeof(");
     write_type(proxy, arg->type, arg, arg->tname);
     fprintf(proxy, ");\n");
     break;
@@ -604,7 +604,7 @@ static void gen_proxy(type_t *iface, fun
     print_proxy( "_RetVal = *(" );
     write_type(proxy, def->type, def, def->tname);
     fprintf(proxy, " *)_StubMsg.Buffer;\n");
-    fprintf(proxy, "_StubMsg.Buffer += sizeof(");
+    print_proxy("_StubMsg.Buffer += sizeof(");
     write_type(proxy, def->type, def, def->tname);
     fprintf(proxy, ");\n");
   }
@@ -810,7 +810,7 @@ static void gen_stub(type_t *iface, func
     print_proxy( "*(" );
     write_type(proxy, def->type, def, def->tname);
     fprintf(proxy, " *)_StubMsg.Buffer = _RetVal;\n");
-    fprintf(proxy, "_StubMsg.Buffer += sizeof(");
+    print_proxy("_StubMsg.Buffer += sizeof(");
     write_type(proxy, def->type, def, def->tname);
     fprintf(proxy, ");\n");
   }
@@ -822,7 +822,7 @@ static void gen_stub(type_t *iface, func
   print_proxy("}\n");
   print_proxy("RpcEndFinally\n");
 
-  print_proxy("_Msg->BufferLength = ((long)_StubMsg.Buffer - (long)_Msg->Buffer);\n");
+  print_proxy("_Msg->BufferLength = _StubMsg.Buffer - (unsigned char *)_Msg->Buffer;\n");
   indent--;
 
   print_proxy("}\n");
diff --git a/tools/widl/server.c b/tools/widl/server.c
index 8bac800..23b303e 100644
--- a/tools/widl/server.c
+++ b/tools/widl/server.c
@@ -306,7 +306,7 @@ static void write_function_stubs(type_t 
             print_server("*(");
             write_type(server, def->type, def, def->tname);
             fprintf(server, " *)_StubMsg.Buffer = _RetVal;\n");
-            fprintf(server, "_StubMsg.Buffer += sizeof(");
+            print_server("_StubMsg.Buffer += sizeof(");
             write_type(server, def->type, def, def->tname);
             fprintf(server, ");\n");
         }




More information about the wine-cvs mailing list