diff --git a/lily/key-engraver.cc b/lily/key-engraver.cc index d3b7eb0..cbd55d0 100644 --- a/lily/key-engraver.cc +++ b/lily/key-engraver.cc @@ -79,8 +79,8 @@ Key_engraver::create_key (bool is_default) SCM new_alter_pair = scm_assoc (scm_caar (s), key); Rational old_alter = robust_scm2rational (scm_cdar (s), 0); if (new_alter_pair == SCM_BOOL_F - || extranatural - && (ly_scm2rational (scm_cdr (new_alter_pair)) - old_alter)*old_alter < Rational (0)) + || (extranatural + && (ly_scm2rational (scm_cdr (new_alter_pair)) - old_alter)*old_alter < Rational (0))) { *tail = scm_cons (scm_car (s), *tail); tail = SCM_CDRLOC (*tail); diff --git a/lily/note-collision.cc b/lily/note-collision.cc index 7abcc2a..5434442 100644 --- a/lily/note-collision.cc +++ b/lily/note-collision.cc @@ -290,20 +290,22 @@ check_meshing_chords (Grob *me, { Grob *staff = Staff_symbol_referencer::get_staff_symbol (me); if (!Staff_symbol_referencer::on_line (staff, ups[0])) - /* - TODO: consider junking the else body. - */ - if (to_boolean (me->get_property ("prefer-dotted-right"))) - { - shift_amount = 0.5; - } - else - { - Grob *d = unsmob_grob (head_up->get_object ("dot")); - Grob *parent = d->get_parent (X_AXIS); - if (Dot_column::has_interface (parent)) - Side_position_interface::add_support (parent, head_down); - } + { + /* + TODO: consider junking the else body. + */ + if (to_boolean (me->get_property ("prefer-dotted-right"))) + { + shift_amount = 0.5; + } + else + { + Grob *d = unsmob_grob (head_up->get_object ("dot")); + Grob *parent = d->get_parent (X_AXIS); + if (Dot_column::has_interface (parent)) + Side_position_interface::add_support (parent, head_down); + } + } } /* For full or close half collisions, the right hand head may diff --git a/lily/skyline.cc b/lily/skyline.cc index 5297f63..362fbba 100644 --- a/lily/skyline.cc +++ b/lily/skyline.cc @@ -45,6 +45,7 @@ /* If we start including very thin buildings, numerical accuracy errors can arise. Therefore, we ignore all buildings that are less than epsilon wide. */ #define EPS 1e-5 +#define EPSNULL 1e-12 static void print_buildings (list const &b) @@ -215,6 +216,9 @@ Skyline::internal_merge_skyline (list *s1, list *s2, if (end >= s1->front ().end_) s1->pop_front (); + if (abs (end - x) < EPSNULL) + break; + x = end; } result->reverse (); diff --git a/lily/tie-formatting-problem.cc b/lily/tie-formatting-problem.cc index 6aa5feb..fbd34c1 100644 --- a/lily/tie-formatting-problem.cc +++ b/lily/tie-formatting-problem.cc @@ -644,6 +644,7 @@ Tie_formatting_problem::score_aptitude (Tie_configuration *conf, if (ties_conf && ties_conf->size () == 1) + do { Direction d = LEFT; Drul_array stems (0, 0); diff --git a/lily/vaticana-ligature-engraver.cc b/lily/vaticana-ligature-engraver.cc index c812684..d80d0da 100644 --- a/lily/vaticana-ligature-engraver.cc +++ b/lily/vaticana-ligature-engraver.cc @@ -550,66 +550,70 @@ Vaticana_ligature_engraver::transform_heads (Spanner *ligature, else glyph_name = "vaticana.inclinatum"; else if (prefix_set & DEMINUTUM) - if (i == 0) - { - // initio debilis - glyph_name = "vaticana.reverse.plica"; - } - else if (prev_delta_pitch > 0) - { - // epiphonus - if (! (prev_context_info & FLEXA_RIGHT)) - /* correct head of previous primitive */ + { + if (i == 0) + { + // initio debilis + glyph_name = "vaticana.reverse.plica"; + } + else if (prev_delta_pitch > 0) + { + // epiphonus + if (! (prev_context_info & FLEXA_RIGHT)) + { + /* correct head of previous primitive */ + if (prev_delta_pitch > 1) + prev_glyph_name = "vaticana.epiphonus"; + else + prev_glyph_name = "vaticana.vepiphonus"; + } if (prev_delta_pitch > 1) - prev_glyph_name = "vaticana.epiphonus"; + glyph_name = "vaticana.plica"; else - prev_glyph_name = "vaticana.vepiphonus"; - if (prev_delta_pitch > 1) - glyph_name = "vaticana.plica"; - else - glyph_name = "vaticana.vplica"; - } - else if (prev_delta_pitch < 0) - { - // cephalicus - if (! (prev_context_info & FLEXA_RIGHT)) - /* correct head of previous primitive */ - { - if (i > 1) - { - /* cephalicus head with fixed size cauda */ - prev_glyph_name = "vaticana.inner.cephalicus"; - } - else - { - /* cephalicus head without cauda */ - prev_glyph_name = "vaticana.cephalicus"; - } - - /* - * Flexa has no variable size cauda if its left head is - * stacked on the right head. This is true for - * cephalicus. Hence, remove the cauda. - * - * Urgh: for the current implementation, this rule only - * applies for cephalicus; but it is a fundamental rule. - * Therefore, the following line of code should be - * placed somewhere else. - */ - prev_primitive->set_property ("add-cauda", - ly_bool2scm (false)); - } - if (prev_delta_pitch < - 1) - glyph_name = "vaticana.reverse.plica"; - else - glyph_name = "vaticana.reverse.vplica"; - } - else // (prev_delta_pitch == 0) - { - primitive->programming_error ("Vaticana_ligature:" - " deminutum head must have different" - " pitch -> ignoring grob"); - } + glyph_name = "vaticana.vplica"; + } + else if (prev_delta_pitch < 0) + { + // cephalicus + if (! (prev_context_info & FLEXA_RIGHT)) + /* correct head of previous primitive */ + { + if (i > 1) + { + /* cephalicus head with fixed size cauda */ + prev_glyph_name = "vaticana.inner.cephalicus"; + } + else + { + /* cephalicus head without cauda */ + prev_glyph_name = "vaticana.cephalicus"; + } + + /* + * Flexa has no variable size cauda if its left head is + * stacked on the right head. This is true for + * cephalicus. Hence, remove the cauda. + * + * Urgh: for the current implementation, this rule only + * applies for cephalicus; but it is a fundamental rule. + * Therefore, the following line of code should be + * placed somewhere else. + */ + prev_primitive->set_property ("add-cauda", + ly_bool2scm (false)); + } + if (prev_delta_pitch < - 1) + glyph_name = "vaticana.reverse.plica"; + else + glyph_name = "vaticana.reverse.vplica"; + } + else // (prev_delta_pitch == 0) + { + primitive->programming_error ("Vaticana_ligature:" + " deminutum head must have different" + " pitch -> ignoring grob"); + } + } else if (prefix_set & (CAVUM | LINEA)) if ((prefix_set & CAVUM) && (prefix_set & LINEA)) glyph_name = "vaticana.linea.punctum.cavum"; @@ -676,10 +680,12 @@ Vaticana_ligature_engraver::transform_heads (Spanner *ligature, if ((context_info & PES_UPPER) && (context_info & STACKED_HEAD)) { if (prev_glyph_name == "vaticana.punctum") - if (prev_delta_pitch > 1) - prev_glyph_name = "vaticana.lpes"; - else - prev_glyph_name = "vaticana.vlpes"; + { + if (prev_delta_pitch > 1) + prev_glyph_name = "vaticana.lpes"; + else + prev_glyph_name = "vaticana.vlpes"; + } } } diff --git a/lily/volta-repeat-iterator.cc b/lily/volta-repeat-iterator.cc index 23f8edd..e32b1bb 100644 --- a/lily/volta-repeat-iterator.cc +++ b/lily/volta-repeat-iterator.cc @@ -65,8 +65,8 @@ Volta_repeat_iterator::add_repeat_command (SCM what) SCM current_reps = SCM_EOL; Context *where = get_outlet ()->where_defined (reps, ¤t_reps); - if (where - && current_reps == SCM_EOL || scm_is_pair (current_reps)) + if ((where + && current_reps == SCM_EOL) || scm_is_pair (current_reps)) { current_reps = scm_cons (what, current_reps); where->set_property (reps, current_reps);