]> git.donarmstrong.com Git - lilypond.git/commitdiff
patch::: 1.3.87.jcn1
authorJan Nieuwenhuizen <janneke@gnu.org>
Mon, 18 Sep 2000 20:59:58 +0000 (22:59 +0200)
committerJan Nieuwenhuizen <janneke@gnu.org>
Mon, 18 Sep 2000 20:59:58 +0000 (22:59 +0200)
1.3.87.jcn1
===========

* Made bugfix in Simple-music-iterator copy constructor.

* Fixed get_music for sequential-music-iterator and request-chord-iterator.

1.3.87
======

CHANGES
VERSION
lily/request-chord-iterator.cc
lily/sequential-music-iterator.cc
lily/simple-music-iterator.cc

diff --git a/CHANGES b/CHANGES
index fe8475f59d96c4a43d5a89774ceff0bbe0b1d0cc..243f56c9aae764e604072c6679924e4e7f6d37e7 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,14 @@
+1.3.87.jcn1
+===========
+
+* Made bugfix in Simple-music-iterator copy constructor.
+
+* Fixed get_music for sequential-music-iterator and request-chord-iterator.
+
+
+1.3.87
+======
+
 1.3.86.jcn2
 ================
 
diff --git a/VERSION b/VERSION
index 1da5d29c9928feca18ed57f07c7b693cdeedc34d..f9581647fb90a17276665fb3932ee37e352ac1d9 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -2,7 +2,7 @@ PACKAGE_NAME=LilyPond
 MAJOR_VERSION=1
 MINOR_VERSION=3
 PATCH_LEVEL=87
-MY_PATCH_LEVEL=
+MY_PATCH_LEVEL=jcn1
 
 # use the above to send patches: MY_PATCH_LEVEL is always empty for a
 # released version.
index f463190a342dc3223c4939a5cdf54c902aba8516..86ab37eaf3eb62aade141f656cb268d88a4b07d2 100644 (file)
@@ -45,10 +45,12 @@ Request_chord_iterator::elt_l () const
   return (Request_chord*) music_l_;
 }
 
-
 SCM
-Request_chord_iterator::get_music (Moment)const
+Request_chord_iterator::get_music (Moment m) const
 {
+  Request_chord_iterator* urg = (Request_chord_iterator*)this;
+  urg->last_processed_mom_ = m;
+  urg->last_processed_mom_.set_infinite (1);
   SCM s = SCM_EOL;
   if (music_l_)
     {
@@ -58,6 +60,7 @@ Request_chord_iterator::get_music (Moment)const
        {
          s = gh_cons (gh_car (m) , s);
        }
+      urg->music_l_ = 0;
     }
   return s;
 }
index 8218251942fa75c016bad1a52b259a0805b03489..82051844b418c9b03326a2fa38e04d7ab69823a9 100644 (file)
@@ -92,37 +92,43 @@ Sequential_music_iterator::set_sequential_music_translator()
 SCM
 Sequential_music_iterator::get_music (Moment until)const
 {
-#if 0
+#if 1
   /*
      FIXME: get_music () is const, so we must operate on a copy of child-iter.
+
+     hmm, part-combiner does work on a copy; why copy again?
+     Also, simply `working on a copy' doesn't work: if request-chord's
+     get_music doesn't do next (), we'll stay in this loop forever?
   */
   
+  Sequential_music_iterator* urg = (Sequential_music_iterator*)this;
   SCM s = SCM_EOL;
   while (1) 
       {
        Moment local_until = until - here_mom_;
-       while (iter_p_->ok ()) 
+       while (urg->iter_p_->ok ()) 
          {
            Moment here = iter_p_->pending_moment ();
            if (here != local_until)
              return s;
            
-           s = gh_append2 (iter_p_->get_music (local_until), s);
+           s = gh_append2 (urg->iter_p_->get_music (local_until), s);
          }
          
-         if (!iter_p_->ok ()) 
+         if (!urg->iter_p_->ok ()) 
            {
-             //              leave_element ();
+             urg->leave_element ();
              
-             if (gh_pair_p (cursor_))
-               start_next_element ();
+             if (gh_pair_p (urg->cursor_))
+               urg->start_next_element ();
              else
                return s;
            }
        }
   return s;
-#endif
+#else
   return SCM_EOL;
+#endif
 }
 
 void
index a25147d4e9e7f6a0a806c40733cd8baf830dcd22..e919d4b5a0b23939a1b15a24f09420a8e5afce08 100644 (file)
@@ -20,7 +20,8 @@ Simple_music_iterator::Simple_music_iterator ()
 Simple_music_iterator::Simple_music_iterator (Simple_music_iterator const &src)
   : Music_iterator (src)
 {
-  last_processed_mom_ = -1;
+  last_processed_mom_ = src.last_processed_mom_;
+  length_mom_ = src.length_mom_;
 }
 
 void