lilypond-0.1.35
[lilypond.git] / lily / warn.cc
blob0dcee118abee2a66f48a6505ca8f5c21a7d7ab36
1 /*
2 warn.cc -- implement warning and error messages. Needs cleanup.
4 source file of the GNU LilyPond music typesetter
6 (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
7 */
9 #include "proto.hh"
10 #include "plist.hh"
11 #include "debug.hh"
12 #include "my-lily-lexer.hh"
13 #include "moment.hh"
14 #include "time-description.hh"
15 #include "source-file.hh"
16 #include "source.hh"
17 #include "main.hh"
18 #include "input.hh"
20 ostream &warnout (cerr);
21 ostream *mlog (&cerr);
25 void
26 error_t (String const & s, Moment const & r)
28 String t_mom = String (trunc (r)) + String (r - Moment (trunc (r)));
29 String e=s+ " (t = " + t_mom + ")";
30 error (e);
33 void
34 error_t (String const & s, Time_description const &t_tdes)
36 String e=s+ " (at t=" + String (t_tdes.bars_i_) + ": " + String (t_tdes.whole_in_measure_) + ")\n";
37 error (e);