X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Flilypond-version.cc;h=28bb08d76152cca62c7d50a10c0cd1b8ad19f111;hb=5e3f01b8ce09646a55838687ba4f1f38e2989afb;hp=aa192a30c77dc3415368fee9e9109609aa95e312;hpb=a9d9433bc7b95cb2d4b3d96eefce7a8437c0d44e;p=lilypond.git diff --git a/lily/lilypond-version.cc b/lily/lilypond-version.cc index aa192a30c7..28bb08d761 100644 --- a/lily/lilypond-version.cc +++ b/lily/lilypond-version.cc @@ -1,9 +1,20 @@ /* - lilypond-version.cc -- implement Lilypond_version + This file is part of LilyPond, the GNU music typesetter. - source file of the GNU LilyPond music typesetter + Copyright (C) 1998--2012 Jan Nieuwenhuizen - (c) 1998--2009 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 @@ -21,10 +32,10 @@ Lilypond_version::Lilypond_version (int major, int minor, int patch) Lilypond_version::Lilypond_version (string str) { - major_ = 0; + major_ = 0; minor_ = 0; patch_ = 0; - + vector version; version = string_split (str, '.'); @@ -32,7 +43,7 @@ Lilypond_version::Lilypond_version (string str) major_ = String_convert::dec2int (version[0]); if (version.size () > 1 && isdigit (version[1][0])) minor_ = String_convert::dec2int (version[1]); - + patch_ = 0; if (version.size () >= 3 && isdigit (version[2][0])) @@ -46,8 +57,8 @@ string Lilypond_version::to_string () const { return ::to_string (major_) - + "." + ::to_string (minor_) - + "." + ::to_string (patch_); + + "." + ::to_string (minor_) + + "." + ::to_string (patch_); } Lilypond_version::operator int () const