X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fwarn.cc;h=532d2e3fb89809227264adfcfd3a3595778d9c92;hb=ad4297de0246935caa4c51f4e152e20009a6f64e;hp=c35e6e60158720cf1284f02447023a99f8c0ba69;hpb=04f01c7e890bd4f1b358378e5911fb7c117c3802;p=lilypond.git diff --git a/lily/warn.cc b/lily/warn.cc index c35e6e6015..532d2e3fb8 100644 --- a/lily/warn.cc +++ b/lily/warn.cc @@ -3,11 +3,10 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1999 Han-Wen Nienhuys */ #include "proto.hh" -#include "plist.hh" #include "debug.hh" #include "my-lily-lexer.hh" #include "moment.hh" @@ -18,21 +17,21 @@ #include "input.hh" ostream &warnout (cerr); -ostream *mlog(&cerr); +ostream *mlog (&cerr); void -error_t(String const & s, Moment const & r) +error_t (String const & s, Moment const & r) { - String t_mom = String(trunc(r)) + String(r - Moment(trunc(r))); - String e=s+ " (t = " + t_mom + ")"; - error(e); + String t_mom = r.trunc_rat ().str () + (r - r.trunc_rat ()).str (); + String e=s+ " (t = " + t_mom + ")"; + error (e); } void -error_t(String const & s, Time_description const &t_tdes) +error_t (String const & s, Time_description const &t_tdes) { - String e=s+ " (at t=" + String(t_tdes.bars_i_) + ": " + String(t_tdes.whole_in_measure_) + ")\n"; - error(e); + String e=s+ " (at t=" + to_str (t_tdes.bars_i_) + ": " + (t_tdes.whole_in_measure_).str () + ")\n"; + error (e); }