]> git.donarmstrong.com Git - lilypond.git/commitdiff
* lily/include/paper-score.hh (class Paper_score): remove unused prototypes.
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Mon, 18 Apr 2005 00:36:45 +0000 (00:36 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Mon, 18 Apr 2005 00:36:45 +0000 (00:36 +0000)
* lily/book.cc (process): add -COUNT to midi output.

* lily/score.cc (book_rendering): remove outname argument
(book_rendering): return list of Music_outputs.

* lily/global-context-scheme.cc (LY_DEFINE): remove outname argument.

* lily/book.cc (process): loop over Music_outputs returned from Score::book_rendering().

* lily/include/music-output.hh (class Music_output): smobify class.

* lily/include/paper-score.hh (class Paper_score): make members private.

* lily/performance.cc (process): return #f iso. #<undefined>. This
prevents #<undefined> leaking into GUILE-userspace.

27 files changed:
ChangeLog
lily/arpeggio.cc
lily/beam.cc
lily/book.cc
lily/break-algorithm.cc
lily/break-align-interface.cc
lily/dot-column.cc
lily/global-context-scheme.cc
lily/gourlay-breaking.cc
lily/grob.cc
lily/hara-kiri-group-spanner.cc
lily/include/global-context.hh
lily/include/music-output.hh
lily/include/paper-score.hh
lily/include/performance.hh
lily/include/score.hh
lily/include/system.hh
lily/item.cc
lily/music-output.cc
lily/paper-score.cc
lily/performance.cc
lily/score-engraver.cc
lily/score-scheme.cc
lily/score.cc
lily/spacing-spanner.cc
lily/spanner.cc
lily/system.cc

index 68f8a806dd4a5eff76d8b81089063cde2cb0d88d..8f3bc2eb1c4cef76e9711ccaa2c8f2f9058eb271 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,23 @@
 2005-04-18  Han-Wen Nienhuys  <hanwen@xs4all.nl>
 
+       * lily/include/paper-score.hh (class Paper_score): remove unused prototypes.
+
+       * lily/book.cc (process): add -COUNT to midi output.
+
+       * lily/score.cc (book_rendering): remove outname argument
+       (book_rendering): return list of Music_outputs. 
+
+       * lily/global-context-scheme.cc (LY_DEFINE): remove outname argument.
+
+       * lily/book.cc (process): loop over Music_outputs returned from Score::book_rendering().
+
+       * lily/*.cc (width_callback): remove spurious "unused" warnings
+       for assert (axis==[XY]_AXIS); 
+
+       * lily/include/music-output.hh (class Music_output): smobify class.
+
+       * lily/include/paper-score.hh (class Paper_score): make members private.
+
        * lily/performance.cc (process): return #f iso. #<undefined>. This
        prevents #<undefined> leaking into GUILE-userspace.
 
index 2a1a32b533ba516e3a5ac4903e145781044c9999..7fede4a5ab306af32ca63d7671f3ff90729efa8b 100644 (file)
@@ -140,8 +140,9 @@ SCM
 Arpeggio::width_callback (SCM smob, SCM axis)
 {
   Grob *me = unsmob_grob (smob);
-  Axis a = (Axis)scm_to_int (axis);
-  assert (a == X_AXIS);
+  (void) axis;
+  
+  assert (scm_to_int (axis) == X_AXIS);
   Stencil arpeggio = Font_interface::get_default_font (me)->find_by_name ("scripts.arpeggio");
 
   return ly_interval2scm (arpeggio.extent (X_AXIS));
index d8b2a37887bd64ee329b4eee672f0d019bbf7773..7d277dac508f45f4190bd17944bc0a25860611db 100644 (file)
@@ -1287,12 +1287,12 @@ SCM
 Beam::rest_collision_callback (SCM element_smob, SCM axis)
 {
   Grob *rest = unsmob_grob (element_smob);
-  Axis a = (Axis) scm_to_int (axis);
+  (void) axis;
 
   if (scm_is_number (rest->get_property ("staff-position")))
     return scm_int2num (0);
 
-  assert (a == Y_AXIS);
+  assert (scm_to_int (axis) == Y_AXIS);
 
   Grob *st = unsmob_grob (rest->get_property ("stem"));
   Grob *stem = st;
index 7e3d29b77827cb9f772f61df521be4c194a713e9..e0388c00c38bb42be06372bf8eedad14dc78f5ce 100644 (file)
@@ -23,6 +23,9 @@
 #include "text-item.hh"
 #include "warn.hh"
 
+#include "performance.hh"
+#include "paper-score.hh"
+
 #include "ly-smobs.icc"
 
 Book::Book ()
@@ -95,20 +98,36 @@ Book::process (String outname, Output_def *default_def)
   paper_book->header_ = header_;
 
   /* Render in order of parsing.  */
+  int midi_count = 0;
   for (SCM s = scm_reverse (scores_); s != SCM_EOL; s = scm_cdr (s))
     {
       if (Score *score = unsmob_score (scm_car (s)))
        {
-         SCM systems = score
-           ->book_rendering (outname, paper_book->paper_, default_def, key);
+         SCM outputs = score
+           ->book_rendering (paper_book->paper_, default_def, key);
 
-         /* If the score is empty, generate no output.  Should we do
-            titling? */
-         if (scm_is_vector (systems))
+         while (scm_is_pair (outputs))
            {
-             if (ly_c_module_p (score->header_))
-               paper_book->add_score (score->header_);
-             paper_book->add_score (systems);
+             Music_output *output = unsmob_music_output (scm_car (outputs));
+
+             if (Performance *perf = dynamic_cast<Performance *> (output))
+               {
+                 String fn = outname;
+                 if (midi_count)
+                   fn += "-" + to_string (midi_count);
+
+                 midi_count ++;
+                 perf->write_output (fn);
+               }
+             else if (Paper_score *pscore = dynamic_cast<Paper_score *> (output)) 
+               {
+                 SCM systems = pscore->get_systems ();
+                 if (ly_c_module_p (score->header_))
+                   paper_book->add_score (score->header_);
+                 paper_book->add_score (systems);
+               }
+             
+             outputs = scm_cdr (outputs);
            }
        }
       else if (Text_interface::markup_p (scm_car (s)))
index 66be64c8dfa5bae836fe2860614f3778c161f6a0..96f4031a08957e5c7e610c7c5c11fc85775da699 100644 (file)
@@ -19,7 +19,7 @@
 Array<int>
 Break_algorithm::find_break_indices () const
 {
-  Link_array<Grob> all = pscore_->system_->columns ();
+  Link_array<Grob> all = pscore_->root_system ()->columns ();
   Array<int> retval;
 
   for (int i = 0; i < all.size (); i++)
@@ -36,7 +36,7 @@ Break_algorithm::find_break_indices () const
 Link_array<Grob>
 Break_algorithm::find_breaks () const
 {
-  Link_array<Grob> all = pscore_->system_->columns ();
+  Link_array<Grob> all = pscore_->root_system ()->columns ();
   Link_array<Grob> retval;
 
   for (int i = 0; i < all.size (); i++)
@@ -88,7 +88,7 @@ void
 Break_algorithm::set_pscore (Paper_score *s)
 {
   pscore_ = s;
-  linewidth_ = s->layout_->get_dimension (ly_symbol2scm ("linewidth"));
+  linewidth_ = s->layout ()->get_dimension (ly_symbol2scm ("linewidth"));
 }
 
 Array<Column_x_positions>
index 1b3daecdb32ec39cc35aa5bcb34ec51a08aaa9db..c2d4b09828197cf8d4eafb595ced3e029243c98c 100644 (file)
@@ -43,8 +43,8 @@ SCM
 Break_align_interface::self_align_callback (SCM element_smob, SCM axis)
 {
   Grob *me = unsmob_grob (element_smob);
-  Axis a = (Axis) scm_to_int (axis);
-  assert (a == X_AXIS);
+  (void)  axis;
+  assert (scm_to_int (axis) == X_AXIS);
 
   Item *item = dynamic_cast<Item *> (me);
   Direction bsd = item->break_status_dir ();
index 005651a1230f684499ce7de610184a92ef8e0077..2b0e59494c1802f0566c74cb8e12babe31e195fd 100644 (file)
@@ -29,8 +29,8 @@ SCM
 Dot_column::force_shift_callback (SCM element_smob, SCM axis)
 {
   Grob *me = unsmob_grob (element_smob);
-  Axis a = (Axis) scm_to_int (axis);
-  assert (a == Y_AXIS);
+  (void) axis;
+  assert (scm_to_int (axis) == Y_AXIS);
   me = me->get_parent (X_AXIS);
 
   if (!to_boolean (me->get_property ("positioning-done")))
@@ -47,8 +47,8 @@ SCM
 Dot_column::side_position (SCM element_smob, SCM axis)
 {
   Grob *me = unsmob_grob (element_smob);
-  Axis a = (Axis) scm_to_int (axis);
-  assert (a == X_AXIS);
+  (void) axis;
+  assert (scm_to_int (axis) == X_AXIS);
 
   Grob *stem = unsmob_grob (me->get_property ("stem"));
   if (stem
index 4f717561533cbc1fd28a84aa20a2b1bc20ab7194..c98a6fd8e458aef15b0d304d66c92b8d175b0d5a 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 ();
   progress_indication ("\n");
-
-  /* ugh, midi still wants outname  */
-  return output->process (ly_scm2string (outname));
+  output->process ();
+  return output->self_scm ();
 }
 
 LY_DEFINE (ly_run_translator, "ly:run-translator",
index 4143f0f11cdf2c063ead8b51baf10ac35219a590..3c7ed01a9727bcdc99a634dd26f979ff7e2ec34b 100644 (file)
@@ -77,15 +77,15 @@ Gourlay_breaking::do_solve () const
 {
   Array<Break_node> optimal_paths;
   Link_array<Grob> all
-    = pscore_->system_->columns ();
+    = pscore_->root_system ()->columns ();
 
   Array<int> breaks = find_break_indices ();
 
   Break_node first_node;
   optimal_paths.push (first_node);
 
-  bool ragged_right = to_boolean (pscore_->layout_->c_variable ("raggedright"));
-  bool ragged_last = to_boolean (pscore_->layout_->c_variable ("raggedlast"));
+  bool ragged_right = to_boolean (pscore_->layout ()->c_variable ("raggedright"));
+  bool ragged_last = to_boolean (pscore_->layout ()->c_variable ("raggedlast"));
 
   Real worst_force = 0.0;
   for (int break_idx = 1; break_idx < breaks.size (); break_idx++)
@@ -111,7 +111,7 @@ Gourlay_breaking::do_solve () const
          cp.cols_ = line;
 
          Interval line_dims
-           = line_dimensions_int (pscore_->layout_, optimal_paths[start_idx].line_);
+           = line_dimensions_int (pscore_->layout (), optimal_paths[start_idx].line_);
          Simple_spacer_wrapper *sp = generate_spacing_problem (line, line_dims);
          bool last_line = break_idx == breaks.size () - 1;
          bool ragged = ragged_right
index 31c5add45866776c9760151c04c08c27592c797b..fca538fb7eb67bd601cae254bda3c2e8b0729fb1 100644 (file)
@@ -172,7 +172,7 @@ robust_relative_extent (Grob *me, Grob *refp, Axis a)
 Output_def *
 Grob::get_layout () const
 {
-  return pscore_ ? pscore_->layout_ : 0;
+  return pscore_ ? pscore_->layout () : 0;
 }
 
 /* Recursively track all dependencies of this Grob.  The status_ field
@@ -663,8 +663,8 @@ Grob::mark_smob (SCM ses)
   if (s->original_)
     scm_gc_mark (s->original_->self_scm ());
 
-  if (s->pscore_ && s->pscore_->layout_)
-    scm_gc_mark (s->pscore_->layout_->self_scm ());
+  if (s->pscore_ && s->pscore_->layout ())
+    scm_gc_mark (s->pscore_->layout ()->self_scm ());
 
   s->do_derived_mark ();
   return s->mutable_property_alist_;
index 6ff6f4a95c1dcaed88748939523e8444255775fc..22975589cbe2df8aad1482ac6f0da63da81c4b1e 100644 (file)
@@ -19,9 +19,9 @@ SCM
 Hara_kiri_group_spanner::y_extent (SCM element_smob, SCM scm_axis)
 {
   Grob *me = unsmob_grob (element_smob);
-  Axis a = (Axis) scm_to_int (scm_axis);
+  (void) scm_axis;
 
-  assert (a == Y_AXIS);
+  assert (scm_to_int (scm_axis) == Y_AXIS);
   consider_suicide (me);
   return Axis_group_interface::group_extent_callback (me->self_scm (), scm_axis);
 }
@@ -59,8 +59,9 @@ SCM
 Hara_kiri_group_spanner::force_hara_kiri_callback (SCM element_smob, SCM axis)
 {
   Grob *me = unsmob_grob (element_smob);
-  Axis a = (Axis) scm_to_int (axis);
-  assert (a == Y_AXIS);
+  (void) axis;
+  
+  assert (scm_to_int (axis) == Y_AXIS);
   consider_suicide (me);
   return scm_make_real (0.0);
 }
index a51859f3a5e9d6850b78eed0d774c9549b6ba4b7..adc0b07932e6098315b518ea3b1d7e783f262051 100644 (file)
@@ -44,6 +44,6 @@ protected:
   Moment now_mom_;
 };
 
-SCM ly_format_output (SCM, SCM);
+SCM ly_format_output (SCM);
 
 #endif // GLOBAL_CONTEXT_HH
index cb75cc706114a018f84075613ceaa27245ad648b..c185f622475684193082862c1b500b50fb5d553c 100644 (file)
 #include "string.hh"
 #include "lily-proto.hh"
 #include "protected-scm.hh"
+#include "smobs.hh"
 
 class Music_output
 {
+  DECLARE_SMOBS(Music_output, foo);
+
+protected:
+  Music_output ();
+
 public:
-  virtual SCM process (String)
-  virtual ~Music_output ();
+  virtual void derived_mark () const
+  virtual void process (); 
 };
 
+DECLARE_UNSMOB (Music_output, music_output);
+
 #endif /* MUSIC_OUTPUT_HH */
index bd90ec1de26f030a5e163bfd31f34cbd94fe08ff..10f60042423cbea1ce32b96cbd60ff04042f431e 100644 (file)
 /* LAYOUT output */
 class Paper_score : public Music_output
 {
-public:
   Output_def *layout_;
   System *system_;
+  SCM systems_;
 
-  Paper_score ();
+public:
+  Paper_score (Output_def *);
 
-  int find_col_idx (Paper_column const *) const;
-  Link_array<Item> broken_col_range (Item const *, Item const *) const;
-  void typeset_line (System *);
-  void output ();
+  Output_def *layout () const;
+  System *root_system () const;
+  
+  void typeset_system (System *);
+  Array<Column_x_positions> calc_breaking ();
 
+  SCM get_systems () const;
 protected:
-  virtual SCM process (String);
+  virtual void process ();
+  virtual void derived_mark () const;
 
 private:
-  Protected_scm systems_;
-
-  void preprocess ();
-  void calc_idealspacing ();
-  Array<Column_x_positions> calc_breaking ();
-  void postprocess ();
   Paper_score (Paper_score const &);
 };
 
index 1d46cd8f66fe128837419d1457b5ddb5da761c9d..2fad187dcbebd2335a58d674b94a888c3b5d61d0 100644 (file)
@@ -24,7 +24,7 @@ public:
   void output_header_track (Midi_stream &midi_stream_r);
 
   void print () const;
-  SCM process (String);
+  void write_output (String filename);
 
   Link_array<Audio_staff> audio_staffs_;
   Cons<Audio_element> *audio_element_list_;
index f1c42fb1a6a7bc9041c0ca919ee27e27417c4e52..ed6aecddd27ffe4f3e7cdc55c704fe0a84418494 100644 (file)
@@ -35,7 +35,7 @@ public:
 
   SCM get_music () const;
   void set_music (SCM music, SCM parser);
-  SCM book_rendering (String, Output_def *, Output_def *, Object_key *);
+  SCM book_rendering (Output_def *, Output_def *, Object_key *);
 };
 
 DECLARE_UNSMOB (Score, score);
index 5eaa2bed66d2c5b5364a721dbbfba78463f9589f..ea31faa752100070cbf80eadc5f8b1879e391b43 100644 (file)
@@ -21,8 +21,8 @@ class System : public Spanner
 public:
   int rank_;
   void post_processing ();
-  SCM get_line ();
-  SCM get_lines ();
+  SCM get_paper_system ();
+  SCM get_paper_systems ();
 
   System (SCM, Object_key const *);
   System (System const &, int);
index 369d4f5178849b53fc00673d6ce15216fbf751ed..d478d682e23ac07195c3af4e4e41408804d53ed7 100644 (file)
@@ -74,7 +74,7 @@ Item::copy_breakable_items ()
     {
       Grob *dolly = clone (count++);
       Item *item = dynamic_cast<Item *> (dolly);
-      pscore_->system_->typeset_grob (item);
+      pscore_->root_system ()->typeset_grob (item);
       new_copies[i] = item;
     }
   while (flip (&i) != LEFT);
index 67b95303e4ca76a6664c9da5be95a12512a374e2..958a78a8874f2ef9f65b32ce24cc6917d5171c7b 100644 (file)
@@ -8,14 +8,16 @@
 */
 
 #include "music-output.hh" 
+#include "ly-smobs.icc"
 
-/*
-  Just stubs.
- */
-SCM
+Music_output::Music_output ()
+{
+  smobify_self ();
+}
+
+void
 Music_output::process ()
 {
-  return SCM_EOL;
 }
 
 Music_output::~Music_output ()
@@ -23,3 +25,28 @@ Music_output::~Music_output ()
   
 }
   
+void
+Music_output::derived_mark () const
+{
+}
+
+IMPLEMENT_SMOBS (Music_output);
+IMPLEMENT_DEFAULT_EQUAL_P (Music_output);
+IMPLEMENT_TYPE_P (Music_output, "ly:score?");
+
+SCM
+Music_output::mark_smob (SCM s)
+{
+  Music_output *sc = (Music_output *) SCM_CELL_WORD_1 (s);
+
+  sc->derived_mark ();
+  return SCM_EOL;
+}
+
+int
+Music_output::print_smob (SCM, SCM p, scm_print_state*)
+{
+  scm_puts ("#<Music_output>", p);
+
+  return 1;
+}
index 800aa132ed77023f08d0388d5e9c4c7933de4124..c6ff9edcfbd3903c002ac7d86fbbb2c4dbaf55e1 100644 (file)
 #include "system.hh"
 #include "warn.hh"
 
-Paper_score::Paper_score ()
+Paper_score::Paper_score (Output_def *layout)
 {
-  layout_ = 0;
+  layout_ = layout;
   system_ = 0;
+  systems_ = SCM_EOL;
 }
 
 Paper_score::Paper_score (Paper_score const &s)
@@ -33,8 +34,15 @@ Paper_score::Paper_score (Paper_score const &s)
   assert (false);
 }
 
+
+void
+Paper_score::derived_mark () const
+{
+  scm_gc_mark (systems_);
+}
+
 void
-Paper_score::typeset_line (System *system)
+Paper_score::typeset_system (System *system)
 {
   if (!system_)
     system_ = system;
@@ -59,8 +67,8 @@ Paper_score::calc_breaking ()
   return sol;
 }
 
-SCM
-Paper_score::process (String)
+void
+Paper_score::process ()
 {
   if (be_verbose_global)
     message (_f ("Element count %d (spanners %d) ",
@@ -81,12 +89,24 @@ Paper_score::process (String)
 
   Array<Column_x_positions> breaking = calc_breaking ();
   system_->break_into_pieces (breaking);
-  SCM lines = system_->get_lines ();
-
-  /*
-    retain Grobs, since they are pointed to by the point & click data
-    structures, and are not marked fully, because child -> parent
-    links aren't marked.
-   */
-  return lines;
+  system_->get_paper_systems ();
+}
+
+System *
+Paper_score::root_system () const
+{
+  return system_;
+}
+
+Output_def *
+Paper_score::layout () const
+{
+  return layout_;
+}
+  
+
+SCM
+Paper_score::get_systems () const
+{
+  return root_system ()->get_paper_systems ();
 }
index f030631acc5643d518982bcde220f5389123a895..6735f025a79fa0c07de30f6538d95947bb32413e 100644 (file)
@@ -149,8 +149,9 @@ Performance::add_element (Audio_element *p)
   audio_element_list_ = new Killing_cons<Audio_element> (p, audio_element_list_);
 }
 
-SCM
-Performance::process (String out)
+
+void
+Performance::write_output (String out)
 {
   if (out == "-")
     out = "lelie.midi";
@@ -165,5 +166,4 @@ Performance::process (String out)
 
   output (midi_stream);
   progress_indication ("\n");
-  return SCM_BOOL_F;
 }
index 648cc6a7581cd6318a3ec6a4c559f7af50c2b231..442574125418c212a9039b419b668ce959bb7d57 100644 (file)
@@ -111,15 +111,14 @@ Score_engraver::initialize ()
             + _ ("Aborting"));
     }
 
-  pscore_ = new Paper_score;
-  pscore_->layout_ = dynamic_cast<Output_def *> (get_output_def ());
+  pscore_ = new Paper_score (dynamic_cast<Output_def *> (get_output_def ()));
 
   SCM props = updated_grob_properties (context (), ly_symbol2scm ("System"));
 
   Object_key const *sys_key = context ()->get_grob_key ("System");
-  pscore_->typeset_line (new System (props, sys_key));
+  pscore_->typeset_system (new System (props, sys_key));
 
-  system_ = pscore_->system_;
+  system_ = pscore_->root_system ();
   make_columns ();
   system_->set_bound (LEFT, command_column_);
   command_column_->set_property ("breakable", SCM_BOOL_T);
@@ -156,7 +155,7 @@ void
 Score_engraver::announce_grob (Grob_info info)
 {
   announce_infos_.push (info);
-  pscore_->system_->typeset_grob (info.grob_);
+  pscore_->root_system ()->typeset_grob (info.grob_);
   elems_.push (info.grob_);
 }
 
index 3c7f5c9a274e56e4b3d9ba9d5fd8e3bb04164dcc..56a175149e17b52d75fd3d5b8bb1fc41e176f075 100644 (file)
@@ -62,7 +62,7 @@ LY_DEFINE (ly_score_embedded_format, "ly:score-embedded-format",
 
   SCM context = ly_run_translator (sc->get_music (), score_def->self_scm (),
                                   key);
-  SCM lines = ly_format_output (context, scm_makfrom0str ("<embedded>"));
+  SCM lines = ly_format_output (context);
 
   scm_remember_upto_here_1 (prot);
   return lines;
index d00b774ec669f9e7768b865623419d4e6b7146ec..68146c1676a0a80cf1c3010bfbfc03ecfadfb4e0 100644 (file)
@@ -119,7 +119,7 @@ default_rendering (SCM music, SCM outdef,
   if (Global_context *g = dynamic_cast<Global_context *>
       (unsmob_context (context)))
     {
-      SCM systems = ly_format_output (context, outname);
+      SCM systems = ly_format_output (context);
       Music_output *output = g->get_output ();
       if (systems != SCM_UNDEFINED)
        {
@@ -135,7 +135,7 @@ default_rendering (SCM music, SCM outdef,
          paper_book->classic_output (ly_scm2string (outname));
          scm_gc_unprotect_object (paper_book->self_scm ());
        }
-      delete output;
+      scm_gc_unprotect_object (output->self_scm ());
     }
 
   scm_remember_upto_here_1 (scaled_def);
@@ -143,14 +143,12 @@ default_rendering (SCM music, SCM outdef,
 }
 
 /*
-  Format score, return systems. OUTNAME is still passed to create a midi
-  file.
+  Format score, return list of Music_output objects. 
 
   LAYOUTBOOK should be scaled already.
 */
 SCM
-Score::book_rendering (String outname,
-                      Output_def *layoutbook,
+Score::book_rendering (Output_def *layoutbook,
                       Output_def *default_def,
                       Object_key *book_key)
 {
@@ -163,8 +161,9 @@ Score::book_rendering (String outname,
   if (layoutbook && layoutbook->c_variable ("is-paper") == SCM_BOOL_T)
     scale = scm_to_double (layoutbook->c_variable ("outputscale"));
 
-  SCM out = scm_makfrom0str (outname.to_str0 ());
-  SCM systems = SCM_EOL;
+  SCM outputs = SCM_EOL;
+  SCM *tail = &outputs;
+  
   int outdef_count = defs_.size ();
 
   Object_key *key = new Lilypond_general_key (book_key, user_key_, 0);
@@ -175,6 +174,7 @@ Score::book_rendering (String outname,
     {
       Output_def *def = outdef_count ? defs_[i] : default_def;
       SCM scaled = SCM_EOL;
+
       if (def->c_variable ("is-layout") == SCM_BOOL_T)
        {
          def = scale_output_def (def, scale);
@@ -187,9 +187,10 @@ Score::book_rendering (String outname,
       SCM context = ly_run_translator (music_, def->self_scm (), scm_key);
       if (dynamic_cast<Global_context *> (unsmob_context (context)))
        {
-         SCM s = ly_format_output (context, out);
-         if (s != SCM_UNDEFINED)
-           systems = s;
+         SCM s = ly_format_output (context);
+         
+         *tail = scm_cons (s, SCM_EOL);
+         tail = SCM_CDRLOC(*tail);
        }
 
       scm_remember_upto_here_1 (scaled);
@@ -197,7 +198,7 @@ Score::book_rendering (String outname,
 
   scm_remember_upto_here_1 (scm_key);
   scm_remember_upto_here_1 (scaled_bookdef);
-  return systems;
+  return outputs;
 }
 
 void
index 8f83e656ab188f5ed53ec70de59ad5a2e26c903b..fa48551ab9a04c39ce3916586a4273c5123706f4 100644 (file)
@@ -360,7 +360,7 @@ Spacing_spanner::set_springs (SCM smob)
   /*
     can't use get_system() ? --hwn.
   */
-  Link_array<Grob> all (me->pscore_->system_->columns ());
+  Link_array<Grob> all (me->pscore_->root_system ()->columns ());
 
   set_explicit_neighbor_columns (all);
 
index 05f1443e78135e41d0cdc956e97b9889e5e7d139..adaa648a1485277b92d5ec6bff37a0fdbdb04f9b 100644 (file)
@@ -81,7 +81,7 @@ Spanner::do_break_processing ()
     }
   else
     {
-      Link_array<Item> break_points = pscore_->system_->broken_col_range (left, right);
+      Link_array<Item> break_points = pscore_->root_system ()->broken_col_range (left, right);
 
       break_points.insert (left, 0);
       break_points.push (right);
index e6b034251bd04fbc2d9b78140d126be12639c2f9..cf011b16cea906fd0d3e3cde8a6c48c5719805b0 100644 (file)
@@ -83,7 +83,7 @@ fixup_refpoints (SCM s)
 }
 
 SCM
-System::get_lines ()
+System::get_paper_systems ()
 {
   for (SCM s = get_property ("all-elements"); scm_is_pair (s); s = scm_cdr (s))
     {
@@ -154,7 +154,7 @@ System::get_lines ()
 
       System *system = dynamic_cast<System *> (broken_intos_[i]);
       system->post_processing ();
-      scm_vector_set_x (lines, scm_int2num (i), system->get_line ());
+      scm_vector_set_x (lines, scm_int2num (i), system->get_paper_system ());
 
       if (be_verbose_global)
        progress_indication (to_string (i) + "]");
@@ -171,7 +171,7 @@ System::break_into_pieces (Array<Column_x_positions> const &breaking)
       system->rank_ = i;
 
       Link_array<Grob> c (breaking[i].cols_);
-      pscore_->typeset_line (system);
+      pscore_->typeset_system (system);
 
       system->set_bound (LEFT, c[0]);
       system->set_bound (RIGHT, c.top ());
@@ -282,7 +282,7 @@ System::post_processing ()
 }
 
 SCM
-System::get_line ()
+System::get_paper_system ()
 {
   static int const LAYER_COUNT = 3;