X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fpaper-outputter.cc;h=d366426093afcd737672c2cd38a6f46a93360303;hb=933acc9467da9d5ed6bd20eedc483e8b79ce58c0;hp=41a941884dc5ef7c763899da48f544195c1ebc3b;hpb=75eebcb49e52d296b1da3e1074e0825d2c780db4;p=lilypond.git diff --git a/lily/paper-outputter.cc b/lily/paper-outputter.cc index 41a941884d..d366426093 100644 --- a/lily/paper-outputter.cc +++ b/lily/paper-outputter.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--2006 Han-Wen Nienhuys + (c) 1997--2009 Han-Wen Nienhuys Jan Nieuwenhuizen */ @@ -11,12 +11,13 @@ #include #include + using namespace std; #include "dimensions.hh" #include "file-name.hh" #include "font-metric.hh" -#include "input-smob.hh" +#include "input.hh" #include "lily-version.hh" #include "main.hh" #include "output-def.hh" @@ -28,14 +29,21 @@ using namespace std; #include "ly-smobs.icc" -Paper_outputter::Paper_outputter (SCM port, String format) +Paper_outputter::Paper_outputter (SCM port, string format) { file_ = port; output_module_ = SCM_EOL; smobify_self (); - String module_name = "scm output-" + format; - output_module_ = scm_c_resolve_module (module_name.to_str0 ()); + string module_name = "scm output-" + format; + output_module_ = scm_c_resolve_module (module_name.c_str ()); + + /* + Enable errors for undefined stencil routines if + -dwarning-as-error is specified; else enable warnings. + */ + SCM proc = ly_lily_module_constant ("backend-testing"); + scm_call_1 (proc, output_module_); } Paper_outputter::~Paper_outputter () @@ -54,9 +62,10 @@ Paper_outputter::mark_smob (SCM x) } int -Paper_outputter::print_smob (SCM x, SCM p, scm_print_state*) +Paper_outputter::print_smob (SCM /* x */, + SCM p, + scm_print_state *) { - (void) x; scm_puts ("#", p); return 1; } @@ -103,5 +112,14 @@ void Paper_outputter::close () { if (scm_port_p (file_) == SCM_BOOL_T) - scm_close_port (file_); + { + scm_close_port (file_); + /* + Remove the "warning" definitions for missing stencil + expressions so that we start fresh with the next \book + block. --pmccarty + */ + SCM proc = ly_lily_module_constant ("remove-stencil-warnings"); + scm_call_1 (proc, output_module_); + } }