]> git.donarmstrong.com Git - lilypond.git/commitdiff
patch::: 1.3.86.jcn3
authorJan Nieuwenhuizen <janneke@gnu.org>
Thu, 14 Sep 2000 22:54:55 +0000 (00:54 +0200)
committerJan Nieuwenhuizen <janneke@gnu.org>
Thu, 14 Sep 2000 22:54:55 +0000 (00:54 +0200)
1.3.86.jcn3
===========

* Made several fixes, simple music starts to work.

1.3.86.jcn2
===========

* Replaced try_music and next functionality of do_process_and_next by
  get_music and next.  Process functionality of do_process_and_next
  is handled by do_process.

CHANGES
VERSION
lily/global-translator.cc
lily/sequential-music-iterator.cc
lily/simultaneous-music-iterator.cc

diff --git a/CHANGES b/CHANGES
index aa2080ce3682020c462b39fe7cb94d4340c23f38..661c3999a15f35c0b560a6940906afa002bf3133 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,15 @@
+1.3.86.jcn3
+===========
+
+* Made several fixes, simple music starts to work.
+
+1.3.86.jcn2
+===========
+
+* Replaced try_music and next functionality of do_process_and_next by
+  get_music and next.  Process functionality of do_process_and_next
+  is handled by do_process.
+
 1.3.86.jcn1
 ===========
 
diff --git a/VERSION b/VERSION
index 9bae1a93632a2b8d97e664b4d9896f59b0fbb11e..bc9bf2740ddff3468fd1c5f995299fe195cecbf8 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -2,7 +2,7 @@ PACKAGE_NAME=LilyPond
 MAJOR_VERSION=1
 MINOR_VERSION=3
 PATCH_LEVEL=86
-MY_PATCH_LEVEL=jcn2
+MY_PATCH_LEVEL=jcn3
 
 # use the above to send patches: MY_PATCH_LEVEL is always empty for a
 # released version.
index 3ecc44b4e085101cdf6a0d6c2422e3c4ffb95b2d..de0ee4c4afbf9d9a6b2d5a994caaca064bbaf8d4 100644 (file)
@@ -8,6 +8,8 @@
 
 #include "debug.hh"
 #include "music.hh"
+#include "request.hh"
+#include "music-list.hh"
 #include "music-iterator.hh"
 #include "global-translator.hh"
 
@@ -81,18 +83,25 @@ Global_translator::finish ()
 void
 Global_translator::run_iterator_on_me (Music_iterator * iter)
 {
-  while (iter->ok() || moments_left_i ())
+  bool first = true;
+  while (iter->ok () || moments_left_i ())
     {
       Moment w;
       w.set_infinite (1);
-      if (iter->ok())
+      if (iter->ok ())
        {
          w = iter->next_moment();
+
+         if (!first)
+           iter->next ();
+         else
+           first = false;
+      
          DEBUG_OUT << "proccing: " << w << '\n';
          if (flower_dstream && !flower_dstream->silent_b ("walking"))
            iter->print();
        }
-      
+
       w = sneaky_insert_extra_moment (w);
       prepare (w);
       
@@ -100,6 +109,10 @@ Global_translator::run_iterator_on_me (Music_iterator * iter)
        print();
 
       iter->process (w);
+
+      /*
+       Urg, this is request_chord_iterator.
+       */
       for (SCM i = iter->get_music (); gh_pair_p (i); i = SCM_CDR (i))
        {
          assert (gh_pair_p (i));
@@ -108,20 +121,36 @@ Global_translator::run_iterator_on_me (Music_iterator * iter)
          Translator *t = unsmob_translator (SCM_CDR (p));
          assert (m);
          assert (t);
-         bool b = t->try_music (m);
-         if (!b)
+         for (SCM s = dynamic_cast<Music_sequence *> (m)->music_list ();
+              gh_pair_p (s);  s = SCM_CDR (s))
            {
-             /*
-               Children?
-             */
-             printf ("junking:\n");
-             m->print ();
-             t->print ();
+             Music *m = unsmob_music (SCM_CAR (s));
+             if (Request* r = dynamic_cast<Request*> (m))
+               {
+                 bool b = t->try_music (m);
+                 if (!b)
+                   m->origin ()->warning (_f ("Junking request: `%s'",
+                                              classname(m)));
+               }
+             else
+               m->origin ()->warning (_f ("Huh?  Not a Request: `%s'",
+                                          classname (m)));
+           }
+         if (! dynamic_cast<Music_sequence *> (m))
+           {
+             bool b = t->try_music (m);
+             if (!b)
+               {
+                 /*
+                   Children?
+                 */
+                 printf ("junking:\n");
+                 m->print ();
+                 t->print ();
+               }
            }
-
        }
       
-      iter->next ();
-      process();
+      process ();
     }
 }
index 8e0ec23362e44c8031b5265bd5b891b188b3b015..ce71cc36e1bae7cfe9eafc34d0618876fbc1c463 100644 (file)
@@ -143,11 +143,12 @@ Sequential_music_iterator::next ()
 void
 Sequential_music_iterator::do_process (Moment until)
 {
+#if 1
   return;
-#if 0
+#else
   if (ok ())
     {
-      while (1) 
+      //      while (1) 
        {
          Moment local_until = until - here_mom_;
          while (iter_p_->ok ()) 
index 08f337c0658371d4b4e60df4df43cba6b883dc3b..252a288f0d397938a8f86b2b82c7f07863530ac0 100644 (file)
@@ -55,10 +55,9 @@ SCM
 Simultaneous_music_iterator::get_music ()
 {
   SCM s = SCM_EOL;
-  //  SCM t = report_to_l ()-self_scm ();
   for (Cons<Music_iterator> *p = children_p_list_.head_; p; p = p->next_)
     {
-      scm_cons (p->car_->get_music (), s);
+      s = gh_append2 (p->car_->get_music (), s);
     }
   return s;
 }