]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/global-translator.cc
(score_stem_lengths): Revert oops.
[lilypond.git] / lily / global-translator.cc
index e7fe6790d7eb86656a006479c4370194c7311772..0c079c40d223d89d80c7cde2e8de5818f6ef7446 100644 (file)
@@ -3,10 +3,11 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--2001 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  (c)  1997--2002 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
+#include <stdio.h>
 
-#include "debug.hh"
+#include "warn.hh"
 #include "music.hh"
 #include "request.hh"
 #include "music-list.hh"
@@ -41,7 +42,7 @@ Global_translator::sneaky_insert_extra_moment (Moment w)
 }
 
 int
-Global_translator::moments_left_i () const
+Global_translator::get_moments_left () const
 {
   return extra_mom_pq_.size ();
 }
@@ -62,7 +63,7 @@ Global_translator::now_mom () const
 
 
 Music_output*
-Global_translator::get_output_p ()
+Global_translator::get_output ()
 {
   return 0;
 }
@@ -83,17 +84,31 @@ Global_translator::finish ()
 void
 Global_translator::run_iterator_on_me (Music_iterator * iter)
 {
-  while (iter->ok () || moments_left_i ())
+  if (iter-> ok ())
+    prev_mom_ = now_mom_ = iter->pending_moment ();
+
+  bool first = true;
+  while (iter->ok () || get_moments_left ())
     {
       Moment w;
       w.set_infinite (1);
       if (iter->ok ())
        {
          w = iter->pending_moment ();
-      
        }
 
       w = sneaky_insert_extra_moment (w);
+      
+      //      printf ("proccing %s\n ",       w.string ().to_str0 ());
+
+
+      
+      if (first)
+       {
+         first = false;
+         set_property ("measurePosition", w.smobbed_copy ());
+       }
+
       prepare (w);
       if (iter->ok ())
        iter->process (w);