widl: Modify generic_msg() to behave like all the other Wine tracing methods, that is to not append a '\n' to the message.

Francois Gouget fgouget at free.fr
Thu Oct 18 10:11:30 CDT 2007


---
 tools/widl/header.c |    2 +-
 tools/widl/parser.l |   10 +++++-----
 tools/widl/proxy.c  |    2 +-
 tools/widl/utils.c  |    2 --
 4 files changed, 7 insertions(+), 9 deletions(-)

diff --git a/tools/widl/header.c b/tools/widl/header.c
index 2643f49..9f360cb 100644
--- a/tools/widl/header.c
+++ b/tools/widl/header.c
@@ -837,7 +837,7 @@ static void write_coclass_guid(type_t *cocl)
 static void write_com_interface(type_t *iface)
 {
   if (!iface->funcs && !iface->ref) {
-    parser_warning("%s has no methods", iface->name);
+    parser_warning("%s has no methods\n", iface->name);
     return;
   }
 
diff --git a/tools/widl/parser.l b/tools/widl/parser.l
index e9bfb1f..78ee4b2 100644
--- a/tools/widl/parser.l
+++ b/tools/widl/parser.l
@@ -113,10 +113,10 @@ UUID *parse_uuid(const char *u)
                             yy_pop_state();
                             lineno = (int)strtol(yytext, &cptr, 10);
                             if(!lineno)
-                                parser_error("Malformed '#...' line-directive; invalid linenumber");
+                                parser_error("Malformed '#...' line-directive; invalid linenumber\n");
                             fname = strchr(cptr, '"');
                             if(!fname)
-                                parser_error("Malformed '#...' line-directive; missing filename");
+                                parser_error("Malformed '#...' line-directive; missing filename\n");
                             fname++;
                             cptr = strchr(fname, '"');
                             if(!cptr)
@@ -352,7 +352,7 @@ static void addcchar(char c)
 		cbufalloc += 1024;
 		cbuffer = xrealloc(cbuffer, cbufalloc * sizeof(cbuffer[0]));
 		if(cbufalloc > 65536)
-			parser_warning("Reallocating string buffer larger than 64kB");
+			parser_warning("Reallocating string buffer larger than 64kB\n");
 	}
 	cbuffer[cbufidx++] = c;
 }
@@ -414,7 +414,7 @@ int do_import(char *fname)
 	first_import = import;
 
         if (!(path = wpp_find_include( fname, input_name )))
-            parser_error("Unable to open include file %s", fname);
+            parser_error("Unable to open include file %s\n", fname);
 
 	import_stack[ptr].temp_name = temp_name;
 	import_stack[ptr].input_name = input_name;
@@ -427,7 +427,7 @@ int do_import(char *fname)
         if (ret) exit(1);
 
 	if((f = fopen(temp_name, "r")) == NULL)
-		parser_error("Unable to open %s", temp_name);
+		parser_error("Unable to open %s\n", temp_name);
 
 	import_stack[ptr].state = YY_CURRENT_BUFFER;
 	yy_switch_to_buffer(yy_create_buffer(f, YY_BUF_SIZE));
diff --git a/tools/widl/proxy.c b/tools/widl/proxy.c
index 5354c27..0255923 100644
--- a/tools/widl/proxy.c
+++ b/tools/widl/proxy.c
@@ -509,7 +509,7 @@ static void write_proxy(type_t *iface, unsigned int *proc_offset)
       gen_stub(iface, cur, cname, *proc_offset);
       *proc_offset += get_size_procformatstring_func( cur );
       if (midx == -1) midx = idx;
-      else if (midx != idx) parser_error("method index mismatch in write_proxy");
+      else if (midx != idx) parser_error("method index mismatch in write_proxy\n");
       midx++;
     }
   }
diff --git a/tools/widl/utils.c b/tools/widl/utils.c
index 3648e36..752202a 100644
--- a/tools/widl/utils.c
+++ b/tools/widl/utils.c
@@ -62,8 +62,6 @@ static void generic_msg(const char *s, const char *t, const char *n, va_list ap)
 			free(cpy);
 		}
 	}
-
-	fprintf(stderr, "\n");
 }
 
 
-- 
1.5.3.4




More information about the wine-patches mailing list