]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/global-context-scheme.cc
* flower/include/offset.hh (class Offset): new operator /=
[lilypond.git] / lily / global-context-scheme.cc
index 6f83fc2fc4fa86457ad6446031416256fa07ad91..914b1c7d3bda895cb5edd99f39bd6d5195e6f251 100644 (file)
 #include "main.hh"
 
 LY_DEFINE (ly_format_output, "ly:format-output",
-          2, 0, 0, (SCM context, SCM outname),
+          1, 0, 0, (SCM context),
           "Given a Global context in its final state, "
-          "process it and return the (rendered) result.")
+          "process it and return the @code{Music_output} object in its final state.")
 {
   Global_context *g = dynamic_cast<Global_context *> (unsmob_context (context));
   SCM_ASSERT_TYPE (g, context, SCM_ARG1, __FUNCTION__, "Global context");
-  SCM_ASSERT_TYPE (scm_is_string (outname), outname, SCM_ARG2, __FUNCTION__, "output file name");
 
-  Music_output *output = g->get_output ();
+  SCM output = g->get_output ();
   progress_indication ("\n");
-  /* ugh, midi still wants outname  */
-  return output->process (ly_scm2string (outname));
+  unsmob_music_output (output)->process ();
+  return output;
 }
 
 LY_DEFINE (ly_run_translator, "ly:run-translator",
@@ -87,5 +86,5 @@ LY_DEFINE (ly_run_translator, "ly:run-translator",
   if (be_verbose_global)
     message (_f ("elapsed time: %.2f seconds", timer.read ()));
 
-  return scm_gc_unprotect_object (trans->self_scm ());
+  return trans->unprotect ();
 }