From 1cf175eba453c4453b6be5081afc10cd515590a8 Mon Sep 17 00:00:00 2001 From: Jon Cruz Date: Mon, 26 Oct 2015 11:50:32 +0900 Subject: [PATCH] scanner: stop adding trailing whitespace to copyright Generated code was unconditionally adding a space to lines in comments for copyright blocks even if the line was blank. Updated to not add trailing whitespace for blank lines. Signed-off-by: Jon A. Cruz --- src/scanner.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/scanner.c b/src/scanner.c index f456aa50..b231d022 100644 --- a/src/scanner.c +++ b/src/scanner.c @@ -1141,8 +1141,9 @@ format_copyright(const char *copyright) } if (copyright[i] == '\n' || copyright[i] == '\0') { - printf("%s %.*s\n", + printf("%s%s%.*s\n", i == 0 ? "/*" : " *", + i > start ? " " : "", i - start, copyright + start); bol = 1; }