X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;ds=sidebyside;f=lily%2Fspan-bar.cc;h=b6cb8361fc29adb698a2e0056179114bac2f20f2;hb=f47a52d0c0b6f0f2bc39708528ba9cec4882aaa2;hp=b54e4a74d5173470fc2626ed48db7d2c681c8358;hpb=ba858880848d6aca1de4401d185860eb2017a01c;p=lilypond.git diff --git a/lily/span-bar.cc b/lily/span-bar.cc index b54e4a74d5..b6cb8361fc 100644 --- a/lily/span-bar.cc +++ b/lily/span-bar.cc @@ -7,14 +7,13 @@ */ #include "span-bar.hh" + #include "font-interface.hh" #include "dimensions.hh" -#include "paper-def.hh" +#include "output-def.hh" #include "stencil.hh" #include "warn.hh" #include "axis-group-interface.hh" -#include "group-interface.hh" -#include "grob.hh" #include "bar-line.hh" void @@ -53,9 +52,9 @@ Span_bar::print (SCM smobbed_me) /* compute common refpoint of elements */ Grob *refp = me; - for (SCM elts = first_elt; ly_c_pair_p (elts); elts = ly_cdr (elts)) + for (SCM elts = first_elt; scm_is_pair (elts); elts = scm_cdr (elts)) { - SCM smobbed_staff_bar = ly_car (elts); + SCM smobbed_staff_bar = scm_car (elts); Grob *staff_bar = unsmob_grob (smobbed_staff_bar); refp = staff_bar->common_refpoint (refp, Y_AXIS); } @@ -65,7 +64,7 @@ Span_bar::print (SCM smobbed_me) /* glyph may not be a string, when ME is killed by Hara Kiri in between. */ - if (!ly_c_string_p (glyph)) + if (!scm_is_string (glyph)) return SCM_EOL; String glyph_string = ly_scm2string (glyph); @@ -74,9 +73,9 @@ Span_bar::print (SCM smobbed_me) Stencil span_bar_mol; Interval prev_extent; - for (SCM elts = first_elt; ly_c_pair_p (elts); elts = ly_cdr (elts)) + for (SCM elts = first_elt; scm_is_pair (elts); elts = scm_cdr (elts)) { - SCM smobbed_staff_bar = ly_car (elts); + SCM smobbed_staff_bar = scm_car (elts); Grob *staff_bar = unsmob_grob (smobbed_staff_bar); Interval ext = staff_bar->extent (refp, Y_AXIS); if (ext.is_empty ()) @@ -114,7 +113,7 @@ SCM Span_bar::width_callback (SCM element_smob, SCM scm_axis) { Grob *se = unsmob_grob (element_smob); - Axis a = (Axis) ly_scm2int (scm_axis); + Axis a = (Axis) scm_to_int (scm_axis); assert (a == X_AXIS); String gl = ly_scm2string (se->get_property ("glyph")); @@ -130,8 +129,9 @@ MAKE_SCHEME_CALLBACK (Span_bar,before_line_breaking,1); SCM Span_bar::before_line_breaking (SCM smob) { - evaluate_empty (unsmob_grob (smob)); - evaluate_glyph (unsmob_grob (smob)); + Grob * g = unsmob_grob (smob); + evaluate_empty (g); + evaluate_glyph (g); /* No need to call Bar_line::before_line_breaking (), because the info in ELEMENTS already has been procced by @@ -145,7 +145,7 @@ SCM Span_bar::center_on_spanned_callback (SCM element_smob, SCM axis) { Grob *me = unsmob_grob (element_smob); - Axis a = (Axis) ly_scm2int (axis); + Axis a = (Axis) scm_to_int (axis); assert (a == Y_AXIS); Interval i (get_spanned_interval (me)); @@ -167,7 +167,7 @@ Span_bar::evaluate_empty (Grob*me) /* TODO: filter all hara-kiried out of ELEMENS list, and then optionally do suicide. Call this cleanage function from center_on_spanned_callback () as well. */ - if (!ly_c_pair_p (me->get_property ("elements"))) + if (!scm_is_pair (me->get_property ("elements"))) { me->suicide (); } @@ -178,17 +178,17 @@ Span_bar::evaluate_glyph (Grob*me) { SCM gl = me->get_property ("glyph"); - if (ly_c_string_p (gl)) + if (scm_is_string (gl)) return ; for (SCM s = me->get_property ("elements"); - !ly_c_string_p (gl) && ly_c_pair_p (s); s = ly_cdr (s)) + !scm_is_string (gl) && scm_is_pair (s); s = scm_cdr (s)) { - gl = unsmob_grob (ly_car (s)) + gl = unsmob_grob (scm_car (s)) ->get_property ("glyph"); } - if (!ly_c_string_p (gl)) + if (!scm_is_string (gl)) { me->suicide (); return; @@ -199,11 +199,11 @@ Span_bar::evaluate_glyph (Grob*me) { type = ".|"; } - else if (type== ":|") + else if (type == ":|") { type = "|."; } - else if (type== ":|:") + else if (type == ":|:") { type = ".|."; }