From c71e50cdade5bfc32c536d538cab8955fb648db3 Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Fri, 15 Sep 2000 00:54:55 +0200 Subject: [PATCH] patch::: 1.3.86.jcn3 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 | 12 ++++++ VERSION | 2 +- lily/global-translator.cc | 57 ++++++++++++++++++++++------- lily/sequential-music-iterator.cc | 5 ++- lily/simultaneous-music-iterator.cc | 3 +- 5 files changed, 60 insertions(+), 19 deletions(-) diff --git a/CHANGES b/CHANGES index aa2080ce36..661c3999a1 100644 --- 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 9bae1a9363..bc9bf2740d 100644 --- 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. diff --git a/lily/global-translator.cc b/lily/global-translator.cc index 3ecc44b4e0..de0ee4c4af 100644 --- a/lily/global-translator.cc +++ b/lily/global-translator.cc @@ -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 (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 (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 (m)) + { + bool b = t->try_music (m); + if (!b) + { + /* + Children? + */ + printf ("junking:\n"); + m->print (); + t->print (); + } } - } - iter->next (); - process(); + process (); } } diff --git a/lily/sequential-music-iterator.cc b/lily/sequential-music-iterator.cc index 8e0ec23362..ce71cc36e1 100644 --- a/lily/sequential-music-iterator.cc +++ b/lily/sequential-music-iterator.cc @@ -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 ()) diff --git a/lily/simultaneous-music-iterator.cc b/lily/simultaneous-music-iterator.cc index 08f337c065..252a288f0d 100644 --- a/lily/simultaneous-music-iterator.cc +++ b/lily/simultaneous-music-iterator.cc @@ -55,10 +55,9 @@ SCM Simultaneous_music_iterator::get_music () { SCM s = SCM_EOL; - // SCM t = report_to_l ()-self_scm (); for (Cons *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; } -- 2.39.2