#include "warn.hh"
#include "program-option.hh"
#include "page-marker.hh"
+#include "ly-module.hh"
+#include "lily-imports.hh"
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 ()
+Paper_book::mark_smob () const
{
if (paper_)
scm_gc_mark (paper_->self_scm ());
long page_nb = 0;
if (scm_is_pair (performances_))
{
- SCM proc = ly_lily_module_constant ("write-performances-midis");
-
- scm_call_3 (proc,
- performances (),
- output_channel,
- scm_from_long (*first_performance_number));
+ Lily::write_performances_midis (performances (),
+ output_channel,
+ scm_from_long (*first_performance_number));
*first_performance_number += scm_ilength (performances_);
}
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
{
if (scm_is_pair (performances_))
{
- SCM proc = ly_lily_module_constant ("write-performances-midis");
- scm_call_3 (proc,
- performances (),
- output,
- scm_from_long (*first_performance_number));
+ Lily::write_performances_midis (performances (),
+ output,
+ scm_from_long (*first_performance_number));
*first_performance_number += scm_ilength (performances_);
}
}
SCM page_properties
- = scm_call_1 (ly_lily_module_constant ("layout-extract-page-properties"),
- paper_->self_scm ());
+ = Lily::layout_extract_page_properties (paper_->self_scm ());
- SCM interpret_markup_list = ly_lily_module_constant ("interpret-markup-list");
SCM header = SCM_EOL;
SCM labels = SCM_EOL;
for (SCM s = scm_reverse (scores_); scm_is_pair (s); s = scm_cdr (s))
}
else if (Text_interface::is_markup_list (scm_car (s)))
{
- SCM texts = scm_call_3 (interpret_markup_list,
- paper_->self_scm (),
- page_properties,
- scm_car (s));
+ SCM texts = Lily::interpret_markup_list (paper_->self_scm (),
+ page_properties,
+ scm_car (s));
Prob *first = 0;
Prob *last = 0;
for (SCM list = texts; scm_is_pair (list); list = scm_cdr (list))
SCM footnotes = get_footnotes (unsmob<Stencil> (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
{