---- ../lilypond-1.1.29.jcn2/NEWS Tue Feb 9 22:46:07 1999
+--- ../lilypond-1.1.29.jcn3/NEWS Wed Feb 10 15:21:05 1999
+++ b/NEWS Wed Feb 10 17:56:14 1999
+@@ -1,3 +1,6 @@
+pl 29.jcn4
+ - unsuccessful try at fixing repeat-iter::ok () constness
+
+ pl 29.jcn3
+ - fix: slur-case3.ly
+ - init.sly: .fly with linewidt=-1--- ../lilypond-1.1.29.jcn2/NEWS Tue Feb 9 22:46:07 1999
++ b/NEWS Wed Feb 10 15:21:05 1999
@@ -1,3 +1,7 @@
pl 29.jcn3
. * make ly2dvi test page.
. * Try to use Killing_cons iso. Pointer_list
. * make dependencies () a virtual function.
-. * fix Repeated_music_iterator::ok() (constness.)
. * one big ly2dvi input that includes *all* tests.
. * Don't use boolean properties (0,1), instead check existence
of property.
alternative_iter_p_ = 0;
here_mom_ = 0;
unfold_i_ = -1;
+ done_b_ = false;
}
Repeated_music_iterator::~Repeated_music_iterator ()
void
Repeated_music_iterator::construct_children ()
{
+ done_b_ = false;
repeat_iter_p_ = get_iterator_p (dynamic_cast<Repeated_music const*> (music_l_)->repeat_p_);
}
if (!success)
music_l_->warning ( _("No one to print a volta bracket"));
}
+
+ if (!ok ())
+ start_next_element ();
+
+ // if (!ok())
+ // return;
+
if (repeat_iter_p_ && repeat_iter_p_->ok ())
repeat_iter_p_->process_and_next (m - here_mom_);
- else
+ else if (alternative_iter_p_ && alternative_iter_p_->ok ())
alternative_iter_p_->process_and_next (m - here_mom_);
+ else
+ return;
+
Music_iterator::do_process_and_next (m);
}
return r->alternative_p_->length_mom () + here_mom_;
}
-/*
- FIXME
- */
bool
Repeated_music_iterator::ok () const
{
- if (!repeat_iter_p_ && !alternative_iter_p_)
- return false;
-
- if ((repeat_iter_p_ && repeat_iter_p_->ok ())
- || (alternative_iter_p_ && alternative_iter_p_->ok ()))
- return true;
-
- Repeated_music_iterator *urg = (Repeated_music_iterator*)this;
- // urg, we're const
- urg->start_next_element ();
-
- return ok ();
+ return !done_b_;
}
-
void
Repeated_music_iterator::start_next_element ()
{
Repeated_music const*rep =dynamic_cast<Repeated_music const*> (music_l_);
-
- if (repeat_iter_p_)
+ if (repeat_iter_p_)
{
assert (!repeat_iter_p_->ok ());
assert (!alternative_iter_p_);
unfold_i_--;
repeat_iter_p_ = get_iterator_p (rep->repeat_p_);
// urg, assume same length alternatives for now...
-// here_mom_ += rep->alternative_p_->music_p_list_p_->top ()->length_mom ();
+ // here_mom_ += rep->alternative_p_->music_p_list_p_->top ()->length_mom ();
/*
URG
this is *wrong* but at least it doesn't dump core
when unfolding, the alternative (sequential) music
shouldn't automatically move to the next alternative
-
+
how to intercept this...
- */
+ */
here_mom_ += rep->alternative_p_->length_mom ();
}
}
+
+ if ((!repeat_iter_p_ || !repeat_iter_p_->ok ())
+ && (!alternative_iter_p_ || !alternative_iter_p_->ok ()))
+ done_b_ = true;
}