X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fpaper-book.cc;h=f1787e99550f2bb09eb001188b69384c69e5f004;hb=dcb458c225534895f69f4c05137809d20d6a79b9;hp=fad78957fd75092ccdf3a1e32588b6f7343c5e18;hpb=1de3d397c18622b6061402fef18e625701712bc5;p=lilypond.git diff --git a/lily/paper-book.cc b/lily/paper-book.cc index fad78957fd..f1787e9955 100644 --- a/lily/paper-book.cc +++ b/lily/paper-book.cc @@ -33,8 +33,6 @@ #include "ly-module.hh" #include "lily-imports.hh" -using std::string; -using std::vector; Paper_book::Paper_book () { @@ -55,7 +53,7 @@ Paper_book::~Paper_book () { } -const char Paper_book::type_p_name_[] = "ly:paper-book?"; +const char * const Paper_book::type_p_name_ = "ly:paper-book?"; SCM Paper_book::mark_smob () const @@ -221,6 +219,25 @@ Paper_book::output (SCM output_channel) warning (_f ("program option -dpreview not supported by backend `%s'", get_output_backend_name ())); } + + if (get_program_option ("crop")) + { + SCM framework + = ly_module_lookup (mod, ly_symbol2scm ("output-crop-framework")); + + if (scm_is_true (framework)) + { + SCM func = scm_variable_ref (framework); + scm_call_4 (func, + output_channel, + self_scm (), + scopes, + dump_fields ()); + } + else + warning (_f ("program option -dcrop not supported by backend `%s'", + get_output_backend_name ())); + } } void @@ -516,7 +533,7 @@ Paper_book::get_system_specs () SCM footnotes = get_footnotes (unsmob (t)->expr ()); ps->set_property ("footnotes", footnotes); ps->set_property ("is-title", SCM_BOOL_T); - if (list == texts) + if (scm_is_eq (list, texts)) first = ps; else {