From: fred Date: Sun, 24 Mar 2002 19:38:09 +0000 (+0000) Subject: lilypond-0.0.49 X-Git-Tag: release/1.5.59~5024 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=b9d2d0ae5a5f377070e3d81824ce60de072070d1;p=lilypond.git lilypond-0.0.49 --- diff --git a/lily/include/debug.hh b/lily/include/debug.hh new file mode 100644 index 0000000000..00f0a38e82 --- /dev/null +++ b/lily/include/debug.hh @@ -0,0 +1,36 @@ +/* + Argh! this sux! implementation not liblily + */ + +#ifndef DEBUG_HH +#define DEBUG_HH + +#include +#include +#include "dstream.hh" +#include "real.hh" +#include "proto.hh" +#include "warn.hh" + +void error_t(const String& s, Time_description const & t_tdes); +void error_t(String const &s, const Moment &when); + +#define WARN warnout << "warning: "<<__FUNCTION__ << "(): " +extern ostream &warnout ; + +// progress +extern ostream *mlog; + +// debugging +extern Dstream *monitor; // monitor + + +#ifdef NPRINT +#define mtor if (0) *monitor // clever hack +#else +#define mtor if (check_debug) monitor->identify_as(__PRETTY_FUNCTION__) +#endif + +extern bool check_debug; + +#endif diff --git a/lily/warn.cc b/lily/warn.cc index 08c8b52696..3e6b98f9f1 100644 --- a/lily/warn.cc +++ b/lily/warn.cc @@ -21,13 +21,6 @@ ostream &warnout (cerr); ostream *mlog(&cerr); -void -error(String s) -{ - cerr << "error: " << s << "\n"; - - exit(1); -} void error_t(String const & s, Moment const & r) @@ -43,16 +36,3 @@ error_t(String const & s, Time_description const &t_tdes) String e=s+ " (at t=" + String(t_tdes.bars_i_) + ": " + String(t_tdes.whole_in_measure_) + ")\n"; error(e); } - -void -warning(String m) -{ - cerr << "warning" <