From: Jan Nieuwenhuizen Date: Tue, 8 Mar 2005 13:29:24 +0000 (+0000) Subject: * input/regression/score-text.ly: Really add. X-Git-Tag: release/2.5.15~41 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=a1f93a8b48bd0fc8a66b92129c035c5e629d8fe3;p=lilypond.git * input/regression/score-text.ly: Really add. * lily/score.cc: Bugfixes for SCM header_ and texts_ members. --- diff --git a/ChangeLog b/ChangeLog index 777fa149ff..088f0ac795 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2005-03-08 Jan Nieuwenhuizen + * input/regression/score-text.ly: Really add. + * lily/score.cc: Bugfixes for SCM header_ and texts_ members. 2005-03-08 Han-Wen Nienhuys diff --git a/input/regression/score-text.ly b/input/regression/score-text.ly new file mode 100644 index 0000000000..a86f06ef18 --- /dev/null +++ b/input/regression/score-text.ly @@ -0,0 +1,45 @@ +\version "2.5.14" + +\header { + + texidoc = "Markup texts are set beneath a score." + +} + +\paper { + linewidth = #110 +} +<< + \relative { + \clef bass + d,2 d c4 bes a2 \break + c2 c d4 f g2 + } + \addlyrics { + My first Li -- ly song, + Not much can go wrong! + } +>> + \markup { + %%TODO: make \verse markup. + \fill-line { + \line { + "2. " + \column { + \line { My next Li-ly verse } + \line { Now it's getting worse! } + } + } + } + } + \markup { + \fill-line { + \line { + "3. " + \column { + \line { My last Li-ly text } + \line { See what will be next! } + } + } + } + } diff --git a/lily/paper-book.cc b/lily/paper-book.cc index c2ad1bf24f..b9e94803db 100644 --- a/lily/paper-book.cc +++ b/lily/paper-book.cc @@ -238,9 +238,10 @@ Paper_book::systems () scm_gc_unprotect_object (ps->self_scm ()); } - SCM page_properties = scm_call_1 (ly_lily_module_constant ("page-properties"), - paper_->self_scm ()); - + SCM page_properties + = scm_call_1 (ly_lily_module_constant ("layout-extract-page-properties"), + paper_->self_scm ()); + int score_count = score_systems_.size (); for (int i = 0; i < score_count; i++) { diff --git a/lily/score.cc b/lily/score.cc index ed9a0aa5ee..e072eaaaf1 100644 --- a/lily/score.cc +++ b/lily/score.cc @@ -10,18 +10,18 @@ #include -#include "lilypond-key.hh" -#include "lily-parser.hh" #include "book.hh" #include "cpu-timer.hh" #include "global-context.hh" +#include "lily-parser.hh" +#include "lilypond-key.hh" #include "ly-smobs.icc" #include "main.hh" #include "music-iterator.hh" -#include "output-def.hh" #include "music.hh" -#include "paper-book.hh" #include "output-def.hh" +#include "output-def.hh" +#include "paper-book.hh" #include "paper-score.hh" #include "scm-hash.hh" #include "warn.hh" @@ -30,8 +30,8 @@ Score::Score () : Input () { header_ = SCM_EOL; - texts_ = SCM_EOL; music_ = SCM_EOL; + texts_ = SCM_EOL; error_found_ = false; smobify_self (); } @@ -49,15 +49,8 @@ Score::mark_smob (SCM s) { Score *sc = (Score*) SCM_CELL_WORD_1 (s); -#if 0 - if (sc->key_) - scm_gc_mark (sc->key_->self_scm()); -#endif - - if (sc->header_) - scm_gc_mark (sc->header_); - if (sc->texts_) - scm_gc_mark (sc->texts_); + scm_gc_mark (sc->header_); + scm_gc_mark (sc->texts_); for (int i = sc->defs_.size (); i--;) scm_gc_mark (sc->defs_[i]->self_scm ()); return sc->music_; @@ -74,28 +67,24 @@ Score::print_smob (SCM , SCM p, scm_print_state*) Score::Score (Score const &s) : Input (s) { + header_ = SCM_EOL; music_ = SCM_EOL; + texts_ = SCM_EOL; error_found_ = s.error_found_; - - /* FIXME: SCM_EOL? */ - header_ = 0; - texts_ = 0; - smobify_self (); Music *m = unsmob_music (s.music_); music_ = m ? m->clone ()->self_scm () : SCM_EOL; scm_gc_unprotect_object (music_); - for (int i = 0; i < s.defs_.size (); i++) + for (int i = 0, n = s.defs_.size (); i < n; i++) defs_.push (s.defs_[i]->clone ()); header_ = ly_make_anonymous_module (false); if (ly_c_module_p (s.header_)) ly_module_copy (header_, s.header_); - if (s.texts_) - texts_ = s.texts_; + texts_ = s.texts_; }