]> git.donarmstrong.com Git - lilypond.git/blob - src/debug.cc
7620027c91f6f89febbc4ee41bcef3581fd43395
[lilypond.git] / src / debug.cc
1 #include <fstream.h>
2 #include <std/new.h>
3 #include "debug.hh"
4 #include "dstream.hh"
5 #include "vector.hh"
6
7 Dstream monitor(&cout,".dstreamrc");
8 ostream * nulldev = new ofstream("/dev/null");
9
10
11 /*
12   want to do a stacktrace .
13   */
14 void
15 mynewhandler()
16 {
17     cerr << "Out of free store memory. Aborting.. "<< flush;
18     assert(false);
19 }
20
21
22 void
23 debug_init()
24 {
25     set_new_handler(&mynewhandler);
26     set_matrix_debug(monitor);
27 }   
28
29 bool check_debug=false;
30
31 void
32 set_debug(bool b)
33 {
34     check_debug =b;
35 }