Sat, 25 Aug 2012 05:05:58 +0300
only print revision in version header if it's non-zero
main.cxx | file | annotate | diff | comparison | revisions |
--- a/main.cxx Sat Aug 25 04:19:22 2012 +0300 +++ b/main.cxx Sat Aug 25 05:05:58 2012 +0300 @@ -105,7 +105,12 @@ // Print header str header; str headerline = "-="; - header.appendformat ("%s version %d.%d.%d", APPNAME, VERSION_MAJOR, VERSION_MINOR, VERSION_REVISION); + header.appendformat ("%s version %d.%d", APPNAME, VERSION_MAJOR, VERSION_MINOR); + + // Include revision if non-zero + if (VERSION_REVISION) + header.appendformat (".%d", VERSION_REVISION); + headerline.repeat ((header.len()/2)-1); headerline += '-'; printf ("%s\n%s\n", header.chars(), headerline.chars());