X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fpaper-outputter.cc;h=d366426093afcd737672c2cd38a6f46a93360303;hb=6fcbb243f3c1106eb10e97fa1d8bcf74752748f9;hp=d3b99055e9191d72a3e120d172697173d2acea6c;hpb=bb91de5b7f8c4f753452730101c2422946067cc3;p=lilypond.git diff --git a/lily/paper-outputter.cc b/lily/paper-outputter.cc index d3b99055e9..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--2008 Han-Wen Nienhuys + (c) 1997--2009 Han-Wen Nienhuys Jan Nieuwenhuizen */ @@ -37,6 +37,13 @@ Paper_outputter::Paper_outputter (SCM port, string format) 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 () @@ -105,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_); + } }