]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/debug.hh
aca896309d5fbaaed845067c8ac263f8b81e8934
[lilypond.git] / lily / include / debug.hh
1 /*
2   Argh! this sux! implementation not liblily
3  */
4
5 #ifndef DEBUG_HH
6 #define DEBUG_HH
7
8 #include <assert.h>
9 #include <iostream.h>
10 #include "dstream.hh"
11 #include "real.hh"
12 #include "lily-proto.hh"
13 #include "warn.hh"
14
15 void error_t (const String& s, Time_description const &  t_tdes);
16 void error_t (String const &s, const Moment &when);
17
18 #define WARN warnout << "warning: "<<__FUNCTION__ << "(): "
19 extern ostream &warnout ;
20
21 // progress
22 extern ostream *mlog;
23
24 // debugging
25 extern Dstream *monitor; // monitor
26
27 #ifdef NPRINT
28 /** 
29   Global debug output. Compare with cin, cout, cerr, DOUT is DEBUG OUTPUT
30  */
31 #define DOUT if (0) *monitor    // clever hack 
32 #else
33 #define DOUT if (check_debug) monitor->identify_as (__PRETTY_FUNCTION__)
34 #endif
35
36 extern bool check_debug;
37
38 #endif