]> git.donarmstrong.com Git - lilypond.git/blob - lily/warn.cc
patch::: 0.1.31.jcn1: minder ugh
[lilypond.git] / lily / warn.cc
1 /*
2   warn.cc -- implement warning and error messages. Needs cleanup.
3
4   source file of the GNU LilyPond music typesetter
5
6   (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
7 */
8
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"
19
20 ostream &warnout (cerr);
21 ostream *mlog (&cerr);
22
23
24
25 void
26 error_t (String const & s, Moment const & r)
27 {
28   String t_mom = String (trunc (r)) + String (r - Moment (trunc (r)));
29   String e=s+ " (t = " +  t_mom + ")";
30   error (e);
31 }
32
33 void
34 error_t (String const & s, Time_description const &t_tdes)
35 {
36   String e=s+ " (at t=" + String (t_tdes.bars_i_) + ": " + String (t_tdes.whole_in_measure_) + ")\n";
37   error (e);
38 }