aboutsummaryrefslogtreecommitdiffstats
path: root/src/scanner.c
diff options
context:
space:
mode:
authorJon Cruz <jonc@osg.samsung.com>2015-10-26 11:50:32 +0900
committerBryce Harrington <bryce@osg.samsung.com>2015-10-26 10:51:20 -0700
commit1cf175eba453c4453b6be5081afc10cd515590a8 (patch)
treecb84ff17d3af01441dd70fe9fce731da6d7fb042 /src/scanner.c
parentcosmetic: fix inconsistent code style with header prototypes. (diff)
downloadwayland-1cf175eba453c4453b6be5081afc10cd515590a8.tar
wayland-1cf175eba453c4453b6be5081afc10cd515590a8.tar.gz
wayland-1cf175eba453c4453b6be5081afc10cd515590a8.tar.bz2
wayland-1cf175eba453c4453b6be5081afc10cd515590a8.tar.lz
wayland-1cf175eba453c4453b6be5081afc10cd515590a8.tar.xz
wayland-1cf175eba453c4453b6be5081afc10cd515590a8.tar.zst
wayland-1cf175eba453c4453b6be5081afc10cd515590a8.zip
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 <jonc@osg.samsung.com>
Diffstat (limited to 'src/scanner.c')
-rw-r--r--src/scanner.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/scanner.c b/src/scanner.c
index f456aa5..b231d02 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;
}