From 585a2dec2ecf310d3a470ecd5058a029a7f2cfac Mon Sep 17 00:00:00 2001 From: fred Date: Sun, 24 Mar 2002 19:27:17 +0000 Subject: [PATCH] lilypond-0.0.21 --- src/idealspacing.cc | 1 + src/pcol.cc | 5 +++-- src/score.cc | 22 +++++++++++----------- src/simplestaff.cc | 24 ++++++++++++++++++------ src/swalker.cc | 2 +- src/template1.cc | 4 ++-- 6 files changed, 36 insertions(+), 22 deletions(-) diff --git a/src/idealspacing.cc b/src/idealspacing.cc index c6b84931f6..3ceaff1e6d 100644 --- a/src/idealspacing.cc +++ b/src/idealspacing.cc @@ -1,3 +1,4 @@ +#include "idealspacing.hh" #include "pcol.hh" #include "pscore.hh" #include "pstaff.hh" diff --git a/src/pcol.cc b/src/pcol.cc index 7dc4c22c5a..52df4297d4 100644 --- a/src/pcol.cc +++ b/src/pcol.cc @@ -8,12 +8,13 @@ PCol::width() const { Interval w; - for (PCursor ic(its); ic.ok(); ic++) - w.unite(ic->width()); + for (iter_top(its,i); i.ok(); i++) + w.unite(i->width()); if (w.empty()) w.unite(Interval(0,0)); return w; } + int PCol::rank() const { diff --git a/src/score.cc b/src/score.cc index 1593f7be16..2819a21965 100644 --- a/src/score.cc +++ b/src/score.cc @@ -16,7 +16,7 @@ Score::process() /// distribute commands to disciples pscore_ = new PScore(paper_); - for (PCursor i(staffs_); i.ok(); i++) { + for (iter_top(staffs_,i); i.ok(); i++) { i->process_commands(last()); i->set_output(pscore_); i->process(); @@ -48,10 +48,10 @@ Score::process() void Score::clean_cols() { - for (PCursor i(staffs_); i.ok(); i++) + for (iter_top(staffs_,i); i.ok(); i++) i->clean_cols(); - for (PCursor c(cols_); c.ok(); ) { + for (iter_top(cols_,c); c.ok(); ) { if (!c->pcol_->used()) { c.del(); } else { @@ -76,7 +76,7 @@ Score::create_cols(Moment w) c1->musical = false; c2->musical = true; - PCursor i(cols_); + iter_top(cols_,i); for (; i.ok(); i++) { assert(i->when != w); @@ -100,7 +100,7 @@ Score::create_cols(Moment w) PCursor Score::find_col(Moment w,bool mus) { - PCursor i(cols_); + iter_top(cols_,i); for (; i.ok(); i++) { if (i->when == w && i->musical == mus) return i; @@ -116,7 +116,7 @@ Score::find_col(Moment w,bool mus) void Score::do_pcols() { - PCursor i(cols_); + iter_top(cols_,i); for (; i.ok(); i++) { pscore_->add(i->pcol_); } @@ -125,7 +125,7 @@ Moment Score::last() const { Moment l = 0; - for (PCursor i(staffs_); i.ok(); i++) { + for (iter_top(staffs_,i); i.ok(); i++) { l = l>? i->last(); } return l; @@ -135,13 +135,13 @@ void Score::OK() const { #ifndef NDEBUG - for (PCursor i(staffs_); i.ok(); i++) { + for (iter_top(staffs_,i); i.ok(); i++) { i->OK(); assert(i->score_ == this); } staffs_.OK(); cols_.OK(); - for (PCursor cc(cols_); cc.ok() && (cc+1).ok(); cc++) { + for (iter_top(cols_,cc); cc.ok() && (cc+1).ok(); cc++) { assert(cc->when <= (cc+1)->when); } #endif @@ -153,10 +153,10 @@ Score::print() const { #ifndef NPRINT mtor << "score {\n"; - for (PCursor i(staffs_); i.ok(); i++) { + for (iter_top(staffs_,i); i.ok(); i++) { i->print(); } - for (PCursor i(cols_); i.ok(); i++) { + for (iter_top(cols_,i); i.ok(); i++) { i->print(); } if (pscore_) diff --git a/src/simplestaff.cc b/src/simplestaff.cc index 9fe16b5937..636b6691de 100644 --- a/src/simplestaff.cc +++ b/src/simplestaff.cc @@ -18,6 +18,7 @@ Simple_column::Simple_column(Score_column*s, Simple_staff *rs) stem_ = 0; staff_ = rs; beam_ = 0; + text_=0; } Simple_staff::Simple_staff() @@ -30,7 +31,7 @@ Simple_staff::Simple_staff() BREAK: all TYPESET: bar, meter, - +Scalar */ @@ -39,16 +40,21 @@ void Simple_column::process_requests() { for (int i = 0 ; i < v_elts.sz(); i ++) - for (PCursor rqc(v_elts[i]->reqs); rqc.ok(); rqc++) { - Request *rq= rqc; + for (iter_top(v_elts[i]->reqs,j); j.ok(); j++) { + Request *rq= j; if (rq->rhythmic()){ - notes.add( rq->rhythmic()); + notes.add(rq->rhythmic()); + } + if (rq->script()) { + notes.last().scripts.add(rq->script()); } if (rq->stem()) { stem_ = rq->stem(); stem_requester_len = v_elts[i]->duration; } - + if (rq->text()) { + text_ = rq->text(); + } if (rq->beam()) { beam_ = rq->beam(); } @@ -72,4 +78,10 @@ Simple_staff::walk() sc.process(); } } - +Note_info::Note_info() +{ + rq =0; +} +Note_info::Note_info(Rhythmic_req*r) { + rq = r; +} diff --git a/src/swalker.cc b/src/swalker.cc index 130543dd97..9e4f1d3ff6 100644 --- a/src/swalker.cc +++ b/src/swalker.cc @@ -24,7 +24,7 @@ Staff_walker::process() { break_status = BREAK_END - BREAK_PRE; if (ptr()->s_commands) - for (PCursor i(*ptr()->s_commands); i.ok(); i++) { + for (iter_top(*ptr()->s_commands,i); i.ok(); i++) { process_command(i); } diff --git a/src/template1.cc b/src/template1.cc index 64834ea93e..0a9c288bde 100644 --- a/src/template1.cc +++ b/src/template1.cc @@ -1,4 +1,4 @@ - +#include "idealspacing.hh" #include "plist.hh" #include "pcol.hh" #include "item.hh" @@ -9,7 +9,7 @@ #include "staffline.hh" -#include "plist.cc" +#include "plist.tcc" #define IPLC_instantiate(a) IPL_instantiate(a); PL_instantiate(const a) -- 2.39.5