]> git.donarmstrong.com Git - lilypond.git/blob - lib/include/debug.hh
release: 0.0.47
[lilypond.git] / lib / 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 "proto.hh"
13
14 void warning( String message_str  );
15 void error( String message_str);
16 void error_t(const String& s, Time_description const &  t_tdes);
17 void error_t(String const &s, const Moment &when);
18 // warnings
19 //void warning(String s);
20 #define WARN warnout << "warning: "<<__FUNCTION__ << "(): "
21 extern ostream &warnout ;
22
23 // progress
24 extern ostream *mlog;
25
26 // debugging
27 extern Dstream *monitor; // monitor
28
29 #ifdef NPRINT
30 #define mtor if (0) *monitor    // clever hack 
31 #else
32 #define mtor if (check_debug) monitor->identify_as(__PRETTY_FUNCTION__)
33 #endif
34
35 extern bool check_debug;
36
37 #endif