]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/span-bar.cc
* lily/parser.yy (Music_list): add error-found to music with errors.
[lilypond.git] / lily / span-bar.cc
index b49bde8aa3b06ad78496d4e3371646559aefe331..e806a0dd2ddc122a499b25bdbdef3a75b94c5f55 100644 (file)
@@ -53,9 +53,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 +65,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 +74,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 +114,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 +130,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 +146,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 +168,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 +179,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;