- print();
- for (int i=0; i < def_p_arr_.size (); i++)
- {
- if (no_paper_global_b
- && def_p_arr_[i]->is_type_b (Paper_def::static_name ()))
- continue;
- run_translator (def_p_arr_[i]);
- }
-}
+LY_DEFINE(ly_render_output, "ly:render-output",
+ 3,0,0,
+ (SCM context, SCM header, SCM out_filename),
+ "Given a Score context in its final state, calculate the output, "
+ "and dump the result to @var{out-filename}, using "
+ "@var{header} for the bibliographic information.")
+{
+ Translator *tr = unsmob_translator (context);
+ Global_translator * gt = dynamic_cast<Global_translator*> (tr);
+
+ SCM_ASSERT_TYPE(gt, context, SCM_ARG1, __FUNCTION__,
+ "Score context");
+ SCM_ASSERT_TYPE(ly_module_p(header), header, SCM_ARG2, __FUNCTION__,
+ "module");
+ SCM_ASSERT_TYPE(gh_string_p (out_filename), out_filename, SCM_ARG3, __FUNCTION__,
+ "output filename");