From: Jan Nieuwenhuizen Date: Sun, 12 Nov 2000 22:32:12 +0000 (+0100) Subject: partial: 1.3.107.jcn X-Git-Tag: release/1.3.107~1 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=f579726b1c1fe56fe74a913a4438d11f283462b7;p=lilypond.git partial: 1.3.107.jcn ============ * Cross compilation and info build fixes, really cancel all builtin rules, sigh. * Generated documentation fixes: Generate all interface descriptions, separately, don't list non-set interface properties with element descriptions. 1.3.106.h --- diff --git a/lily/include/lilypond-input-version.hh b/lily/include/lilypond-input-version.hh new file mode 100644 index 0000000000..79f7e06ef0 --- /dev/null +++ b/lily/include/lilypond-input-version.hh @@ -0,0 +1,30 @@ +/* + lilypond-version.hh -- declare Lilypond_version + + source file of the GNU LilyPond music typesetter + + (c) 1998--2000 Jan Nieuwenhuizen + +*/ + +#ifndef LILYPOND_VERSION_HH +#define LILYPOND_VERSION_HH + +#include "string.hh" + +struct Lilypond_version +{ + Lilypond_version (int major, int minor, int patch); + Lilypond_version (String str); + + String str () const; + operator int () const; + + int major_i_; + int minor_i_; + int patch_i_; +}; + +extern Lilypond_version oldest_version; + +#endif // LILYPOND_VERSION_HH diff --git a/lily/lilypond-version.cc b/lily/lilypond-version.cc new file mode 100644 index 0000000000..e252710185 --- /dev/null +++ b/lily/lilypond-version.cc @@ -0,0 +1,42 @@ +/* + lilypond-version.cc -- implement Lilypond_version + + source file of the GNU LilyPond music typesetter + + (c) 1998--2000 Jan Nieuwenhuizen + +*/ + +#include "lilypond-input-version.hh" +#include "string-convert.hh" +#include "array.hh" + +Lilypond_version::Lilypond_version (int major, int minor, int patch) +{ + major_i_ = major; + minor_i_ = minor; + patch_i_ = patch; +} + +Lilypond_version::Lilypond_version (String str) +{ + Array version; + version = String_convert::split_arr (str, '.'); + assert (version.size () == 3); + major_i_ = version[0].value_i (); + minor_i_ = version[1].value_i (); + patch_i_ = version[2].value_i (); +} + +String +Lilypond_version::str () const +{ + return to_str (major_i_) + "." + to_str (minor_i_) + "." + to_str (patch_i_); +} + +Lilypond_version::operator int () const +{ + // ugh + return 100000 * major_i_ + 1000 * minor_i_ + patch_i_; +} + diff --git a/lily/mudela-version.cc b/lily/mudela-version.cc deleted file mode 100644 index 7b2e9d58ee..0000000000 --- a/lily/mudela-version.cc +++ /dev/null @@ -1,42 +0,0 @@ -/* - mudela-version.cc -- implement Mudela_version - - source file of the GNU LilyPond music typesetter - - (c) 1998--2000 Jan Nieuwenhuizen - -*/ - -#include "mudela-version.hh" -#include "string-convert.hh" -#include "array.hh" - -Mudela_version::Mudela_version (int major, int minor, int patch) -{ - major_i_ = major; - minor_i_ = minor; - patch_i_ = patch; -} - -Mudela_version::Mudela_version (String str) -{ - Array version; - version = String_convert::split_arr (str, '.'); - assert (version.size () == 3); - major_i_ = version[0].value_i (); - minor_i_ = version[1].value_i (); - patch_i_ = version[2].value_i (); -} - -String -Mudela_version::str () const -{ - return to_str (major_i_) + "." + to_str (minor_i_) + "." + to_str (patch_i_); -} - -Mudela_version::operator int () const -{ - // ugh - return 100000 * major_i_ + 1000 * minor_i_ + patch_i_; -} -