]> git.donarmstrong.com Git - lilypond.git/blob - hdr/debug.hh
release: 0.0.33
[lilypond.git] / hdr / debug.hh
1 #ifndef DEBUG_HH
2 #define DEBUG_HH
3
4 #include <assert.h>
5 #include <iostream.h>
6 #include "dstream.hh"
7 #include "real.hh"
8 #include "proto.hh"
9
10 void message( String message_str, char const* context_ch_c_l );
11 void warning( String message_str, char const* context_ch_c_l );
12 void error( String message_str, char const* context_ch_c_l );
13 void error(String s);           // errors
14 void error_t(const String& s, Time_description const &  t_tdes);
15 void error_t(String const &s, const Moment &when);
16 // warnings
17 //void warning(String s);
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 #define mtor if (0) *monitor    // clever hack 
29 #else
30 #define mtor if (check_debug) monitor->identify_as(__PRETTY_FUNCTION__)
31 #endif
32
33 extern bool check_debug;
34
35 #endif