X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Flily-version.cc;h=d118c3c50a5a0d51843f44767d3a42337ddf6184;hb=55cdf3441eca8d6489c486767cf8013b08e8b32e;hp=68a6b49037351430abc3162cca94ccea9a83038b;hpb=13e79c0250d34b6bdfbafbc551ef64e8b59b2991;p=lilypond.git diff --git a/lily/lily-version.cc b/lily/lily-version.cc index 68a6b49037..d118c3c50a 100644 --- a/lily/lily-version.cc +++ b/lily/lily-version.cc @@ -1,16 +1,48 @@ +/* + This file is part of LilyPond, the GNU music typesetter. + + Copyright (C) 1999--2011 Jan Nieuwenhuizen + + LilyPond is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + LilyPond is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with LilyPond. If not, see . +*/ + +#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]; // ugh - sprintf (v, s, build); - return v; + string str = gnu_lilypond_string () + " " + version_string (); + return str; } +