From: fred Date: Sun, 24 Mar 2002 19:37:51 +0000 (+0000) Subject: lilypond-0.0.47 X-Git-Tag: release/1.5.59~5041 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=2e7e9334c9bd2e3c2bc6739248c5d09cb59ee111;p=lilypond.git lilypond-0.0.47 --- diff --git a/Documentation/examples.pod b/Documentation/examples.pod index cd76ca11b4..580ab8c809 100644 --- a/Documentation/examples.pod +++ b/Documentation/examples.pod @@ -12,6 +12,9 @@ each file: tested LilyPond features. copyright info +Most music distributed with LilyPond was composed a long time ago, and +do not have copyrights. Any exceptions are mentioned here. + =head2 F A cadenza to Mozart Horn concerto no. 3. @@ -31,7 +34,7 @@ Features: pushgroup, popgroup. =head2 F -Error messages, context errors. +Features: Error messages, context errors. =head2 F diff --git a/lily/include/time-description.hh b/lily/include/time-description.hh index 16ea5c5f14..1bfd5820e6 100644 --- a/lily/include/time-description.hh +++ b/lily/include/time-description.hh @@ -37,9 +37,10 @@ struct Time_description { String str()const; void print() const; void setpartial(Moment p); + String try_set_partial_str(Moment)const; Moment barleft(); void set_meter(int,int); - static int compare (Time_description&, Time_description&); + static int compare (const Time_description&, const Time_description&); }; #include "compare.hh" diff --git a/lily/time-description.cc b/lily/time-description.cc index 2266b61b33..44d9b3d5e9 100644 --- a/lily/time-description.cc +++ b/lily/time-description.cc @@ -46,7 +46,7 @@ Time_description::set_cadenza(bool b) { if (cadenza_b_ && !b) { if (whole_in_measure_) { - bars_i_ ++; + bars_i_ ++; // should do? whole_in_measure_ = 0; } } @@ -90,13 +90,27 @@ Time_description::allow_meter_change_b() { return!(whole_in_measure_); } + +/** + retrieve error messages. + @return + error messages if not possible, "" if possible + */ +String +Time_description::try_set_partial_str(Moment p)const +{ + if (when_) + return ("Partial measure only allowed at beginning."); + if (p whole_per_measure_) + return ("Partial measure too large"); + return ""; +} + void Time_description::setpartial(Moment p) { - if (when_) - error_t ("Partial measure only allowed at beginning.", *this); - if (p whole_per_measure_) - error_t ("Partial measure has incorrect size", *this); whole_in_measure_ = whole_per_measure_ - p; } @@ -108,7 +122,7 @@ Time_description::barleft() } int -Time_description::compare(Time_description &t1, Time_description&t2) +Time_description::compare(Time_description const &t1, Time_description const&t2) { int i = sign(t1.when_-t2.when_);