]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-0.0.9
authorfred <fred>
Mon, 4 Nov 1996 15:18:40 +0000 (15:18 +0000)
committerfred <fred>
Mon, 4 Nov 1996 15:18:40 +0000 (15:18 +0000)
src/debug.cc [new file with mode: 0644]

diff --git a/src/debug.cc b/src/debug.cc
new file mode 100644 (file)
index 0000000..d55c901
--- /dev/null
@@ -0,0 +1,27 @@
+#include <fstream.h>
+#include <std/new.h>
+#include "debug.hh"
+#include "dstream.hh"
+#include "vector.hh"
+
+Dstream monitor(&cout,".dstreamrc");
+ostream * nulldev = new ofstream("/dev/null");
+
+
+/*
+  want to do a stacktrace .
+  */
+void
+mynewhandler()
+{
+    cerr << "Out of free store memory. Aborting.. "<< flush;
+    assert(false);
+}
+
+
+void
+debug_init()
+{
+    set_new_handler(&mynewhandler);
+    set_matrix_debug(monitor);
+}