scanner: Fix oddities in copyright printing
authorDerek Foreman <derekf@osg.samsung.com>
Tue, 2 Feb 2016 20:56:57 +0000 (14:56 -0600)
committerBryce Harrington <bryce@bryceharrington.org>
Thu, 4 Feb 2016 19:11:21 +0000 (11:11 -0800)
commit369b6466a71175289572c4ef8f70af65f620fb88
treea1c6e3551741f644623f7328bc061643c6081c76
parent816a0ae09bd5c370b95cee459905976dc14cfac0
scanner: Fix oddities in copyright printing

Some copyright strings could result in broken generated header files with
unmatched */

This change:
Runs the loop long enough so the copyright[i] == 0 test can actually
happen. (if there was no \n no copyright text was printed, */ still was)

Prints the opening /* even if there was whitespace at the start of
the very first line.

Only emits a */ if a /* was printed.

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
src/scanner.c