source file of the GNU LilyPond music typesetter
- (c) 2004--2008 Jan Nieuwenhuizen <janneke@gnu.org>
+ (c) 2004--2009 Jan Nieuwenhuizen <janneke@gnu.org>
*/
#include "paper-book.hh"
#include "grob.hh"
+#include "international.hh"
#include "main.hh"
#include "output-def.hh"
#include "paper-column.hh"
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 ()));
}
}
}
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)