]> git.donarmstrong.com Git - lilypond.git/blob - hdr/debug.hh
1d1ae745c31f6344335e4459e73d392124bcacf2
[lilypond.git] / hdr / debug.hh
1 #ifndef DEBUG_HH
2 #define DEBUG_HH
3 #include <assert.h>
4 #include <iostream.h>
5 #include "dstream.hh"
6 #include "real.hh"
7
8 void error(String s);           // errors
9 void error_t(String s, Real when);
10
11 // warnings
12 void warning(String s);
13 #define WARN warnout << "warning: "<<__FUNCTION__ << "(): "
14 extern ostream &warnout ;
15
16 // progress
17 extern ostream *mlog;
18
19 // debugging
20 extern Dstream monitor; // monitor
21
22 #ifdef NPRINT
23 #define mtor if (0) monitor     // clever hack 
24 #else
25 #define mtor if (check_debug) monitor.identify_as(__PRETTY_FUNCTION__)
26 #endif
27
28 extern bool check_debug;
29
30 #endif