X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fpaper-book.cc;h=3db1321f5e495b199915d39007a937638b71f76d;hb=1c859650b6ff11a7dbe829328fd5cae3816b9231;hp=7b43799e996db98af25b9499f15cd1240d10050a;hpb=eeec992b7029d0982bf4ed0eb3995e9ca99c10e9;p=lilypond.git diff --git a/lily/paper-book.cc b/lily/paper-book.cc index 7b43799e99..3db1321f5e 100644 --- a/lily/paper-book.cc +++ b/lily/paper-book.cc @@ -3,12 +3,13 @@ source file of the GNU LilyPond music typesetter - (c) 2004--2008 Jan Nieuwenhuizen + (c) 2004--2009 Jan Nieuwenhuizen */ #include "paper-book.hh" #include "grob.hh" +#include "international.hh" #include "main.hh" #include "output-def.hh" #include "paper-column.hh" @@ -174,25 +175,38 @@ Paper_book::output (SCM output_channel) if (get_program_option ("print-pages")) { - SCM func = scm_c_module_lookup (mod, "output-framework"); - - func = scm_variable_ref (func); - scm_apply_0 (func, scm_list_n (output_channel, - self_scm (), - scopes, - dump_fields (), - SCM_UNDEFINED)); + SCM framework = ly_module_lookup (mod, ly_symbol2scm ("output-framework")); + + if (framework != SCM_BOOL_F) + { + SCM func = scm_variable_ref (framework); + scm_apply_0 (func, scm_list_n (output_channel, + self_scm (), + scopes, + dump_fields (), + SCM_UNDEFINED)); + } + else + warning (_f ("program option -dprint-pages not supported by backend `%s'", + get_output_backend_name ())); } if (get_program_option ("preview")) { - SCM func = scm_c_module_lookup (mod, "output-preview-framework"); - func = scm_variable_ref (func); - scm_apply_0 (func, scm_list_n (output_channel, - self_scm (), - scopes, - dump_fields (), - SCM_UNDEFINED)); + SCM framework = ly_module_lookup (mod, ly_symbol2scm ("output-preview-framework")); + + if (framework != SCM_BOOL_F) + { + SCM func = scm_variable_ref (framework); + scm_apply_0 (func, scm_list_n (output_channel, + self_scm (), + scopes, + dump_fields (), + SCM_UNDEFINED)); + } + else + warning (_f ("program option -dpreview not supported by backend `%s'", + get_output_backend_name ())); } } @@ -587,8 +601,11 @@ Paper_book::pages () } else if (scm_is_pair (scores_)) { - SCM proc = paper_->c_variable ("page-breaking-wrapper"); - pages_ = scm_apply_0 (proc, scm_list_1 (self_scm ())); + SCM page_breaking = paper_->c_variable ("page-breaking"); + pages_ = scm_apply_0 (page_breaking, scm_list_1 (self_scm ())); + SCM post_process = paper_->c_variable ("page-post-process"); + if (ly_is_procedure (post_process)) + scm_apply_2 (post_process, paper_->self_scm (), pages_, SCM_EOL); /* set systems_ from the pages */ if (systems_ == SCM_BOOL_F)