]> git.donarmstrong.com Git - lilypond.git/commitdiff
* input/regression/score-text.ly: Really add.
authorJan Nieuwenhuizen <janneke@gnu.org>
Tue, 8 Mar 2005 13:29:24 +0000 (13:29 +0000)
committerJan Nieuwenhuizen <janneke@gnu.org>
Tue, 8 Mar 2005 13:29:24 +0000 (13:29 +0000)
* lily/score.cc: Bugfixes for SCM header_ and texts_ members.

ChangeLog
input/regression/score-text.ly [new file with mode: 0644]
lily/paper-book.cc
lily/score.cc

index 777fa149ff1b293a2711131d6e92baca3b19664f..088f0ac795e675cf897d144c7c3fdfda53934b14 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 2005-03-08  Jan Nieuwenhuizen  <janneke@gnu.org>
 
+       * input/regression/score-text.ly: Really add.
+
        * lily/score.cc: Bugfixes for SCM header_ and texts_ members.
 
 2005-03-08  Han-Wen Nienhuys  <hanwen@xs4all.nl>
diff --git a/input/regression/score-text.ly b/input/regression/score-text.ly
new file mode 100644 (file)
index 0000000..a86f06e
--- /dev/null
@@ -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! }
+               }
+           }
+       }
+    }
index c2ad1bf24f581903ea50b867f1d085410fa295e5..b9e94803db7a52ccfe1daa5b43659bd7452a7623 100644 (file)
@@ -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++)
     {
index ed9a0aa5eeb31352594efaff8fe6d5e279ec0ecc..e072eaaaf18181ed6cbdb62b93d5a1bec31e4a71 100644 (file)
 
 #include <cstdio>
 
-#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_;
 }