[PATCH] wrc: Add a trailing linefeed to a couple of error() messages.

Francois Gouget fgouget at free.fr
Wed Oct 20 09:40:11 CDT 2021


Unlike most of the other wrc error functions, error() does not append a 
trailing linefeed.

Signed-off-by: Francois Gouget <fgouget at free.fr>
---
 tools/wrc/ppl.l | 2 +-
 tools/wrc/wpp.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/wrc/ppl.l b/tools/wrc/ppl.l
index d4df76f7950..ee5a4f97a1e 100644
--- a/tools/wrc/ppl.l
+++ b/tools/wrc/ppl.l
@@ -1192,7 +1192,7 @@ static void push_buffer(pp_entry_t *ppp, char *filename, char *incname, int pop)
 	if(ppy_debug)
 		printf("push_buffer(%d): %p %p %p %d\n", bufferstackidx, ppp, filename, incname, pop);
 	if(bufferstackidx >= MAXBUFFERSTACK)
-		error("Buffer stack overflow");
+		error("Buffer stack overflow\n");
 
 	memset(&bufferstack[bufferstackidx], 0, sizeof(bufferstack[0]));
 	bufferstack[bufferstackidx].bufferstate	= YY_CURRENT_BUFFER;
diff --git a/tools/wrc/wpp.c b/tools/wrc/wpp.c
index 9ad09f25da2..18a7b015be0 100644
--- a/tools/wrc/wpp.c
+++ b/tools/wrc/wpp.c
@@ -421,7 +421,7 @@ static const char * const pp_if_state_str[] = {
 void pp_push_if(pp_if_state_t s)
 {
 	if(if_stack_idx >= MAXIFSTACK)
-		error("#if-stack overflow; #{if,ifdef,ifndef} nested too deeply (> %d)", MAXIFSTACK);
+		error("#if-stack overflow; #{if,ifdef,ifndef} nested too deeply (> %d)\n", MAXIFSTACK);
 
 	if(pp_flex_debug)
 		fprintf(stderr, "Push if %s:%d: %s(%d) -> %s(%d)\n", pp_status.input, pp_status.line_number, pp_if_state_str[pp_if_state()], if_stack_idx, pp_if_state_str[s], if_stack_idx+1);
-- 
2.30.2



More information about the wine-devel mailing list