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