From a9a5d53b17a60649e0e167ecd68f8e02b4fc545c Mon Sep 17 00:00:00 2001 From: fred Date: Wed, 27 Mar 2002 02:04:29 +0000 Subject: [PATCH] lilypond-1.5.25 --- lily/fingering-engraver.cc | 2 +- lily/script-column.cc | 13 ++++++++++--- lily/stem.cc | 11 +++++++---- lily/translator-def.cc | 26 +++++++++----------------- 4 files changed, 27 insertions(+), 25 deletions(-) diff --git a/lily/fingering-engraver.cc b/lily/fingering-engraver.cc index afdd5482bd..ec516bb2af 100644 --- a/lily/fingering-engraver.cc +++ b/lily/fingering-engraver.cc @@ -129,7 +129,7 @@ Fingering_engraver::process_music () { /* chuck out reqs that have no pitch. We put them over the note by default. - */ + */ up_reqs_.push (pitch_sorted_reqs [i]); pitch_sorted_reqs.del (i); } diff --git a/lily/script-column.cc b/lily/script-column.cc index e5ecb87960..7d8cdc7467 100644 --- a/lily/script-column.cc +++ b/lily/script-column.cc @@ -8,7 +8,7 @@ */ #include "script-column.hh" #include "side-position-interface.hh" - +#include "warn.hh" #include "group-interface.hh" void @@ -46,8 +46,15 @@ Script_column::before_line_breaking (SCM smob) for (int i=0; i < staff_sided.size (); i++) { - arrs[Side_position_interface::get_direction (staff_sided[i])] - .push (staff_sided[i]); + Direction d = Side_position_interface::get_direction (staff_sided[i]); + if (!d) + { + programming_error ( "No direction for script?"); + d = DOWN; + staff_sided[i]->set_grob_property ("direction", gh_int2scm (d)); + } + + arrs[d].push (staff_sided[i]); } Direction d = DOWN; diff --git a/lily/stem.cc b/lily/stem.cc index 90949fc766..8502c7581c 100644 --- a/lily/stem.cc +++ b/lily/stem.cc @@ -586,15 +586,18 @@ Stem::brew_molecule (SCM smob) Real y1 = Staff_symbol_referencer::position_f (first_head (me)); Real y2 = stem_end_position (me); - Interval stem_y (y1,y2); - stem_y.unite (Interval (y2,y1)); + Interval stem_y (y1 ? y1); + // dy? - Real dy = Staff_symbol_referencer::staff_space (me)/2.0; + Real dy = Staff_symbol_referencer::staff_space (me) * 0.5; if (Grob *hed = support_head (me)) { - Interval head_height = hed->extent (hed,Y_AXIS); + /* + must not take ledgers into account. + */ + Interval head_height = Note_head::head_extent (hed,Y_AXIS); Real y_attach = Note_head::stem_attachment_coordinate ( hed, Y_AXIS); y_attach = head_height.linear_combination (y_attach); diff --git a/lily/translator-def.cc b/lily/translator-def.cc index 9c8ffb0d3a..6d90f320be 100644 --- a/lily/translator-def.cc +++ b/lily/translator-def.cc @@ -12,7 +12,6 @@ #include "translator-group.hh" #include "warn.hh" #include "music-output-def.hh" - #include "ly-smobs.icc" int @@ -41,17 +40,6 @@ Translator_def::mark_smob (SCM smob) return me->type_name_; } -SCM push_sym; -SCM assign_sym; - -static void -foo_init () -{ - push_sym = scm_permanent_object (ly_symbol2scm ("push")); - assign_sym = scm_permanent_object (ly_symbol2scm ("assign")); -} - -ADD_SCM_INIT_FUNC (transdef, foo_init); Translator_def::Translator_def () { @@ -138,14 +126,14 @@ Translator_def::add_last_element (SCM s) void Translator_def::add_push_property (SCM props, SCM syms, SCM vals) { - this->property_ops_ = gh_cons (scm_list_n (push_sym, props, syms, vals, SCM_UNDEFINED), + this->property_ops_ = gh_cons (scm_list_n (ly_symbol2scm ("push"), props, syms, vals, SCM_UNDEFINED), this->property_ops_); } void Translator_def::add_pop_property (SCM props, SCM syms) { - this->property_ops_ = gh_cons (scm_list_n (push_sym, props, syms, SCM_UNDEFINED), + this->property_ops_ = gh_cons (scm_list_n (ly_symbol2scm ("push"), props, syms, SCM_UNDEFINED), this->property_ops_); } @@ -248,6 +236,10 @@ Translator_def::instantiate (Music_output_def* md) tg->output_def_l_ = md; tg->definition_ = self_scm (); tg->type_str_ = ly_scm2string (type_name_); + + /* + TODO: ugh. we're reversing CONSISTS_NAME_LIST_ here + */ SCM l1 = trans_list (consists_name_list_, tg); SCM l2 =trans_list (end_consists_name_list_,tg); l1 = scm_reverse_x (l1, l2); @@ -268,14 +260,14 @@ Translator_def::apply_property_operations (Translator_group*tg) SCM type = ly_car (entry); entry = ly_cdr (entry); - if (type == push_sym) + if (type == ly_symbol2scm ("push")) { SCM val = ly_cddr (entry); val = gh_pair_p (val) ? ly_car (val) : SCM_UNDEFINED; apply_pushpop_property (tg, ly_car (entry), ly_cadr (entry), val); } - else if (type == assign_sym) + else if (type == ly_symbol2scm ("assign")) { tg->internal_set_property (ly_car (entry), ly_cadr (entry)); } @@ -299,7 +291,7 @@ Translator_def::make_scm () void Translator_def::add_property_assign (SCM nm, SCM val) { - this->property_ops_ = gh_cons (scm_list_n (assign_sym, scm_string_to_symbol (nm), val, SCM_UNDEFINED), + this->property_ops_ = gh_cons (scm_list_n (ly_symbol2scm ("assign"), scm_string_to_symbol (nm), val, SCM_UNDEFINED), this->property_ops_); } -- 2.39.5