X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fpaper-score.cc;h=6bc05c4e13807c2e3bd3ebdebd1a6cc771e9d161;hb=cfee004dad1a3138b02a297884a41b8109d6df62;hp=b7568416793f3dbc0b3e7c06858aef087d9bb233;hpb=e904008e0f0b56f7cacd330a72c2b56ec6906a93;p=lilypond.git diff --git a/lily/paper-score.cc b/lily/paper-score.cc index b756841679..6bc05c4e13 100644 --- a/lily/paper-score.cc +++ b/lily/paper-score.cc @@ -3,13 +3,15 @@ source file of the GNU LilyPond music typesetter - (c) 1996--2005 Han-Wen Nienhuys + (c) 1996--2006 Han-Wen Nienhuys */ #include "paper-score.hh" #include "all-font-metrics.hh" +#include "book.hh" #include "gourlay-breaking.hh" +#include "international.hh" #include "main.hh" #include "misc.hh" #include "output-def.hh" @@ -35,10 +37,11 @@ Paper_score::Paper_score (Paper_score const &s) assert (false); } - void Paper_score::derived_mark () const { + if (layout_) + scm_gc_mark (layout_->self_scm ()); scm_gc_mark (systems_); scm_gc_mark (paper_systems_); } @@ -51,15 +54,15 @@ Paper_score::typeset_system (System *system) systems_ = scm_cons (system->self_scm (), systems_); system->pscore_ = this; - - scm_gc_unprotect_object (system->self_scm ()); + system->layout_ = layout_; + system->unprotect (); } -Array +std::vector Paper_score::calc_breaking () { Break_algorithm *algorithm = 0; - Array sol; + std::vector sol; algorithm = new Gourlay_breaking; algorithm->set_pscore (this); @@ -85,11 +88,11 @@ Paper_score::process () doubly, also done in Score_engraver */ Link_array pc (system_->columns ()); pc[0]->set_property ("breakable", SCM_BOOL_T); - pc.top ()->set_property ("breakable", SCM_BOOL_T); + pc.back ()->set_property ("breakable", SCM_BOOL_T); system_->pre_processing (); - Array breaking = calc_breaking (); + std::vector breaking = calc_breaking (); system_->break_into_pieces (breaking); paper_systems_ = system_->get_paper_systems (); @@ -106,7 +109,6 @@ Paper_score::layout () const { return layout_; } - SCM Paper_score::get_paper_systems () const