From: Jan Nieuwenhuizen Date: Wed, 24 Jul 2002 19:24:18 +0000 (+0000) Subject: * lily, lily/include: Rename line to system. Junk _l suffix. X-Git-Tag: release/1.5.70~22 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=0824dba176ac4991cc7671f18cf920f365100313;p=lilypond.git * lily, lily/include: Rename line to system. Junk _l suffix. --- diff --git a/ChangeLog b/ChangeLog index 8ba03722db..08f3f51952 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2002-07-24 Jan Nieuwenhuizen + + * lily, lily/include: Rename line to system. Junk _l suffix. + 2002-07-24 Han-Wen Nienhuys * po/fr.po: update from TP. diff --git a/input/mutopia/J.S.Bach/baerenreiter-sarabande.ly b/input/mutopia/J.S.Bach/baerenreiter-sarabande.ly index e484d44f74..6f78570d62 100644 --- a/input/mutopia/J.S.Bach/baerenreiter-sarabande.ly +++ b/input/mutopia/J.S.Bach/baerenreiter-sarabande.ly @@ -11,7 +11,7 @@ forcedLastBreak = \notes { \break } #(define (assert-system-count smob n) (let ((systems (length (get-broken-into (get-original - (get-line smob)))))) + (get-system smob)))))) (if (not (equal? n systems)) ;; Can't use error yet, as we know that we're not using 6... ;;(error diff --git a/input/test/count-systems.ly b/input/test/count-systems.ly index c7f4ba6130..f342b183eb 100644 --- a/input/test/count-systems.ly +++ b/input/test/count-systems.ly @@ -7,11 +7,11 @@ } #(define (display-systemno smob) - (let* ((this-line (get-line smob)) + (let* ((this-system (get-line smob)) (systems (get-broken-into - (get-original this-line)))) + (get-original this-system)))) (display smob) - (display (list-index systems this-line)) + (display (list-index systems this-system)) (newline))) @@ -19,7 +19,7 @@ (display (length (get-broken-into (get-original - (get-line smob)))))) + (get-system smob)))))) diff --git a/lily/break-algorithm.cc b/lily/break-algorithm.cc index 249dcec8fb..24b49f72f4 100644 --- a/lily/break-algorithm.cc +++ b/lily/break-algorithm.cc @@ -21,7 +21,7 @@ Array Break_algorithm::find_break_indices () const { - Link_array all = pscore_l_->line_l_->column_l_arr (); + Link_array all = pscore_l_->system_->column_l_arr (); Array retval; for (int i=0; i < all.size (); i++) @@ -39,7 +39,7 @@ Break_algorithm::find_break_indices () const Link_array Break_algorithm::find_breaks () const { - Link_array all = pscore_l_->line_l_->column_l_arr (); + Link_array all = pscore_l_->system_->column_l_arr (); Link_array retval; for (int i=0; i < all.size (); i++) diff --git a/lily/break-substitution.cc b/lily/break-substitution.cc index 563eda0939..0a2876c92c 100644 --- a/lily/break-substitution.cc +++ b/lily/break-substitution.cc @@ -30,17 +30,17 @@ substitute_grob (Grob *sc) { System * line = dynamic_cast (unsmob_grob (break_criterion)); - if (sc->line_l () != line) + if (sc->get_system () != line) { sc = sc->find_broken_piece (line); } - /* now: !sc || (sc && sc->line_l () == line) */ + /* now: !sc || (sc && sc->get_system () == line) */ if (!sc) return SCM_UNDEFINED; - /* now: sc && sc->line_l () == line */ + /* now: sc && sc->get_system () == line */ if (!line) return sc->self_scm(); diff --git a/lily/chord-name.cc b/lily/chord-name.cc index 620075396f..f02c8421fc 100644 --- a/lily/chord-name.cc +++ b/lily/chord-name.cc @@ -27,7 +27,7 @@ Chord_name::after_line_breaking (SCM smob) if (to_boolean (s)) { if (Paper_column::rank_i (me->column_l ()) - - me->line_l ()->spanned_rank_iv ()[LEFT] > 1) + me->get_system ()->spanned_rank_iv ()[LEFT] > 1) me->suicide (); } return SCM_UNSPECIFIED; diff --git a/lily/gourlay-breaking.cc b/lily/gourlay-breaking.cc index bfd8c30fea..2823649959 100644 --- a/lily/gourlay-breaking.cc +++ b/lily/gourlay-breaking.cc @@ -57,7 +57,7 @@ Gourlay_breaking::do_solve () const { Array optimal_paths; Link_array all = - pscore_l_->line_l_->column_l_arr (); + pscore_l_->system_->column_l_arr (); Array breaks = find_break_indices (); diff --git a/lily/grob.cc b/lily/grob.cc index 76e2503745..dea4418062 100644 --- a/lily/grob.cc +++ b/lily/grob.cc @@ -303,22 +303,22 @@ Grob::do_break_processing () System * -Grob::line_l () const +Grob::get_system () const { return 0; } -LY_DEFINE (get_line, - "get-line", +LY_DEFINE (get_system, + "get-system", 1, 0, 0, (SCM grob), " -Return the Line Grob of @var{grob}. +Return the System Grob of @var{grob}. ") { Grob *me = unsmob_grob (grob); SCM_ASSERT_TYPE (me, grob, SCM_ARG1, __FUNCTION__, "grob"); - if (Grob *g = me->line_l ()) + if (Grob *g = me->get_system ()) return g->self_scm (); return SCM_EOL; @@ -361,7 +361,7 @@ Grob::handle_broken_dependencies () for (int i = 0; i< s->broken_into_l_arr_ .size (); i++) { Grob * sc = s->broken_into_l_arr_[i]; - System * l = sc->line_l (); + System * l = sc->get_system (); sc->substitute_mutable_properties (l ? l->self_scm () : SCM_UNDEFINED, mutable_property_alist_); @@ -369,12 +369,12 @@ Grob::handle_broken_dependencies () } - System *line = line_l (); + System *system = get_system (); if (live () - && line && common_refpoint (line, X_AXIS) && common_refpoint (line, Y_AXIS)) + && system && common_refpoint (system, X_AXIS) && common_refpoint (system, Y_AXIS)) { - substitute_mutable_properties (line ? line->self_scm () : SCM_UNDEFINED, + substitute_mutable_properties (system ? system->self_scm () : SCM_UNDEFINED, mutable_property_alist_); } else if (dynamic_cast (this)) @@ -682,9 +682,9 @@ Grob::fixup_refpoint (SCM smob) if (!parent) continue; - if (parent->line_l () != me->line_l () && me->line_l ()) + if (parent->get_system () != me->get_system () && me->get_system ()) { - Grob * newparent = parent->find_broken_piece (me->line_l ()); + Grob * newparent = parent->find_broken_piece (me->get_system ()); me->set_parent (newparent, ax); } diff --git a/lily/include/grob.hh b/lily/include/grob.hh index 6c3ef633c1..7a96394050 100644 --- a/lily/include/grob.hh +++ b/lily/include/grob.hh @@ -88,7 +88,7 @@ public: add a dependency. It may be the 0 pointer, in which case, it is ignored. */ void add_dependency (Grob*); - virtual System * line_l () const; + virtual System * get_system () const; bool linked_b () const; diff --git a/lily/include/item.hh b/lily/include/item.hh index e7bb841789..82f5e7c516 100644 --- a/lily/include/item.hh +++ b/lily/include/item.hh @@ -30,18 +30,18 @@ public: Item (SCM); Item (Item const &); - static bool breakable_b (Grob*me); + static bool breakable_b (Grob *); bool broken_b () const; Direction break_status_dir () const; - Item * find_prebroken_piece (Direction) const; - Grob * find_broken_piece (System*) const; + Item *find_prebroken_piece (Direction) const; + Grob *find_broken_piece (System *) const; - virtual System * line_l () const; - virtual Paper_column * column_l () const; + virtual System *get_system () const; + virtual Paper_column *column_l () const; virtual void handle_prebroken_dependencies (); - static bool has_interface (Grob*); + static bool has_interface (Grob *); protected: virtual void discretionary_processing (); void copy_breakable_items (); diff --git a/lily/include/paper-column.hh b/lily/include/paper-column.hh index f2c94744ed..ed1d0edc49 100644 --- a/lily/include/paper-column.hh +++ b/lily/include/paper-column.hh @@ -23,10 +23,10 @@ public: int rank_i_; virtual void do_break_processing (); virtual Paper_column *column_l () const; - virtual System *line_l () const; + virtual System *get_system () const; /// if lines are broken then this column is in #line# - System *line_l_; + System *system_; static int rank_i (Grob*); diff --git a/lily/include/paper-score.hh b/lily/include/paper-score.hh index a24a75c6ed..8a46e6f93e 100644 --- a/lily/include/paper-score.hh +++ b/lily/include/paper-score.hh @@ -28,7 +28,7 @@ public: Paper_def *paper_l_; Paper_outputter *outputter_l_; - System * line_l_; + System *system_; Paper_score (); diff --git a/lily/include/score-engraver.hh b/lily/include/score-engraver.hh index 343b02a4b7..90cf036259 100644 --- a/lily/include/score-engraver.hh +++ b/lily/include/score-engraver.hh @@ -7,8 +7,8 @@ */ -#ifndef SCORE_GRAV_HH -#define SCORE_GRAV_HH +#ifndef SCORE_ENGRAVER_HH +#define SCORE_ENGRAVER_HH #include "engraver-group-engraver.hh" #include "global-translator.hh" @@ -19,7 +19,7 @@ class Score_engraver : public Engraver_group_engraver, public Global_translator { - System * scoreline_l_; + System *system_; int breaks_i_; @@ -57,4 +57,4 @@ protected: virtual void stop_translation_timestep (); }; -#endif // SCORE_GRAV_HH +#endif /* SCORE_ENGRAVER_HH */ diff --git a/lily/include/spanner.hh b/lily/include/spanner.hh index 9ea2df7870..63274734bd 100644 --- a/lily/include/spanner.hh +++ b/lily/include/spanner.hh @@ -60,7 +60,7 @@ protected: VIRTUAL_COPY_CONS (Grob); virtual void do_break_processing (); - virtual System*line_l () const; + virtual System *get_system () const; }; diff --git a/lily/include/system.hh b/lily/include/system.hh index 8a4f40a1ba..e02e890c49 100644 --- a/lily/include/system.hh +++ b/lily/include/system.hh @@ -5,8 +5,8 @@ (c) 1996--2002 Han-Wen Nienhuys */ -#ifndef SCORELINE_HH -#define SCORELINE_HH +#ifndef SYSTEM_HH +#define SYSTEM_HH #include "column-x-positions.hh" @@ -46,5 +46,5 @@ protected: VIRTUAL_COPY_CONS (Grob); }; -#endif +#endif /* SYSTEM_HH */ diff --git a/lily/item.cc b/lily/item.cc index 9c8a004fde..3b64230848 100644 --- a/lily/item.cc +++ b/lily/item.cc @@ -54,10 +54,10 @@ Item::column_l () const } System * -Item::line_l () const +Item::get_system () const { Grob *g = get_parent (X_AXIS); - return g ? g->line_l () : 0; + return g ? g->get_system () : 0; } @@ -70,7 +70,7 @@ Item::copy_breakable_items () { Grob * dolly = clone (); Item * item_p = dynamic_cast (dolly); - pscore_l_->line_l_->typeset_grob (item_p); + pscore_l_->system_->typeset_grob (item_p); new_copies[i] =item_p; } while (flip (&i) != LEFT); @@ -101,13 +101,13 @@ Item::discretionary_processing () Grob* Item::find_broken_piece (System*l) const { - if (line_l () == l) + if (get_system () == l) return (Item*) (this); Direction d = LEFT; do { Grob *s = broken_to_drul_[d]; - if (s && s->line_l () == l) + if (s && s->get_system () == l) return s; } while (flip (&d) != LEFT); diff --git a/lily/paper-column.cc b/lily/paper-column.cc index df02af8fa8..6cb5c2f48d 100644 --- a/lily/paper-column.cc +++ b/lily/paper-column.cc @@ -56,9 +56,9 @@ Paper_column::rank_i (Grob*me) } System* -Paper_column::line_l () const +Paper_column::get_system () const { - return line_l_; + return system_; } Paper_column* @@ -70,7 +70,7 @@ Paper_column::column_l () const Paper_column::Paper_column (SCM l) : Item (l) // guh.? { - line_l_=0; + system_=0; rank_i_ = -1; } diff --git a/lily/paper-score.cc b/lily/paper-score.cc index cfa9781bd7..013694388c 100644 --- a/lily/paper-score.cc +++ b/lily/paper-score.cc @@ -26,16 +26,16 @@ Paper_score::Paper_score () { paper_l_ =0; outputter_l_ =0; - line_l_ = 0; + system_ = 0; main_smob_ = SCM_EOL; } void Paper_score::typeset_line (System *l) { - if (!line_l_) + if (!system_) { - line_l_ = l; // ugh. + system_ = l; // ugh. } main_smob_ = gh_cons (l->self_scm (), main_smob_); l->pscore_l_ = this; @@ -73,7 +73,7 @@ void Paper_score::process () { if (verbose_global_b) - progress_indication (_f ("Element count %d ", line_l_->element_count ())); + progress_indication (_f ("Element count %d ", system_->element_count ())); progress_indication (_ ("Preprocessing elements...") + " "); @@ -81,15 +81,15 @@ Paper_score::process () /* Be sure to set breakability on first & last column. */ - Link_array pc (line_l_->column_l_arr ()); + Link_array pc (system_->column_l_arr ()); pc[0]->set_grob_property ("breakable", SCM_BOOL_T); pc.top ()->set_grob_property ("breakable", SCM_BOOL_T); - line_l_->pre_processing (); + system_->pre_processing (); Array breaking = calc_breaking (); - line_l_->break_into_pieces (breaking); + system_->break_into_pieces (breaking); outputter_l_ = paper_l_->paper_outputter_p (); ; @@ -119,7 +119,7 @@ Paper_score::process () SCM scm = scm_list_n (ly_symbol2scm ("header-end"), SCM_UNDEFINED); outputter_l_->output_scheme (scm); - line_l_->output_lines (); + system_->output_lines (); scm = scm_list_n (ly_symbol2scm ("end-output"), SCM_UNDEFINED); outputter_l_->output_scheme (scm); diff --git a/lily/score-engraver.cc b/lily/score-engraver.cc index c2c377fa1f..6afab4d7dd 100644 --- a/lily/score-engraver.cc +++ b/lily/score-engraver.cc @@ -28,7 +28,7 @@ */ Score_engraver::Score_engraver () { - scoreline_l_ =0; + system_ =0; command_column_l_ =0; musical_column_l_ =0; breaks_i_ =0; @@ -114,8 +114,8 @@ Score_engraver::initialize () pscore_p_->typeset_line (new System (props)); make_columns (); - scoreline_l_ = pscore_p_->line_l_; - scoreline_l_->set_bound (LEFT, command_column_l_); + system_ = pscore_p_->system_; + system_->set_bound (LEFT, command_column_l_); command_column_l_->set_grob_property ("breakable", SCM_BOOL_T); Engraver_group_engraver::initialize (); @@ -129,7 +129,7 @@ Score_engraver::finalize () Grob * cc = unsmob_grob (get_property ("currentCommandColumn")); - scoreline_l_->set_bound (RIGHT, cc); + system_->set_bound (RIGHT, cc); cc->set_grob_property ("breakable", SCM_BOOL_T); typeset_all (); @@ -167,7 +167,7 @@ void Score_engraver::announce_grob (Grob_info info) { announce_info_arr_.push (info); - pscore_p_->line_l_->typeset_grob (info.grob_l_); + pscore_p_->system_->typeset_grob (info.grob_l_); } void @@ -222,7 +222,7 @@ Score_engraver::typeset_all () } } if (!elem_p->get_parent (Y_AXIS)) - Axis_group_interface::add_element (scoreline_l_, elem_p); + Axis_group_interface::add_element (system_, elem_p); } elem_p_arr_.clear (); } @@ -242,8 +242,8 @@ Score_engraver::stop_translation_timestep () } - scoreline_l_->add_column (command_column_l_); - scoreline_l_->add_column (musical_column_l_); + system_->add_column (command_column_l_); + system_->add_column (musical_column_l_); command_column_l_ = 0; musical_column_l_ = 0; diff --git a/lily/spacing-spanner.cc b/lily/spacing-spanner.cc index 3c8f3a4e14..b8d7b56a25 100644 --- a/lily/spacing-spanner.cc +++ b/lily/spacing-spanner.cc @@ -361,7 +361,7 @@ Spacing_spanner::set_springs (SCM smob) { Grob *me = unsmob_grob (smob); - Link_array all (me->pscore_l_->line_l_->column_l_arr ()) ; + Link_array all (me->pscore_l_->system_->column_l_arr ()) ; set_explicit_neighbor_columns (all); diff --git a/lily/spanner.cc b/lily/spanner.cc index 9b2f30fcbc..9859c2b055 100644 --- a/lily/spanner.cc +++ b/lily/spanner.cc @@ -64,7 +64,7 @@ Spanner::do_break_processing () } } - if (line_l () || broken_b ()) + if (get_system () || broken_b ()) return; if (left == right) @@ -78,14 +78,14 @@ Spanner::do_break_processing () Item* bound = left->find_prebroken_piece (d); if (!bound) programming_error ("no broken bound"); - else if (bound->line_l ()) + else if (bound->get_system ()) { Spanner * span_p = dynamic_cast (clone ()); span_p->set_bound (LEFT, bound); span_p->set_bound (RIGHT, bound); - assert (span_p->line_l ()); - span_p->line_l ()->typeset_grob (span_p); + assert (span_p->get_system ()); + span_p->get_system ()->typeset_grob (span_p); broken_into_l_arr_.push (span_p); } } @@ -93,7 +93,7 @@ Spanner::do_break_processing () } else { - Link_array break_points = pscore_l_->line_l_->broken_col_range (left,right); + Link_array break_points = pscore_l_->system_->broken_col_range (left,right); break_points.insert (left,0); break_points.push (right); @@ -106,7 +106,7 @@ Spanner::do_break_processing () Direction d = LEFT; do { - if (!bounds[d]->line_l ()) + if (!bounds[d]->get_system ()) bounds[d] = bounds[d]->find_prebroken_piece (- d); } while ((flip (&d))!= LEFT); @@ -121,17 +121,17 @@ Spanner::do_break_processing () span_p->set_bound (LEFT,bounds[LEFT]); span_p->set_bound (RIGHT,bounds[RIGHT]); - if (!bounds[LEFT]->line_l () + if (!bounds[LEFT]->get_system () - || !bounds[RIGHT]->line_l () - || bounds[LEFT]->line_l () != bounds[RIGHT]->line_l ()) + || !bounds[RIGHT]->get_system () + || bounds[LEFT]->get_system () != bounds[RIGHT]->get_system ()) { programming_error ("bounds of spanner are invalid"); span_p->suicide (); } else { - bounds[LEFT]->line_l ()->typeset_grob (span_p); + bounds[LEFT]->get_system ()->typeset_grob (span_p); broken_into_l_arr_.push (span_p); } } @@ -145,7 +145,7 @@ Spanner::set_my_columns () Direction i = (Direction) LEFT; do { - if (!spanned_drul_[i]->line_l ()) + if (!spanned_drul_[i]->get_system ()) set_bound (i,spanned_drul_[i]->find_prebroken_piece ((Direction) -i)); } while (flip (&i) != LEFT); @@ -240,13 +240,13 @@ Spanner::spanner_length () const } System * -Spanner::line_l () const +Spanner::get_system () const { if (!spanned_drul_[LEFT] || !spanned_drul_[RIGHT]) return 0; - if (spanned_drul_[LEFT]->line_l () != spanned_drul_[RIGHT]->line_l ()) + if (spanned_drul_[LEFT]->get_system () != spanned_drul_[RIGHT]->get_system ()) return 0; - return spanned_drul_[LEFT]->line_l (); + return spanned_drul_[LEFT]->get_system (); } @@ -265,7 +265,7 @@ Spanner::find_broken_piece (System*l) const int Spanner::compare (Spanner * const &p1, Spanner * const &p2) { - return p1->line_l ()->rank_i_ - p2->line_l ()->rank_i_; + return p1->get_system ()->rank_i_ - p2->get_system ()->rank_i_; } bool diff --git a/lily/system.cc b/lily/system.cc index 3cb30a2e95..cf353f92cc 100644 --- a/lily/system.cc +++ b/lily/system.cc @@ -111,11 +111,11 @@ System::output_lines () for (int i=0; i < broken_into_l_arr_.size (); i++) { - System *line_l = dynamic_cast (broken_into_l_arr_[i]); + System *system = dynamic_cast (broken_into_l_arr_[i]); if (verbose_global_b) progress_indication ("["); - line_l->post_processing (i+1 == broken_into_l_arr_.size ()); + system->post_processing (i+1 == broken_into_l_arr_.size ()); if (verbose_global_b) { @@ -125,7 +125,7 @@ System::output_lines () if (i < broken_into_l_arr_.size () - 1) { - SCM lastcol = ly_car (line_l->get_grob_property ("columns")); + SCM lastcol = ly_car (system->get_grob_property ("columns")); Grob* e = unsmob_grob (lastcol); SCM between = ly_symbol2scm ("between-system-string"); @@ -155,7 +155,7 @@ set_loose_columns (System* which, Column_x_positions const *posns) Item *loose = dynamic_cast (posns->loose_cols_[i]); Paper_column* col = dynamic_cast (loose); - if (col->line_l_) + if (col->system_) continue; @@ -203,7 +203,7 @@ set_loose_columns (System* which, Column_x_positions const *posns) Paper_column *thiscol = dynamic_cast (loose); - thiscol->line_l_ = which; + thiscol->system_ = which; thiscol->translate_axis (lx + j*(rx - lx)/divide_over, X_AXIS); j ++; @@ -245,7 +245,7 @@ set_loose_columns (System* which, Column_x_positions const *posns) else dx *= 0.5; - col->line_l_ = which; + col->system_ = which; col->translate_axis (lx + dx - cval[LEFT], X_AXIS); #endif } @@ -257,21 +257,21 @@ System::break_into_pieces (Array const &breaking) { for (int i=0; i < breaking.size (); i++) { - System *line_l = dynamic_cast (clone ()); - line_l->rank_i_ = i; - // line_l->set_immutable_grob_property ("rank", gh_int2scm (i)); + System *system = dynamic_cast (clone ()); + system->rank_i_ = i; + // system->set_immutable_grob_property ("rank", gh_int2scm (i)); Link_array c (breaking[i].cols_); - pscore_l_->typeset_line (line_l); + pscore_l_->typeset_line (system); - line_l->set_bound (LEFT,c[0]); - line_l->set_bound (RIGHT,c.top ()); + system->set_bound (LEFT,c[0]); + system->set_bound (RIGHT,c.top ()); for (int j=0; j < c.size (); j++) { c[j]->translate_axis (breaking[i].config_[j],X_AXIS); - dynamic_cast (c[j])->line_l_ = line_l; + dynamic_cast (c[j])->system_ = system; } - set_loose_columns (line_l, &breaking[i]); - broken_into_l_arr_.push (line_l); + set_loose_columns (system, &breaking[i]); + broken_into_l_arr_.push (system); } } @@ -498,7 +498,7 @@ System::broken_col_range (Item const*l, Item const*r) const while (gh_pair_p (s) && ly_car (s) != l->self_scm ()) { Paper_column*c = dynamic_cast (unsmob_grob (ly_car (s))); - if (Item::breakable_b (c) && !c->line_l_) + if (Item::breakable_b (c) && !c->system_) ret.push (c); s = ly_cdr (s);