X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Flily-version.cc;h=598943c2b3c22c2bcc3bc09d730caaf4211070f3;hb=5b4b0d6e9a197e8f9eb085b7c2ad78b8be3e5cfc;hp=03f605394de9ca9937a71fc6b168b2e350c8dec8;hpb=7f0a3b682bebc864fbca295deba301238d805274;p=lilypond.git diff --git a/lily/lily-version.cc b/lily/lily-version.cc index 03f605394d..598943c2b3 100644 --- a/lily/lily-version.cc +++ b/lily/lily-version.cc @@ -1,16 +1,37 @@ +/* + lily-version.cc -- implement version strings + + source file of the GNU LilyPond music typesetter + + (c) 1999--2008 Jan Nieuwenhuizen +*/ + +#include "lily-version.hh" + +#include "config.hh" #include "version.hh" -#include -static char *s = "GNU LilyPond " MAJOR_VERSION "." MINOR_VERSION "." PATCH_LEVEL MY_PATCH_LEVEL " #%d"; +string +version_string () +{ + string str = MAJOR_VERSION "." MINOR_VERSION "." PATCH_LEVEL; + string mpl ("." MY_PATCH_LEVEL); + if (mpl != ".") + str += mpl; + return str; +} -static const int build= -#include ".build" -; +string +gnu_lilypond_string () +{ + string str = "GNU LilyPond"; + return str; +} -char const * -lily_version_sz() +string +gnu_lilypond_version_string () { - static char v[1024]; - sprintf(v, s, build); - return v; + string str = gnu_lilypond_string () + " " + version_string (); + return str; } +