]> git.donarmstrong.com Git - lilypond.git/commitdiff
*** empty log message ***
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Fri, 3 Sep 2004 23:27:37 +0000 (23:27 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Fri, 3 Sep 2004 23:27:37 +0000 (23:27 +0000)
81 files changed:
ChangeLog
lily/accidental-engraver.cc
lily/accidental-placement.cc
lily/accidental.cc
lily/align-interface.cc
lily/ambitus-engraver.cc
lily/arpeggio.cc
lily/axis-group-interface.cc
lily/bar-number-engraver.cc
lily/beam-quanting.cc
lily/beam.cc
lily/break-align-interface.cc
lily/chord-name-engraver.cc
lily/clef-engraver.cc
lily/cluster-engraver.cc
lily/completion-note-heads-engraver.cc
lily/custos-engraver.cc
lily/dot-column.cc
lily/dots.cc
lily/duration.cc
lily/dynamic-engraver.cc
lily/dynamic-performer.cc
lily/event.cc
lily/fingering-engraver.cc
lily/font-metric.cc
lily/gregorian-ligature-engraver.cc
lily/gregorian-ligature.cc
lily/grob-scheme.cc
lily/grob.cc
lily/hara-kiri-group-spanner.cc
lily/key-engraver.cc
lily/key-performer.cc
lily/key-signature-interface.cc
lily/lily-guile.cc
lily/lookup.cc
lily/mark-engraver.cc
lily/measure-grouping-engraver.cc
lily/mensural-ligature-engraver.cc
lily/mensural-ligature.cc
lily/midi-item.cc
lily/moment.cc
lily/multi-measure-rest-engraver.cc
lily/multi-measure-rest.cc
lily/new-fingering-engraver.cc
lily/note-collision.cc
lily/note-column.cc
lily/note-head.cc
lily/note-heads-engraver.cc
lily/paper-system.cc
lily/parse-scm.cc
lily/parser.yy
lily/pitch.cc
lily/repeated-music.cc
lily/rest-collision.cc
lily/rest-engraver.cc
lily/rest.cc
lily/rhythmic-head.cc
lily/scm-option.cc
lily/script-column.cc
lily/script-engraver.cc
lily/self-aligment-interface.cc
lily/separation-item.cc
lily/side-position-interface.cc
lily/slur-scoring.cc
lily/slur.cc
lily/span-bar.cc
lily/staff-symbol.cc
lily/stem-engraver.cc
lily/stem-tremolo.cc
lily/stem.cc
lily/stencil-scheme.cc
lily/tab-note-heads-engraver.cc
lily/tempo-performer.cc
lily/text-engraver.cc
lily/time-signature-engraver.cc
lily/time-signature-performer.cc
lily/time-signature.cc
lily/timing-translator.cc
lily/unfolded-repeat-iterator.cc
lily/vaticana-ligature-engraver.cc
lily/vaticana-ligature.cc

index a7a40b477bdb8057685d5a980cd5646890b407f4..c0b9e1376ec7719d295cb40ef843645ca6bb1d50 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 2004-09-04  Han-Wen Nienhuys   <hanwen@xs4all.nl>
 
+       * lily/*: ly_scm2int -> scm_to_int
+
        * lily/include/lily-guile.hh (scm_from_double): more compat glue.
 
 2004-09-03  Han-Wen Nienhuys   <hanwen@xs4all.nl>
index e48e441f1059af2013c8f7c415f96a707f057fe3..b54366a066475535dbf06bd7a7a9fe01142910ae 100644 (file)
@@ -153,10 +153,10 @@ number_accidentals_from_sig (bool *different, SCM sig, Pitch *pitch,
          if (ly_c_pair_p (ly_cdr (prev_local))
              && ly_c_number_p (laziness))
            {
-             int barnum = ly_scm2int (ly_cddr (prev_local));
+             int barnum = scm_to_int (ly_cddr (prev_local));
 
              prev_local = scm_cons (ly_car (prev_local), ly_cadr (prev_local));
-             if (curbarnum <= barnum + ly_scm2int (laziness))
+             if (curbarnum <= barnum + scm_to_int (laziness))
                prev_alt = prev_local;
            }
        }
@@ -168,7 +168,7 @@ number_accidentals_from_sig (bool *different, SCM sig, Pitch *pitch,
   prev_alt =  (prev_alt == SCM_BOOL_F) ? scm_int2num (0) : ly_cdr (prev_alt); 
     
   /* UGH. prev_acc can be #t in case of ties. What is this for?  */
-  int p = ly_c_number_p (prev_alt) ? ly_scm2int (prev_alt) : 0;
+  int p = ly_c_number_p (prev_alt) ? scm_to_int (prev_alt) : 0;
 
   int num;
   if (a == p && ly_c_number_p (prev_alt))
index 9327253f6c7bdab5c7303ff6fe5d6c22b8359d0d..3b85e72c0aa21bcc1be17f1d21487a75dca14908 100644 (file)
@@ -263,7 +263,7 @@ Accidental_placement::position_accidentals (Grob * me)
   for (SCM s = accs; ly_c_pair_p (s); s =ly_cdr (s))
     {
       Accidental_placement_entry *ape = new Accidental_placement_entry;
-      ape->notename_ = ly_scm2int (ly_caar (s));
+      ape->notename_ = scm_to_int (ly_caar (s));
       
       for (SCM t = ly_cdar (s); ly_c_pair_p (t); t =ly_cdr (t))
        ape->grobs_.push (unsmob_grob (ly_car (t)));
index cbb0fc120276f225baa9314f048a4d6e6b6168bc..79260eed7b45ef3a0390bddcac4039203410cf5b 100644 (file)
@@ -69,7 +69,7 @@ Accidental_interface::accurate_boxes (Grob *a,Grob**common)
       && !parens
       && scm_ilength (accs) == 1)
     {
-      if (ly_scm2int (ly_car (accs)) == FLAT)
+      if (scm_to_int (ly_car (accs)) == FLAT)
        {
          Box stem = b;
          Box bulb = b;
@@ -209,7 +209,7 @@ Accidental_interface::print (SCM smob)
   for (SCM s = me->get_property ("accidentals");
        ly_c_pair_p (s); s = ly_cdr (s))
     {
-      int alteration = ly_scm2int (ly_car (s));
+      int alteration = scm_to_int (ly_car (s));
       String font_char = get_fontcharname (style, alteration);
       Stencil acc (fm->find_by_name ("accidentals-" + font_char));
 
index f510304b6667e462f461eb83831ac91d9e5205fa..952f012b5ef46866d35ddb8a052010ccb9eeb194 100644 (file)
@@ -19,7 +19,7 @@ SCM
 Align_interface::alignment_callback (SCM element_smob, SCM axis)
 {
   Grob * me = unsmob_grob (element_smob);
-  Axis ax = (Axis)ly_scm2int (axis);
+  Axis ax = (Axis)scm_to_int (axis);
   Grob * par = me->get_parent (ax);
   if (par && !to_boolean (par->get_property ("positioning-done")))
     {
@@ -33,7 +33,7 @@ SCM
 Align_interface::fixed_distance_alignment_callback (SCM element_smob, SCM axis)
 {
   Grob * me = unsmob_grob (element_smob);
-  Axis ax = (Axis)ly_scm2int (axis);
+  Axis ax = (Axis)scm_to_int (axis);
   Grob * par = me->get_parent (ax);
   if (par && !to_boolean (par->get_property ("positioning-done")))
     {
@@ -227,7 +227,7 @@ Align_interface::align_elements_to_extents (Grob * me, Axis a)
 Axis
 Align_interface::axis (Grob*me)
 {
-  return  Axis (ly_scm2int (ly_car (me->get_property ("axes"))));
+  return  Axis (scm_to_int (ly_car (me->get_property ("axes"))));
 }
 
 void
index c9d6b570abad5ceaf677616f441eee0ff5c22894..f50b651050756c7bc63ce61f6a4076a35854cbb9 100644 (file)
@@ -147,7 +147,7 @@ Ambitus_engraver::finalize ()
            handle = scm_assoc (scm_from_int (p.get_notename ()),
                                start_key_sig_);
          
-         int sig_alter = (handle != SCM_BOOL_F) ? ly_scm2int (ly_cdr (handle)) : 0;
+         int sig_alter = (handle != SCM_BOOL_F) ? scm_to_int (ly_cdr (handle)) : 0;
          if (sig_alter == p.get_alteration ())
            {
              accidentals_[d]->suicide();
index ad0ca353e1b8adb9d6532ef7e8bab4a8778c5d16..7c8110f4e5986d18b8896bf013e3c6aa06b4231d 100644 (file)
@@ -143,7 +143,7 @@ SCM
 Arpeggio::width_callback (SCM smob, SCM axis)
 {
   Grob * me = unsmob_grob (smob);
-  Axis a = (Axis)ly_scm2int (axis);
+  Axis a = (Axis)scm_to_int (axis);
   assert (a == X_AXIS);
   Stencil arpeggio = Font_interface::get_default_font (me)->find_by_name ("scripts-arpeggio");
 
index c38bfbb52ed0833611b7e57ef19bfb8ba0271d51..a75ab081bfc486abec364c6db99a97de46fe6f10 100644 (file)
@@ -15,7 +15,7 @@ Axis_group_interface::add_element (Grob*me,Grob *e)
 {
   for (SCM ax = me->get_property ("axes"); ax != SCM_EOL ; ax = ly_cdr (ax))
     {
-      Axis a = (Axis) ly_scm2int (ly_car (ax));
+      Axis a = (Axis) scm_to_int (ly_car (ax));
       
       if (!e->get_parent (a))
        e->set_parent (me, a);
@@ -54,7 +54,7 @@ SCM
 Axis_group_interface::group_extent_callback (SCM element_smob, SCM scm_axis)
 {
   Grob *me = unsmob_grob (element_smob);
-  Axis a = (Axis) ly_scm2int (scm_axis);
+  Axis a = (Axis) scm_to_int (scm_axis);
 
   SCM elts = me->get_property ("elements");
   Grob * common = common_refpoint_of_list (elts, me, a);
index 7d0550c9c6d92abda137b6b46b1708ad1527fa2b..cadf996c9a7248bc4b1ba9547d1d9e6c5fe80d31 100644 (file)
@@ -60,7 +60,7 @@ Bar_number_engraver::process_music ()
              create_items ();
              // guh.
              text_->set_property
-               ("text", scm_makfrom0str (to_string (ly_scm2int (bn)).to_str0 ()));
+               ("text", scm_makfrom0str (to_string (scm_to_int (bn)).to_str0 ()));
            }
        }
     }
index 467ef517c3259ddb945b0216f43f572ee7d61119..51ccb2e9424a6d524ea8c1ba7b0d73305838f831 100644 (file)
@@ -282,7 +282,7 @@ Beam::quanting (SCM smob)
   if (to_boolean (me->get_paper ()->lookup_variable (ly_symbol2scm ("debug-beam-quanting")))
       && ly_c_pair_p (inspect_quants))
     {
-      Drul_array<Real> ins = ly_scm2interval (inspect_quants);
+      Drul_array<Real> ins = scm_to_interval (inspect_quants);
 
       int i = 0;
 
index 3a63c6df4a0af6a910baccd03fab5b5364d2a7b7..cad26f019018a6b4dab57fe6db8984590bb2d322 100644 (file)
@@ -115,7 +115,7 @@ Beam::space_function (SCM smob, SCM beam_count)
   Real line = Staff_symbol_referencer::line_thickness (me);
   Real thickness = get_thickness (me);
   
-  Real beam_translation = ly_scm2int (beam_count) < 4
+  Real beam_translation = scm_to_int (beam_count) < 4
     ? (2*staff_space + line - thickness) / 2.0
     : (3*staff_space + line - thickness) / 3.0;
   
@@ -209,7 +209,7 @@ position_with_maximal_common_beams (SCM left_beaming, SCM right_beaming,
       int count =0;
       for ( SCM s = ly_car (right_beaming); ly_c_pair_p (s); s = ly_cdr (s))
        {
-         int k = - right_dir * ly_scm2int (ly_car (s)) + i;
+         int k = - right_dir * scm_to_int (ly_car (s)) + i;
          if (scm_c_memq (scm_int2num (k), left_beaming) != SCM_BOOL_F)
            count ++;
        }
@@ -258,7 +258,7 @@ Beam::connect_beams (Grob *me)
              for (; ly_c_pair_p (s); s = ly_cdr (s))
                {
                  int new_beam_pos =
-                   start_point - this_dir * ly_scm2int (ly_car (s));
+                   start_point - this_dir * scm_to_int (ly_car (s));
 
                  new_slice.add_point (new_beam_pos);
                  scm_set_car_x (s, scm_int2num (new_beam_pos));
@@ -277,7 +277,7 @@ Beam::connect_beams (Grob *me)
          SCM s = ly_cdr (this_beaming);
          for (; ly_c_pair_p (s); s = ly_cdr (s))
            {
-             int np = - this_dir * ly_scm2int (ly_car (s));
+             int np = - this_dir * scm_to_int (ly_car (s));
              scm_set_car_x (s, scm_int2num (np));
              last_int.add_point (np);
            }
@@ -377,7 +377,7 @@ Beam::print (SCM grob)
       for (SCM s = left;
           ly_c_pair_p (s); s =ly_cdr (s))
        {
-         int b = ly_scm2int (ly_car (s));
+         int b = scm_to_int (ly_car (s));
          if (scm_c_memq (ly_car (s), right) != SCM_BOOL_F)
            {
              full_beams.push (b);
@@ -390,7 +390,7 @@ Beam::print (SCM grob)
       for (SCM s = right;
           ly_c_pair_p (s); s =ly_cdr (s))
        {
-         int b = ly_scm2int (ly_car (s));
+         int b = scm_to_int (ly_car (s));
          if (scm_c_memq (ly_car (s), left) == SCM_BOOL_F)
            {
              rfliebertjes.push (b);
@@ -421,7 +421,7 @@ Beam::print (SCM grob)
       int gap_count = 0;
       if (ly_c_number_p (me->get_property ("gap-count")))
        {
-         gap_count = ly_scm2int (me->get_property ("gap-count"));
+         gap_count = scm_to_int (me->get_property ("gap-count"));
          gapped = Lookup::beam (dydx, w - 2 * gap_length, thick, blot);
 
          full_beams.sort (default_compare);
@@ -568,7 +568,7 @@ Beam::get_default_dir (Grob *me)
                    scm_cons (scm_int2num (total[UP]),
                             scm_int2num (total[DOWN])));
 
-  if (ly_c_number_p (s) && ly_scm2int (s))
+  if (ly_c_number_p (s) && scm_to_int (s))
     return to_dir (s);
   
   /* If dir is not determined: get default */
@@ -992,7 +992,7 @@ Beam::shift_region_to_valid (SCM grob)
   
   Real dx = lvs->relative_coordinate (commonx, X_AXIS) - x0;
 
-  Drul_array<Real> pos = ly_scm2interval ( me->get_property ("positions"));
+  Drul_array<Real> pos = scm_to_interval ( me->get_property ("positions"));
 
   scale_drul (&pos,  Staff_symbol_referencer::staff_space (me));
   
@@ -1157,7 +1157,7 @@ Beam::check_concave (SCM smob)
   /* TODO: some sort of damping iso -> plain horizontal */
   if (is_concave1 || concaveness2 > r2)
     {
-      Drul_array<Real> pos = ly_scm2interval (me->get_property ("positions"));
+      Drul_array<Real> pos = scm_to_interval (me->get_property ("positions"));
       Real r = linear_combination (pos, 0.0);
 
       r /= Staff_symbol_referencer::staff_space (me);
@@ -1181,11 +1181,11 @@ Beam::slope_damping (SCM smob)
     return SCM_UNSPECIFIED;
 
   SCM s = me->get_property ("damping"); 
-  int damping = ly_scm2int (s);
+  int damping = scm_to_int (s);
 
   if (damping)
     {
-      Drul_array<Real>  pos = ly_scm2interval (me->get_property ("positions"));
+      Drul_array<Real>  pos = scm_to_interval (me->get_property ("positions"));
       scale_drul (&pos,  Staff_symbol_referencer::staff_space (me));
       
       Real dy = pos[RIGHT] - pos[LEFT];
@@ -1225,7 +1225,7 @@ where_are_the_whole_beams (SCM beaming)
     {
       if (scm_c_memq (ly_car (s), ly_cdr (beaming)) != SCM_BOOL_F)
        
-       l.add_point (ly_scm2int (ly_car (s)));
+       l.add_point (scm_to_int (ly_car (s)));
     }
 
   return l;
@@ -1296,7 +1296,7 @@ Beam::set_stem_lengths (Grob *me)
   bool gap = false;
   Real thick =0.0;
   if (ly_c_number_p (me->get_property ("gap-count"))
-      &&ly_scm2int (me->get_property ("gap-count")))
+      &&scm_to_int (me->get_property ("gap-count")))
     {
       gap = true;
       thick = get_thickness (me);
@@ -1451,7 +1451,7 @@ SCM
 Beam::rest_collision_callback (SCM element_smob, SCM axis)
 {
   Grob *rest = unsmob_grob (element_smob);
-  Axis a = (Axis) ly_scm2int (axis);
+  Axis a = (Axis) scm_to_int (axis);
 
   if (ly_c_number_p (rest->get_property ("staff-position")))
     return scm_int2num (0);
@@ -1471,7 +1471,7 @@ Beam::rest_collision_callback (SCM element_smob, SCM axis)
   Drul_array<Real> pos (0, 0);
   SCM s = beam->get_property ("positions");
   if (ly_c_pair_p (s) && ly_c_number_p (ly_car (s)))
-    pos = ly_scm2interval (s);
+    pos = scm_to_interval (s);
   Real staff_space = Staff_symbol_referencer::staff_space (rest);
 
   scale_drul (&pos, staff_space);
index 6bbd74a950ab5c9e5e125e09d03b02dcbd163c17..c4d429a008ea4f7104f33de831662d81a8b9bc40 100644 (file)
@@ -28,7 +28,7 @@ SCM
 Break_align_interface::alignment_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 == X_AXIS);
   Grob *par = me->get_parent (a);
@@ -46,7 +46,7 @@ SCM
 Break_align_interface::self_align_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 == X_AXIS);
   
   Item* item = dynamic_cast<Item*> (me);
index 88635e5285860c2a3cd3c29bd1ff7bd08543b022..ac5b14d4cbf1d62711ee508e5a334596271721ab 100644 (file)
@@ -89,7 +89,7 @@ Chord_name_engraver::process_music ()
       if (ly_c_number_p (oct))
        {
          Pitch *p = unsmob_pitch (inversion_event->get_property ("pitch"));
-         int octavation =  ly_scm2int (oct);
+         int octavation =  scm_to_int (oct);
          Pitch orig = p->transposed (Pitch (-octavation, 0,0));
          
          pitches= scm_cons (orig.smobbed_copy (), pitches);
index 11f1554bca3db723799aedb6f20dddc37e3982b4..176f03692666cb7e2b81b1902138bd3ce457bc4a 100644 (file)
@@ -96,11 +96,11 @@ Clef_engraver::create_clef ()
        clef_->set_property ("staff-position", cpos);
 
       SCM oct =  get_property ("clefOctavation");
-      if (ly_c_number_p (oct) && ly_scm2int (oct))
+      if (ly_c_number_p (oct) && scm_to_int (oct))
        {
          Item * g = make_item ("OctavateEight", SCM_EOL);
 
-         int abs_oct = ly_scm2int (oct) ;
+         int abs_oct = scm_to_int (oct) ;
          int dir = sign (abs_oct);
          abs_oct = abs (abs_oct)  + 1;
 
index a65ee86cbf39d72fcb0447bfe01a56c63f58ec50..9e10915541eeed205ac8fea5eb8ea6cbd12b3660 100644 (file)
@@ -73,7 +73,7 @@ Cluster_spanner_engraver::process_music ()
     {
       SCM c0scm = get_property ("middleCPosition");
 
-      int c0 =  ly_c_number_p (c0scm) ? ly_scm2int (c0scm) : 0;
+      int c0 =  ly_c_number_p (c0scm) ? scm_to_int (c0scm) : 0;
       int pmax = INT_MIN;
       int pmin = INT_MAX;
       
index adf3e61ca641a6292362340c44b9f13a34c7d874..cea76ecafac0398f91139c90bca1677358158b96 100644 (file)
@@ -233,7 +233,7 @@ Completion_heads_engraver::process_music ()
          /*
           measly attempt to save an eeny-weenie bit of memory.
          */
-         if (dots != ly_scm2int (d->get_property ("dot-count")))
+         if (dots != scm_to_int (d->get_property ("dot-count")))
            d->set_property ("dot-count", scm_int2num (dots));
 
          d->set_parent (note, Y_AXIS);
@@ -245,7 +245,7 @@ Completion_heads_engraver::process_music ()
       int pos = pit->steps ();
       SCM c0 = get_property ("middleCPosition");
       if (ly_c_number_p (c0))
-       pos += ly_scm2int (c0);
+       pos += scm_to_int (c0);
 
       note->set_property ("staff-position",   scm_int2num (pos));
       notes_.push (note);
index 0538aef4527eee03547bdc714b889272fe0439d1..080121da8b8bacf16f2c74d6aae1ffce40b0b2a5 100644 (file)
@@ -105,7 +105,7 @@ Custos_engraver::process_acknowledged_grobs ()
          int p = pitches_[i].steps ();
          SCM c0 = get_property ("middleCPosition");
          if (ly_c_number_p (c0))
-           p += ly_scm2int (c0);
+           p += scm_to_int (c0);
 
          
          c->set_property ("staff-position",
index 1a7f3cc601222ed66839b0c69b58cc65c05a0cc4..63dc2f76ee37e768cb1ee3ddd34fb1d0ce936371 100644 (file)
@@ -29,7 +29,7 @@ SCM
 Dot_column::force_shift_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);
   me = me->get_parent (X_AXIS);
 
@@ -47,7 +47,7 @@ SCM
 Dot_column::side_position (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 == X_AXIS);
 
   Grob * stem = unsmob_grob (me->get_property ("stem"));
index c93a6f8c67c0a9e6640d8f80e79fee6da7906781..6814800a37ccb4d525fb82f1308ec78d3e9bfe5b 100644 (file)
@@ -40,7 +40,7 @@ Dots::print (SCM d)
       mol = Lookup::blank (Box (Interval (0,0),
                                Interval (0,0)));
   
-      for (int i = ly_scm2int (c); i--;)
+      for (int i = scm_to_int (c); i--;)
        {
          d.translate_axis (2*dw,X_AXIS);
          mol.add_at_edge (X_AXIS, RIGHT, d, dw, 0);
index 82f5a506c29b4258a69b2fac5a4af898ad4adfdb..ff0181140b3adec56612945eda6f967083deb12a 100644 (file)
@@ -166,7 +166,7 @@ LY_DEFINE (ly_make_duration, "ly:make-duration",
     {
       SCM_ASSERT_TYPE (scm_integer_p (dotcount) == SCM_BOOL_T,
                       dotcount, SCM_ARG2, __FUNCTION__, "integer");
-      dots = ly_scm2int (dotcount);
+      dots = scm_to_int (dotcount);
     }
 
   bool compress = false;
@@ -186,9 +186,9 @@ LY_DEFINE (ly_make_duration, "ly:make-duration",
   else
     den = scm_int2num (1);
 
-  Duration p (ly_scm2int (length), dots);
+  Duration p (scm_to_int (length), dots);
   if (compress)
-    p = p.compressed (Rational (ly_scm2int (num), ly_scm2int (den)));
+    p = p.compressed (Rational (scm_to_int (num), scm_to_int (den)));
 
   return p.smobbed_copy ();
 }
@@ -214,7 +214,7 @@ LY_DEFINE (ly_intlog2, "ly:intlog2",
          "The 2-logarithm of 1/@var{d}.")
 {
   SCM_ASSERT_TYPE (ly_c_number_p (d), d, SCM_ARG1, __FUNCTION__, "integer");
-  int log = intlog2 (ly_scm2int (d));
+  int log = intlog2 (scm_to_int (d));
   return scm_int2num (log);
 }
 
index bb888f21d347995f6d3087dff98bf27af4e46dff..00439ca00ed669a9a03cdd5a9f20d28180f35761 100644 (file)
@@ -397,8 +397,8 @@ Dynamic_engraver::acknowledge_grob (Grob_info info)
        DynamicText doesn't really have a script-priority field.
        */
       if (ly_c_number_p (p)
-         && ly_scm2int (p)
-         < ly_scm2int (script_->get_property ("script-priority")))
+         && scm_to_int (p)
+         < scm_to_int (script_->get_property ("script-priority")))
        Side_position_interface::add_support (line_spanner_, info.grob_);
     }
   else if (Slur::has_interface (info.grob_))
index e8e2bab12a527904d7e2294cac093b969ffb6937..0cd1b49952b90b5fb39d185b6c22ee04da5e4735 100644 (file)
@@ -90,7 +90,7 @@ Dynamic_performer::create_audio_elements ()
 
          if (is_number_pair (s))
            {
-             Interval iv = ly_scm2interval (s);
+             Interval iv = scm_to_interval (s);
              volume = iv[MIN] + iv.length () * volume;
            }
        }
index 1c1112379bf68a5dd2a8fd478fe6965351e85997..0c60b35f0f441bc754bef5cd3eca73f98e285622 100644 (file)
@@ -64,9 +64,9 @@ Event::to_relative_octave (Pitch last)
 
       SCM check = get_property ("absolute-octave");
       if (ly_c_number_p (check) &&
-         new_pit.get_octave () != ly_scm2int (check))
+         new_pit.get_octave () != scm_to_int (check))
        {
-         Pitch expected_pit (ly_scm2int (check),
+         Pitch expected_pit (scm_to_int (check),
                              new_pit.get_notename (),
                              new_pit.get_alteration ());
          origin ()->warning (_f ("octave check failed; expected %s, found: %s",
@@ -148,9 +148,9 @@ LY_DEFINE (ly_transpose_key_alist, "ly:transpose-key-alist",
       SCM alter = ly_cdar (s);
       if (ly_c_pair_p (key))
        {
-         Pitch orig (ly_scm2int (ly_car (key)),
-                     ly_scm2int (ly_cdr (key)),
-                     ly_scm2int (alter));
+         Pitch orig (scm_to_int (ly_car (key)),
+                     scm_to_int (ly_cdr (key)),
+                     scm_to_int (alter));
 
          orig =orig.transposed (*p);
 
@@ -162,7 +162,7 @@ LY_DEFINE (ly_transpose_key_alist, "ly:transpose-key-alist",
        }
       else if (ly_c_number_p (key))
        {
-         Pitch orig (0, ly_scm2int (key), ly_scm2int (alter));
+         Pitch orig (0, scm_to_int (key), scm_to_int (alter));
          orig = orig.transposed (*p);
 
          key =scm_int2num (orig.get_notename ());
index 8dbc974b6f0e7d0929bc0ac09f899b44a87554c8..0f5628e0f4c320443ff874ae37aa9112eec52ac6 100644 (file)
@@ -106,7 +106,7 @@ Fingering_engraver::make_script (Direction d, Music *r, int i)
   int priority = 200;
   SCM s = fingering->get_property ("script-priority");
   if (ly_c_number_p (s))
-    priority = ly_scm2int (s);
+    priority = scm_to_int (s);
   
   /* See script-engraver.cc */
   priority += i;
index 7bf1f39796101043ce672ae60fff51118477053d..cb90680601e51a0c24a98ab494b3768104dc7d5c 100644 (file)
@@ -157,7 +157,7 @@ LY_DEFINE (ly_get_glyph, "ly:get-glyph",
   SCM_ASSERT_TYPE (fm, font, SCM_ARG1, __FUNCTION__, "font-metric");
   SCM_ASSERT_TYPE (ly_c_number_p (index), index, SCM_ARG2, __FUNCTION__, "number");
 
-  return fm->get_ascii_char_stencil (ly_scm2int (index)).smobbed_copy ();
+  return fm->get_ascii_char_stencil (scm_to_int (index)).smobbed_copy ();
 }
 
 LY_DEFINE (ly_text_dimension,"ly:text-dimension",
@@ -274,5 +274,5 @@ get_encoded_index (Font_metric *m, String input_coding, int code)
                      scm_makfrom0str (input_coding.to_str0 ()),
                      scm_makfrom0str (font_coding.to_str0 ()),
                      scm_int2num (code));
-  return ly_scm2int (s);
+  return scm_to_int (s);
 }
index 8e96a11f48865c4575c1289118e800038b8343ff..cf4c0e18f2b45bb25fb8aab5a440a44826296188 100644 (file)
@@ -205,7 +205,7 @@ provide_context_info (Array<Grob_info> primitives)
     Music *music_cause = primitives[i].music_cause ();
     int context_info = 0;
     int pitch = unsmob_pitch (music_cause->get_property ("pitch"))->steps ();
-    int prefix_set = ly_scm2int (primitive->get_property ("prefix-set"));
+    int prefix_set = scm_to_int (primitive->get_property ("prefix-set"));
 
     if (prefix_set & PES_OR_FLEXA)
       if (!i) // ligature may not start with 2nd head of pes or flexa
index 4ccc5c0fe8803468ea696b4d36a1aad23f6cadeb..e4721713379fc984c5c93f0f42e4ade30b25f829 100644 (file)
@@ -24,7 +24,7 @@ Gregorian_ligature::prefixes_to_str (Grob *primitive)
 {
   String str;
   int prefix_set =
-    ly_scm2int (primitive->get_property ("prefix-set"));
+    scm_to_int (primitive->get_property ("prefix-set"));
   check_prefix ("virga", VIRGA, prefix_set, &str);
   check_prefix ("stropha", STROPHA, prefix_set, &str);
   check_prefix ("inclinatum", INCLINATUM, prefix_set, &str);
index 7e3c05f74d258371466a1dfb84f5128fb8406605..d05a56104613ff4ae78f73a00ed7b30220da9476 100644 (file)
@@ -95,7 +95,7 @@ LY_DEFINE (ly_get_extent, "ly:grob-extent",
   SCM_ASSERT_TYPE (ref, refp, SCM_ARG2, __FUNCTION__, "grob");
   SCM_ASSERT_TYPE (is_axis (axis), axis, SCM_ARG3, __FUNCTION__, "axis");
 
-  return ly_interval2scm ( sc->extent (ref, Axis (ly_scm2int (axis))));
+  return ly_interval2scm ( sc->extent (ref, Axis (scm_to_int (axis))));
 }
 
 LY_DEFINE (ly_grob_parent, "ly:grob-parent",
@@ -107,7 +107,7 @@ LY_DEFINE (ly_grob_parent, "ly:grob-parent",
   SCM_ASSERT_TYPE (sc, grob, SCM_ARG1, __FUNCTION__, "grob");
   SCM_ASSERT_TYPE (is_axis (axis), axis, SCM_ARG2, __FUNCTION__, "axis");
 
-  Grob *par = sc->get_parent (Axis (ly_scm2int (axis)));
+  Grob *par = sc->get_parent (Axis (scm_to_int (axis)));
   return par ? par->self_scm () : SCM_EOL;
 }
 
@@ -190,7 +190,7 @@ LY_DEFINE (ly_grob_translate_axis_x, "ly:grob-translate-axis!",
   SCM_ASSERT_TYPE (ly_c_number_p (d), d, SCM_ARG2, __FUNCTION__, "dimension");
   SCM_ASSERT_TYPE (is_axis (a), a, SCM_ARG3, __FUNCTION__, "axis");
 
-  me->translate_axis (ly_scm2double (d), Axis (ly_scm2int (a)));
+  me->translate_axis (ly_scm2double (d), Axis (scm_to_int (a)));
   return SCM_UNSPECIFIED;
 }
 
index 1c3aa91fa3bd662f758af994f9a05ca42e34c2f4..baefcc77d1864587b10c141d672265cc9c52cfec 100644 (file)
@@ -128,7 +128,7 @@ SCM
 Grob::stencil_extent (SCM element_smob, SCM scm_axis)
 {
   Grob *s = unsmob_grob (element_smob);
-  Axis a = (Axis) ly_scm2int (scm_axis);
+  Axis a = (Axis) scm_to_int (scm_axis);
 
   Stencil *m = s->get_stencil ();
   Interval e;
@@ -409,7 +409,7 @@ Grob::extent (Grob *refp, Axis a) const
   if (!ly_c_pair_p (d->dimension_))
     return ext;
 
-  ext = ly_scm2interval (d->dimension_);
+  ext = scm_to_interval (d->dimension_);
 
   SCM extra = get_property (a == X_AXIS
                            ? "extra-X-extent"
index 4cf8465f3fcc1819e0645646c1bc78be58ead8d8..d82fa3bc2311620dfd9bc1f741a91f75111c9792 100644 (file)
@@ -19,7 +19,7 @@ SCM
 Hara_kiri_group_spanner::y_extent (SCM element_smob, SCM scm_axis)
 {
   Grob *me = unsmob_grob (element_smob);
-  Axis a = (Axis) ly_scm2int (scm_axis);
+  Axis a = (Axis) scm_to_int (scm_axis);
 
   assert (a == Y_AXIS);
   consider_suicide (me);
@@ -63,7 +63,7 @@ SCM
 Hara_kiri_group_spanner::force_hara_kiri_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);
   consider_suicide (me);
   return scm_make_real (0.0);
@@ -75,7 +75,7 @@ SCM
 Hara_kiri_group_spanner::force_hara_kiri_in_parent_callback (SCM element_smob, SCM axis)
 {
   Grob *daughter = unsmob_grob (element_smob);
-  Axis a = (Axis) ly_scm2int (axis);
+  Axis a = (Axis) scm_to_int (axis);
   assert (a == Y_AXIS);
   force_hara_kiri_callback (daughter->get_parent (a)->self_scm (), axis);
   return scm_make_real (0.0);
index e856460f7987fc77ecd89b6427fc7dca5dadc9bc..2b1142fa9ba1011075b98fce9172c5b822071ad0 100644 (file)
@@ -156,7 +156,7 @@ Key_engraver::read_ev (Music const * r)
     }
   
   for (SCM s = n ; ly_c_pair_p (s); s = ly_cdr (s))
-    if (ly_scm2int (ly_cdar (s)))
+    if (scm_to_int (ly_cdar (s)))
       accs = scm_cons (ly_car (s), accs);
 
   context ()->set_property ("keySignature", accs);
index f217742603da17e4f9478289d10a14096a0ea60b..f27f0d85f4c3614c9f4b4c51fa488ccf3bb12b54 100644 (file)
@@ -50,8 +50,8 @@ Key_performer::create_audio_elements ()
       SCM acc = scm_call_1 (proc, pitchlist);
       
       Pitch key_do (0, 
-                   ly_scm2int (ly_caar (pitchlist)),
-                   ly_scm2int (ly_cdar (pitchlist)));
+                   scm_to_int (ly_caar (pitchlist)),
+                   scm_to_int (ly_cdar (pitchlist)));
 
       Pitch c_do (0, 0, 0);
                  
@@ -62,7 +62,7 @@ Key_performer::create_audio_elements ()
       /* MIDI keys are too limited for lilypond scales.
         We check for minor scale and assume major otherwise.  */
       SCM minor = scm_c_eval_string ("minor");
-      audio_ = new Audio_key (ly_scm2int (acc),
+      audio_ = new Audio_key (scm_to_int (acc),
                              SCM_BOOL_T != scm_equal_p (minor, c_pitchlist));
 
       Audio_element_info info (audio_, key_req_);
index 14008669491601e87255fd3db72384a3c6c81354..f69348d9a53b3c0a2c6a429e3c884ed081724bd4 100644 (file)
@@ -54,9 +54,9 @@ int
 alteration_pos  (SCM what, int alter, int c0p)
 {
   if (ly_c_pair_p (what))
-    return ly_scm2int (ly_car (what)) * 7 + ly_scm2int (ly_cdr (what)) + c0p;
+    return scm_to_int (ly_car (what)) * 7 + scm_to_int (ly_cdr (what)) + c0p;
 
-  int p = ly_scm2int (what);
+  int p = scm_to_int (what);
 
   // Find the c in the range -4 through 2
   int from_bottom_pos = c0p + 4;
@@ -117,7 +117,7 @@ Key_signature_interface::print (SCM smob)
   SCM c0s = me->get_property ("c0-position");
   int c0p = 0;
   if (ly_c_number_p (c0s))
-    c0p = ly_scm2int (c0s);
+    c0p = scm_to_int (c0s);
 
   /*
     SCM lists are stacks, so we work from right to left, ending with
@@ -127,7 +127,7 @@ Key_signature_interface::print (SCM smob)
   Font_metric *fm = Font_interface::get_default_font (me);
   for (SCM s = newas; ly_c_pair_p (s); s = ly_cdr (s))
     {
-      int alteration = ly_scm2int (ly_cdar (s));
+      int alteration = scm_to_int (ly_cdar (s));
       String font_char =
        Accidental_interface::get_fontcharname (style, alteration);
       Stencil acc (fm->find_by_name ("accidentals-" + font_char));
index 948d546f46452e65644c19bf0f53cb85e940156b..bda59bf2913ed5b4d83eb5f68b8b34385fb9139b 100644 (file)
@@ -203,7 +203,7 @@ LY_DEFINE (ly_dir_p, "ly:dir?",
 {
   if (ly_c_number_p (s))
     {
-      int i = ly_scm2int (s);
+      int i = scm_to_int (s);
       return (i>= -1 && i <= 1)  ? SCM_BOOL_T : SCM_BOOL_F; 
     }
   return SCM_BOOL_F;
@@ -259,7 +259,7 @@ is_direction (SCM s)
 {
   if (ly_c_number_p (s))
     {
-      int i = ly_scm2int (s);
+      int i = scm_to_int (s);
       return i>= -1 && i <= 1; 
     }
   return false;
@@ -270,7 +270,7 @@ is_axis (SCM s)
 {
   if (ly_c_number_p (s))
     {
-      int i = ly_scm2int (s);
+      int i = scm_to_int (s);
       return i== 0 || i == 1;
     }
   return false;
@@ -279,11 +279,11 @@ is_axis (SCM s)
 Direction
 to_dir (SCM s)
 {
-  return scm_is_integer (s) ? (Direction) ly_scm2int (s) : CENTER;
+  return scm_is_integer (s) ? (Direction) scm_to_int (s) : CENTER;
 }
 
 Interval
-ly_scm2interval (SCM p)
+scm_to_interval (SCM p)
 {
   return Interval (ly_scm2double (ly_car (p)), ly_scm2double (ly_cdr (p)));
 }
@@ -361,7 +361,7 @@ LY_DEFINE (ly_number2string, "ly:number->string",
       sprintf (str, "%08.4f", r);
     }
   else
-    sprintf (str, "%d", ly_scm2int (s));
+    sprintf (str, "%d", scm_to_int (s));
 
   return scm_makfrom0str (str);
 }
@@ -710,7 +710,7 @@ int_list_to_slice (SCM l)
   s.set_empty ();
   for (; ly_c_pair_p (l); l = ly_cdr (l))
     if (ly_c_number_p (ly_car (l)))
-      s.add_point (ly_scm2int (ly_car (l))); 
+      s.add_point (scm_to_int (ly_car (l))); 
   return s;
 }
 
@@ -741,7 +741,7 @@ robust_scm2interval (SCM k, Drul_array<Real> v)
   i[LEFT]= v[LEFT];
   i[RIGHT]= v[RIGHT];
   if (is_number_pair (k))
-    i = ly_scm2interval (k);
+    i = scm_to_interval (k);
   return i;
 }
 
@@ -749,7 +749,7 @@ Drul_array<Real>
 robust_scm2drul (SCM k, Drul_array<Real> v)
 {
   if (is_number_pair (k))
-    v = ly_scm2interval (k);
+    v = scm_to_interval (k);
   return v;
 }
 
@@ -765,7 +765,7 @@ int
 robust_scm2int (SCM k, int o)
 {
   if (scm_integer_p (k) == SCM_BOOL_T)
-    o = ly_scm2int (k);
+    o = scm_to_int (k);
   return o;
 }
 
index ac2c14cdc39d11c7d16bb7fe93be624efca2e324..bb622cb97f2175b472d47814a001870aa06a56c2 100644 (file)
@@ -712,7 +712,7 @@ LY_DEFINE (ly_bracket ,"ly:bracket",
   SCM_ASSERT_TYPE (ly_c_number_p (p), a, SCM_ARG4, __FUNCTION__, "number") ;
 
 
-  return Lookup::bracket ((Axis)ly_scm2int (a), ly_scm2interval (iv),
+  return Lookup::bracket ((Axis)scm_to_int (a), scm_to_interval (iv),
                          ly_scm2double (t),
                          ly_scm2double (p),
                          0.95 * ly_scm2double (t)).smobbed_copy ();
@@ -732,7 +732,7 @@ LY_DEFINE (ly_filled_box ,"ly:round-filled-box",
   SCM_ASSERT_TYPE (is_number_pair (yext), yext, SCM_ARG2, __FUNCTION__, "number pair") ;
   SCM_ASSERT_TYPE (ly_c_number_p (blot), blot, SCM_ARG3, __FUNCTION__, "number") ;
 
-  return Lookup::round_filled_box (Box (ly_scm2interval (xext), ly_scm2interval (yext)),
+  return Lookup::round_filled_box (Box (scm_to_interval (xext), scm_to_interval (yext)),
                                   ly_scm2double (blot)).smobbed_copy ();
 }
 
index fc09cde8baa4c0b5d2c88fc5426172ba6a37b8d8..7adf61f5ea29d63a0b7116b4bf98829b01c6b36b 100644 (file)
@@ -119,7 +119,7 @@ Mark_engraver::process_music ()
          if (scm_integer_p (m) == SCM_BOOL_T
              && scm_exact_p (m) == SCM_BOOL_T)
            {
-             int mark_count = ly_scm2int (m);
+             int mark_count = scm_to_int (m);
              mark_count ++;
              context ()->set_property ("rehearsalMark",
                                            scm_int2num (mark_count));
index 3025e2621ac9dfe5b234116b13695b95855b7189..2ee9054c8138841ff05f8d2e1882f73819e0696f 100644 (file)
@@ -73,11 +73,11 @@ Measure_grouping_engraver::process_music ()
        
       Rational where (0);
       for (SCM s = grouping; ly_c_pair_p (s);
-          where += Rational (ly_scm2int (ly_car (s))) * bl,
+          where += Rational (scm_to_int (ly_car (s))) * bl,
           s = ly_cdr (s)
           )
        {
-         int grouplen = ly_scm2int (ly_car (s));
+         int grouplen = scm_to_int (ly_car (s));
          if (where == mp)
            {
              if (grouping_)
index 8252e5a5697b6db66550a7c7e008e25ce16d4847..518948ebe340f83e20034b2429ee0dfa4110622c 100644 (file)
@@ -357,7 +357,7 @@ Mensural_ligature_engraver::propagate_properties (Spanner *ligature,
   for (int i = 0; i < primitives.size (); i++)
     {
       Item *primitive = dynamic_cast<Item*> (primitives[i].grob_);
-      int output = ly_scm2int (primitive->get_property ("primitive"));
+      int output = scm_to_int (primitive->get_property ("primitive"));
       primitive->set_property ("thickness",
                                    scm_make_real (thickness));
       switch (output) {
@@ -423,7 +423,7 @@ Mensural_ligature_engraver::join_primitives (Array<Grob_info> primitives)
       if (i > 0)
         {
          Item *primitive = dynamic_cast<Item*> (info.grob_);
-         int output = ly_scm2int (primitive->get_property ("primitive"));
+         int output = scm_to_int (primitive->get_property ("primitive"));
          if (output & MLP_ANY)
            {
              int delta_pitch = (pitch.steps () - last_pitch.steps ());
index f3f8c704ae880a3c7b7e8f2d88cd8a11750bb611..25c0419997511b1c7fd3a744539d654e42725c84 100644 (file)
@@ -114,7 +114,7 @@ internal_brew_primitive (Grob *me)
     }
 
   Stencil out;
-  int primitive = ly_scm2int (primitive_scm);
+  int primitive = scm_to_int (primitive_scm);
   int delta_pitch = 0;
   Real thickness = 0.0;
   Real flexa_width = 0.0;
@@ -166,7 +166,7 @@ internal_brew_primitive (Grob *me)
   SCM join_left_scm = me->get_property ("join-left-amount");
   if (join_left_scm != SCM_EOL)
     {
-      int join_left = ly_scm2int (join_left_scm);
+      int join_left = scm_to_int (join_left_scm);
       if (!join_left)
        programming_error (_f ("Mensural_ligature: (join_left == 0)"));
       Real blotdiameter = (me->get_paper ()->get_dimension (ly_symbol2scm ("blotdiameter")));
index ab66dc789328f89542cbc3ce470a802a8438f653..a04209ad53815fbcf45931c6be99979ff8ea0bf7 100644 (file)
@@ -148,7 +148,7 @@ Midi_instrument::to_string () const
   SCM program = scm_call_1 (proc, ly_symbol2scm (audio_->str_.to_str0 ()));
   found = (program != SCM_BOOL_F);
   if (found)
-    program_byte = ly_scm2int (program);
+    program_byte = scm_to_int (program);
   else
       warning (_f ("no such MIDI instrument: `%s'", audio_->str_.to_str0 ()));
 
index e8c47c37e2dfa09dcd430a3d77e388f88390007d..a7d0e8ddb95d56ea9e05c2249d49d2ac62fceddc 100644 (file)
@@ -76,17 +76,17 @@ LY_DEFINE (ly_make_moment, "ly:make-moment",
   if (gn != SCM_UNDEFINED)
     {
       SCM_ASSERT_TYPE (scm_is_integer (gn), gn, SCM_ARG3, __FUNCTION__, "integer");
-      grace_num = ly_scm2int (gn);
+      grace_num = scm_to_int (gn);
     }
 
   int grace_den = 1;
   if (gd != SCM_UNDEFINED)
     {
       SCM_ASSERT_TYPE (scm_is_integer (gd), gd, SCM_ARG4, __FUNCTION__, "integer");
-      grace_den = ly_scm2int (gd);
+      grace_den = scm_to_int (gd);
     }
 
-  return Moment (Rational (ly_scm2int (n), ly_scm2int (d)),
+  return Moment (Rational (scm_to_int (n), scm_to_int (d)),
                 Rational (grace_num, grace_den)).smobbed_copy ();
 }
 
index 2b36fb408f40f8e1f999b422b00d65a2979fbcc8..7a3d1b06aeabcd44af5222a65c32f5f95ce62621 100644 (file)
@@ -130,7 +130,7 @@ Multi_measure_rest_engraver::process_music ()
        }
       
       start_measure_
-       = ly_scm2int (get_property ("currentBarNumber"));
+       = scm_to_int (get_property ("currentBarNumber"));
     }
 
   bar_seen_ = scm_is_string (get_property ("whichBar"));
@@ -209,7 +209,7 @@ Multi_measure_rest_engraver::start_translation_timestep ()
       last_rest_ = mmrest_;
       last_numbers_ = numbers_;
       
-      int cur = ly_scm2int (get_property ("currentBarNumber"));
+      int cur = scm_to_int (get_property ("currentBarNumber"));
       int num = cur - start_measure_;
 
       /*
@@ -234,7 +234,7 @@ Multi_measure_rest_engraver::start_translation_timestep ()
          SCM thres = get_property ("restNumberThreshold");
          int t = 1;
          if (ly_c_number_p (thres))
-           t = ly_scm2int (thres);
+           t = scm_to_int (thres);
       
          if (num <= t)
            last->suicide ();
index 40175ff12d856213d9a648bbde6bccddf68e9c6d..3de81b361eed25f797485f936ba3731dd24d8c0f 100644 (file)
@@ -104,7 +104,7 @@ Multi_measure_rest::print (SCM smob)
   SCM m (me->get_property ("measure-count"));
   if (ly_c_number_p (m))
     {
-      measures = ly_scm2int (m);
+      measures = scm_to_int (m);
     }
 
   mol.translate_axis (x_off, X_AXIS);
@@ -120,14 +120,14 @@ Multi_measure_rest::symbol_stencil (Grob *me, Real space)
   SCM m (me->get_property ("measure-count"));
   if (ly_c_number_p (m))
     {
-      measures = ly_scm2int (m);
+      measures = scm_to_int (m);
     }
   if (measures <= 0)
     return Stencil ();
   
 
   SCM limit = me->get_property ("expand-limit");
-  if (measures > ly_scm2int (limit))
+  if (measures > scm_to_int (limit))
     {
       Real padding = 0.15;  
       Stencil s =  big_rest (me, (1.0 - 2*padding) * space);
index e40c970a372574342580bf74b6d7376740a6de79..713f84fd02c2f2d5da2dea34fb84e487fa321142 100644 (file)
@@ -138,7 +138,7 @@ New_fingering_engraver::add_fingering (Grob * head,
   
   Side_position_interface::add_support (ft.script_, head);
 
-  int d = ly_scm2int (event->get_property ("digit"));
+  int d = scm_to_int (event->get_property ("digit"));
   
   /*
     TODO:
@@ -179,7 +179,7 @@ New_fingering_engraver::position_scripts ()
   */
   for (int i = 0; i < fingerings_.size (); i++)
     {      
-      fingerings_[i].position_ = ly_scm2int (fingerings_[i].head_ -> get_property ( "staff-position"));
+      fingerings_[i].position_ = scm_to_int (fingerings_[i].head_ -> get_property ( "staff-position"));
     }
 
   for (int i = fingerings_.size (); i--;)
index ff702b79daf9ddf3e6ac1f35e49a45dd3f62a1c0..51bf6d13ee13766a055e343ea577cbc2278fed79 100644 (file)
@@ -26,7 +26,7 @@ SCM
 Note_collision_interface::force_shift_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 == X_AXIS);
   
    me = me->get_parent (a);
@@ -401,7 +401,7 @@ Note_collision_interface::automatic_shift (Grob *me,
            = clashes[i]->get_property ("horizontal-shift");
 
          if (ly_c_number_p (sh))
-           shift.push (ly_scm2int (sh));
+           shift.push (scm_to_int (sh));
          else
            shift.push (0);
        }
index 75117699b422f16d6ccad086c2e15d8f7fc05485..a6b95da47cd255bd162bd2980bde8bc955aed437 100644 (file)
@@ -35,8 +35,8 @@ Note_column::shift_compare (Grob *const &p1, Grob *const&p2)
   SCM s1 = p1->get_property ("horizontal-shift");
   SCM s2 = p2->get_property ("horizontal-shift");
 
-  int h1 = (ly_c_number_p (s1))?  ly_scm2int (s1) :0;
-  int h2 = (ly_c_number_p (s2)) ? ly_scm2int (s2):0;
+  int h1 = (ly_c_number_p (s1))?  scm_to_int (s1) :0;
+  int h2 = (ly_c_number_p (s2)) ? scm_to_int (s2):0;
   return h1 - h2;
 }
 
index 08f52e2df69e3cd744b73731d1e34aa9ce1ead7d..ad57f9f1d86b5248a718e671f349a86f1cbe34ad 100644 (file)
@@ -97,7 +97,7 @@ Note_head::extent (SCM smob, SCM axis)
 {
   Grob *me = unsmob_grob (smob);
 
-  return ly_interval2scm (head_extent (me, (Axis) ly_scm2int (axis)));
+  return ly_interval2scm (head_extent (me, (Axis) scm_to_int (axis)));
 }
 
 MAKE_SCHEME_CALLBACK (Note_head,brew_ez_stencil,1);
@@ -189,7 +189,7 @@ int
 Note_head::get_balltype (Grob*me) 
 {
   SCM s = me->get_property ("duration-log");
-  return ly_c_number_p (s) ? ly_scm2int (s) <? 2 : 0;
+  return ly_c_number_p (s) ? scm_to_int (s) <? 2 : 0;
 }
 
 ADD_INTERFACE (Note_head,"note-head-interface",
index 7898b85ec39407dfe06f64f7af8f093214fc2edc..0ecf80fd88f5dd2078a01c53ac2244b2bfdbf21b 100644 (file)
@@ -83,7 +83,7 @@ Note_heads_engraver::process_music ()
       int pos = pit ? pit->steps () : 0;
       SCM c0 = get_property ("middleCPosition");
       if (ly_c_number_p (c0))
-       pos += ly_scm2int (c0);
+       pos += scm_to_int (c0);
 
       note->set_property ("staff-position",   scm_int2num (pos));
       notes_.push (note);
index ab2fc13f3db6e9ee33ac3f3b0cc6e84bc352bfd3..885296a3ecf759189d6bed7080ef9e259ebce97e 100644 (file)
@@ -81,7 +81,7 @@ LY_DEFINE (ly_paper_system_height, "ly:paper-system-extent",
   Paper_system *ps = unsmob_paper_system (system);
   SCM_ASSERT_TYPE (ps, system, SCM_ARG1, __FUNCTION__, "paper-system");
   SCM_ASSERT_TYPE (is_axis (axis), axis, SCM_ARG2, __FUNCTION__, "axis");
-  Axis ax = (Axis)ly_scm2int (axis);
+  Axis ax = (Axis)scm_to_int (axis);
   return ly_interval2scm (ps->to_stencil().extent (ax));
 }
 
index 77bf40143531341925760004d55fc59956fc1d70..5189f3247915697961a6f5a22e61fabbc8c59180 100644 (file)
@@ -49,7 +49,7 @@ internal_ly_parse_scm (Parse_start * ps)
      Shouldn't scm_read () do this for us?  */
   scm_fill_input (port);
   SCM to = scm_ftell (port);
-  ps->nchars = ly_scm2int (to) - ly_scm2int (from);
+  ps->nchars = scm_to_int (to) - scm_to_int (from);
 
   /* Don't close the port here; if we re-enter this function via a
      continuation, then the next time we enter it, we'll get an error.
index 6b00ad61fd91a1def43f2e009d777e32d243d130..df8b34a62c364f2c3fe641409906d61704208291 100644 (file)
@@ -783,7 +783,7 @@ output_def_body:
                        junk this ? there already is tempo stuff in
                        music.
                */
-               int m = ly_scm2int ($2->get_property ("metronome-count"));
+               int m = scm_to_int ($2->get_property ("metronome-count"));
                Duration *d = unsmob_duration ($2->get_property ("tempo-unit"));
                set_tempo ($$, d->get_length (), m);
                scm_gc_unprotect_object ($2->self_scm ());
@@ -1072,7 +1072,7 @@ Prefix_composite_music:
                fraction Music  
 
        {
-               int n = ly_scm2int (ly_car ($3)); int d = ly_scm2int (ly_cdr ($3));
+               int n = scm_to_int (ly_car ($3)); int d = scm_to_int (ly_cdr ($3));
                Music *mp = $4;
 
                $$= MY_MAKE_MUSIC ("TimeScaledMusic");
@@ -1481,7 +1481,7 @@ chord_body_element:
                }
                if (ly_c_number_p (check))
                {
-                       int q = ly_scm2int (check);
+                       int q = scm_to_int (check);
                        n->set_property ("absolute-octave", scm_int2num (q-1));
                }
 
@@ -2019,7 +2019,7 @@ multiplied_duration:
                $$ = unsmob_duration ($$)->compressed ( $3) .smobbed_copy ();
        }
        | multiplied_duration '*' FRACTION {
-               Rational  m (ly_scm2int (ly_car ($3)), ly_scm2int (ly_cdr ($3)));
+               Rational  m (scm_to_int (ly_car ($3)), scm_to_int (ly_cdr ($3)));
 
                $$ = unsmob_duration ($$)->compressed (m).smobbed_copy ();
        }
@@ -2090,7 +2090,7 @@ bass_figure:
                Music *m = unsmob_music ($1);
                if ($2) {
                        SCM salter = m->get_property ("alteration");
-                       int alter = ly_c_number_p (salter) ? ly_scm2int (salter) : 0;
+                       int alter = ly_c_number_p (salter) ? scm_to_int (salter) : 0;
                        m->set_property ("alteration",
                                scm_int2num (alter + $2));
                } else {
@@ -2155,7 +2155,7 @@ simple_element:
 
                if (ly_c_number_p ($4))
                {
-                       int q = ly_scm2int ($4);
+                       int q = scm_to_int ($4);
                        n->set_property ("absolute-octave", scm_int2num (q-1));
                }
 
@@ -2395,7 +2395,7 @@ bare_int:
        bare_number {
                if (scm_integer_p ($1) == SCM_BOOL_T)
                {
-                       int k = ly_scm2int ($1);
+                       int k = scm_to_int ($1);
                        $$ = k;
                } else
                {
index 4f1b17a5c1e3e3819853d3d25559248cfebbd4b3..5dc46f97e6770f3a68b687418dc08a0d88951656 100644 (file)
@@ -304,7 +304,7 @@ LY_DEFINE (ly_make_pitch, "ly:make-pitch",
   SCM_ASSERT_TYPE (scm_integer_p (note)== SCM_BOOL_T, note, SCM_ARG2, __FUNCTION__, "integer");
   SCM_ASSERT_TYPE (scm_integer_p (alter)== SCM_BOOL_T, alter, SCM_ARG3, __FUNCTION__, "integer");
 
-  Pitch p (ly_scm2int (octave), ly_scm2int (note), ly_scm2int (alter));
+  Pitch p (scm_to_int (octave), scm_to_int (note), scm_to_int (alter));
   return p.smobbed_copy ();
 }
 
index db95698b5babd91c04d5e0f9c03f4086cbf32eb5..9f3010b40750a38e008a464438bbc568a4713115 100644 (file)
@@ -116,7 +116,7 @@ Repeated_music::body_get_length () const
 int
 Repeated_music::repeat_count () const
 {
-  return ly_scm2int (get_property ("repeat-count"));
+  return scm_to_int (get_property ("repeat-count"));
 }
 
 
index 7b8bd39c395931d852eff3e509185ca80b41a16c..efbf31545c054d3d6069661239b89c029ca6c8f9 100644 (file)
@@ -25,7 +25,7 @@ SCM
 Rest_collision::force_shift_callback (SCM element_smob, SCM axis)
 {
   Grob *them = unsmob_grob (element_smob);
-  Axis a = (Axis) ly_scm2int (axis);
+  Axis a = (Axis) scm_to_int (axis);
   assert (a == Y_AXIS);
 
   if (Note_column::has_rests (them))
index 245da72e0038bcd58f60aad5a5d08e669c58a183..72e5020bbeab49d137e646ba3bf28f3629465aff 100644 (file)
@@ -87,7 +87,7 @@ Rest_engraver::process_music ()
          int pos= p->steps ();
          SCM c0 = get_property ("middleCPosition");
          if (ly_c_number_p (c0))
-           pos += ly_scm2int (c0);
+           pos += scm_to_int (c0);
          
          rest_->set_property ("staff-position", scm_int2num (pos));
        }
index 2ceffafb5a119a26a8ed4828f53dc4073bcde326..e1e7313dab2823a033ba8f201051c55e6f462a01 100644 (file)
@@ -21,7 +21,7 @@ SCM
 Rest::after_line_breaking (SCM smob)
 {
   Grob *me = unsmob_grob (smob);
-  int bt = ly_scm2int (me->get_property ("duration-log"));
+  int bt = scm_to_int (me->get_property ("duration-log"));
   int lc = Staff_symbol_referencer::line_count (me);
   Real ss = Staff_symbol_referencer::staff_space (me);
   if (lc % 2)
@@ -122,7 +122,7 @@ Rest::brew_internal_stencil (SCM smob, bool ledgered)
   if (!ly_c_number_p (balltype_scm))
     return Stencil ().smobbed_copy ();
 
-  int balltype = ly_scm2int (balltype_scm);
+  int balltype = scm_to_int (balltype_scm);
   
   String style; 
   SCM style_scm = me->get_property ("style");
@@ -150,7 +150,7 @@ MAKE_SCHEME_CALLBACK (Rest,extent_callback,2);
 SCM
 Rest::extent_callback (SCM smob, SCM ax)
 {
-  Axis a = (Axis) ly_scm2int (ax);
+  Axis a = (Axis) scm_to_int (ax);
 
   /*
     Don't want ledgers: ledgers depend on Y position, which depends on
index b76ee9229d60f4d3669c704b464f16b363f271ce..9fbe521e3b8c9399ce3fdac2ebb6c4c158d635b0 100644 (file)
@@ -32,7 +32,7 @@ int
 Rhythmic_head::dot_count (Grob*me) 
 {
   return get_dots (me)
-    ? ly_scm2int (get_dots (me)->get_property ("dot-count")) : 0;
+    ? scm_to_int (get_dots (me)->get_property ("dot-count")) : 0;
 }
 
 void
@@ -45,7 +45,7 @@ int
 Rhythmic_head::duration_log (Grob*me) 
 {
   SCM s = me->get_property ("duration-log");
-  return ly_c_number_p (s) ? ly_scm2int (s) : 0;
+  return ly_c_number_p (s) ? scm_to_int (s) : 0;
 }
 
 ADD_INTERFACE (Rhythmic_head,"rhythmic-head-interface",
index 32cff36a22d6ef3cc914ba48e1a618e02404ce89..fe9653ef1b4a2a5a48dd8959d30b66e95d185cc8 100644 (file)
@@ -111,7 +111,7 @@ LY_DEFINE (ly_set_option, "ly:set-option", 1, 1, 0, (SCM var, SCM val),
   else if (var == ly_symbol2scm ("midi-debug"))
     midi_debug_global_b = to_boolean (val);
   else if (var == ly_symbol2scm ("testing-level"))
-    testing_level_global = ly_scm2int (val);
+    testing_level_global = scm_to_int (val);
   else if (var == ly_symbol2scm ("parse-protect" ))
     parse_protect_global = to_boolean (val);
   else if (var == ly_symbol2scm ("internal-type-checking"))
index faddd44efc856788be3c4e57d099370d5e4179c5..bc30636663d5927b72a7298fe98038e514a3fa82 100644 (file)
@@ -33,7 +33,7 @@ LY_DEFINE (ly_grob_script_priority_less, "ly:grob-script-priority-less",
   SCM p1 = i1->get_property ("script-priority");
   SCM p2 = i2->get_property ("script-priority");
 
-  return ly_scm2int (p1) < ly_scm2int (p2) ? SCM_BOOL_T : SCM_BOOL_F;
+  return scm_to_int (p1) < scm_to_int (p2) ? SCM_BOOL_T : SCM_BOOL_F;
 }
 
 MAKE_SCHEME_CALLBACK (Script_column, before_line_breaking, 1);
index 88cca8b2e4d9ac52e991ffa2761f3f54b4122e9a..66fde4afc0fde5cd66cba1571ff9e251afef3fdc 100644 (file)
@@ -128,7 +128,7 @@ void make_script_from_event (Grob *p, bool * follow, Context *tg,
          /* Make sure they're in order of user input by adding index i.
             Don't use the direction in this priority. Smaller means closer
             to the head.  */
-         int prio  = ly_scm2int (val) +  index;
+         int prio  = scm_to_int (val) +  index;
          
         
          val = scm_int2num (prio);
index 2701772381ccea22eaeb8e739208316a0d7d0055..badd4899a9e0ea94d8e5bb049d2d4a5b249ed9e5 100644 (file)
@@ -15,7 +15,7 @@ SCM
 Self_alignment_interface::centered_on_parent (SCM element_smob, SCM axis)
 {
   Grob *me = unsmob_grob (element_smob);
-  Axis a = (Axis) ly_scm2int (axis);
+  Axis a = (Axis) scm_to_int (axis);
   Grob *him = me->get_parent (a);
   Interval he = him->extent (him, a);
   
@@ -27,7 +27,7 @@ SCM
 Self_alignment_interface::aligned_on_parent (SCM element_smob, SCM axis)
 {
   Grob *me = unsmob_grob (element_smob);
-  Axis a = (Axis) ly_scm2int (axis);
+  Axis a = (Axis) scm_to_int (axis);
   Grob *him = me->get_parent (a);
   Interval he = him->extent (him, a);
   
@@ -60,7 +60,7 @@ Self_alignment_interface::centered_on_other_axis_parent (SCM element_smob,
                                                         SCM axis)
 {
   Grob *me = unsmob_grob (element_smob);
-  Axis a = (Axis) ly_scm2int (axis);
+  Axis a = (Axis) scm_to_int (axis);
   Grob *him = me->get_parent (other_axis (a));
   Interval he = him->extent (him, a);
   
@@ -74,7 +74,7 @@ SCM
 Self_alignment_interface::aligned_on_self (SCM element_smob, SCM axis)
 {
   Grob *me = unsmob_grob (element_smob);
-  Axis a = (Axis) ly_scm2int (axis);
+  Axis a = (Axis) scm_to_int (axis);
 
   SCM sym= (a == X_AXIS) ? ly_symbol2scm ("self-alignment-X")
     : ly_symbol2scm ("self-alignment-Y");
index 4a308146e1c98ae6aff83b53283c847cab508475..0fc3075d459312b7070e3d496362293b5df43684 100644 (file)
@@ -77,7 +77,7 @@ Separation_item::width (Grob *me)
   SCM sw = me->get_property ("X-extent");
   if (is_number_pair (sw))
     {
-      return ly_scm2interval (sw);
+      return scm_to_interval (sw);
     }
 
   Item *item = dynamic_cast<Item*> (me);
index 6220a609f045129c22435fd54f49267244fb87b7..7c0596e98557311ffc92afb0b63a36b3095dabdb 100644 (file)
@@ -54,7 +54,7 @@ SCM
 Side_position_interface::aligned_on_support_extents (SCM element_smob, SCM axis)
 {
   Grob *me = unsmob_grob (element_smob);
-  Axis a = (Axis) ly_scm2int (axis);
+  Axis a = (Axis) scm_to_int (axis);
 
   return general_side_position (me, a, true);
 }
@@ -132,7 +132,7 @@ SCM
 Side_position_interface::aligned_on_support_refpoints (SCM smob, SCM axis)
 {
   Grob *me = unsmob_grob (smob);
-  Axis a = (Axis) ly_scm2int (axis);
+  Axis a = (Axis) scm_to_int (axis);
 
   return general_side_position (me, a, false); 
 }
@@ -197,7 +197,7 @@ SCM
 Side_position_interface::aligned_side (SCM element_smob, SCM axis)
 {
   Grob *me = unsmob_grob (element_smob);
-  Axis a = (Axis) ly_scm2int (axis);
+  Axis a = (Axis) scm_to_int (axis);
   
   Direction d = Side_position_interface::get_direction (me);
   
index d0ae6ba9160a1ad7c0349bf1ce682fa90e82c01a..2223b372bbfb09a2f0d4cededa4e15d8328e070a 100644 (file)
@@ -489,7 +489,7 @@ set_end_points (Grob *me)
                  ->lookup_variable (ly_symbol2scm ("debug-slur-quanting")))
       && ly_c_pair_p (inspect_quants))
     {
-      Drul_array<Real> ins = ly_scm2interval (inspect_quants);
+      Drul_array<Real> ins = scm_to_interval (inspect_quants);
       Real mindist = 1e6;
       for (int i = 0; i < scores.size (); i ++)
        {
@@ -957,7 +957,7 @@ score_extra_encompass (Grob *me, Grob *common[],
                  && scm_ilength (accs) == 1)
                {
                  /* End copy accidental.cc */
-                 switch (ly_scm2int (ly_car (accs)))
+                 switch (scm_to_int (ly_car (accs)))
                    {
                    case FLAT:
                    case DOUBLE_FLAT:
index 623a2397147435f5cb764e877d648eaab9b37ca7..af479083e9cf5765c2ce9a1e832e7a6e1b384c22 100644 (file)
@@ -34,7 +34,7 @@ MAKE_SCHEME_CALLBACK (Slur, height, 2);
 SCM
 Slur::height (SCM smob, SCM ax)
 {
-  Axis a = (Axis)ly_scm2int (ax);
+  Axis a = (Axis)scm_to_int (ax);
   Grob *me = unsmob_grob (smob);
   assert (a == Y_AXIS);
 
@@ -131,7 +131,7 @@ SCM
 Slur::outside_slur_callback (SCM grob, SCM axis)
 {
   Grob *script = unsmob_grob (grob);
-  Axis a = Axis (ly_scm2int (axis));
+  Axis a = Axis (scm_to_int (axis));
   assert (a == Y_AXIS);
 
   Grob *slur = unsmob_grob (script->get_property ("slur"));
index 97c757c82bd7d4b00e81f4994fe6cd18e408e480..7bd2df59c7529058d8e33f99cdc9f25434149b19 100644 (file)
@@ -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"));
 
@@ -146,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));
 
@@ -218,7 +218,7 @@ Span_bar::evaluate_glyph (Grob*me)
 Interval
 Span_bar::get_spanned_interval (Grob*me) 
 {
-  return ly_scm2interval (Axis_group_interface::group_extent_callback
+  return scm_to_interval (Axis_group_interface::group_extent_callback
                          (me->self_scm (), scm_int2num (Y_AXIS))); 
 }
 
index 34941c84b6a65787a3d5e4c3cef76b415f9a2598..7a74c25bbf3c3193ccc5e55fd025c7d6e906bcd9 100644 (file)
@@ -98,7 +98,7 @@ Staff_symbol::line_count (Grob*me)
 {
   SCM c = me->get_property ("line-count");
   if (ly_c_number_p (c))
-    return ly_scm2int (c);
+    return scm_to_int (c);
   else
     return 0;
 }
index c6bcb46c78f21ad288346b2fd15c8fda8ef31202..a8d7773f11ca336b41f9c1c7123c1200462da4f9 100644 (file)
@@ -69,12 +69,12 @@ Stem_engraver::make_stem (Grob_info gi)
 
         the first and last (quarter) note bothe get one tremolo flag.  */
       int requested_type
-       = ly_scm2int (tremolo_ev_->get_property ("tremolo-type"));
+       = scm_to_int (tremolo_ev_->get_property ("tremolo-type"));
       SCM f = get_property ("tremoloFlags");
       if (!requested_type)
        {
          if (ly_c_number_p (f))
-           requested_type = ly_scm2int (f);
+           requested_type = scm_to_int (f);
          else
            requested_type = 8;
        }
@@ -141,13 +141,13 @@ Stem_engraver::stop_translation_timestep ()
       SCM prop = get_property ("stemLeftBeamCount");
       if (ly_c_number_p (prop))
        {
-         Stem::set_beaming (stem_,ly_scm2int (prop),LEFT);
+         Stem::set_beaming (stem_,scm_to_int (prop),LEFT);
          context ()->unset_property (ly_symbol2scm ("stemLeftBeamCount"));
        }
       prop = get_property ("stemRightBeamCount");
       if (ly_c_number_p (prop))
        {
-         Stem::set_beaming (stem_,ly_scm2int (prop), RIGHT);
+         Stem::set_beaming (stem_,scm_to_int (prop), RIGHT);
          context ()->unset_property (ly_symbol2scm ("stemRightBeamCount"));
        }
       stem_ = 0;
index 0a64888da40144deb80be724deb2dc883dc17c04..008bd90094d46c4e40ff3929ef7fecfb22249534 100644 (file)
@@ -36,7 +36,7 @@ MAKE_SCHEME_CALLBACK (Stem_tremolo, height, 2);
 SCM
 Stem_tremolo::height (SCM smob, SCM ax)
 {
-  Axis a = (Axis)ly_scm2int (ax);
+  Axis a = (Axis)scm_to_int (ax);
   Grob *me = unsmob_grob (smob);
   assert (a == Y_AXIS);
 
@@ -83,7 +83,7 @@ Stem_tremolo::raw_stencil (Grob *me)
   int tremolo_flags = 0;
   SCM s = me->get_property ("flag-count");
   if (ly_c_number_p (s))
-    tremolo_flags = ly_scm2int (s);
+    tremolo_flags = scm_to_int (s);
 
   if (!tremolo_flags)
     {
index 7b547f0cda3c12036f1f3c70c0a5f0a1d36e69b3..966d036151cd5e7a33fa597fff1da2261df1c06e 100644 (file)
@@ -240,7 +240,7 @@ bool
 Stem::is_invisible (Grob *me)
 {
   return !(head_count (me)
-          && ly_scm2int (me->get_property ("duration-log")) >= 1);
+          && scm_to_int (me->get_property ("duration-log")) >= 1);
 }
 
 Direction
@@ -380,7 +380,7 @@ int
 Stem::duration_log (Grob *me)
 {
   SCM s = me->get_property ("duration-log");
-  return (ly_c_number_p (s)) ? ly_scm2int (s) : 2;
+  return (ly_c_number_p (s)) ? scm_to_int (s) : 2;
 }
 
 void
@@ -495,7 +495,7 @@ MAKE_SCHEME_CALLBACK (Stem, height, 2);
 SCM
 Stem::height (SCM smob, SCM ax)
 {
-  Axis a = (Axis)ly_scm2int (ax);
+  Axis a = (Axis)scm_to_int (ax);
   Grob *me = unsmob_grob (smob);
   assert (a == Y_AXIS);
 
@@ -596,7 +596,7 @@ MAKE_SCHEME_CALLBACK (Stem,dim_callback,2);
 SCM
 Stem::dim_callback (SCM e, SCM ax)
 {
-  Axis a = (Axis) ly_scm2int (ax);
+  Axis a = (Axis) scm_to_int (ax);
   assert (a == X_AXIS);
   Grob *me = unsmob_grob (e);
 
index 0848c1afc3eac93e5161ff5ca7f60b576610d1c8..4a34f130258627c824227627c7bcd667491b8d43 100644 (file)
@@ -27,8 +27,8 @@ LY_DEFINE (ly_stencil_set_extent_x, "ly:stencil-set-extent!",
   SCM_ASSERT_TYPE (is_number_pair (np), np, SCM_ARG3, __FUNCTION__,
                   "number pair");
 
-  Interval iv = ly_scm2interval (np);
-  s->dim_[Axis (ly_scm2int (axis))] = iv;
+  Interval iv = scm_to_interval (np);
+  s->dim_[Axis (scm_to_int (axis))] = iv;
 
   return SCM_UNSPECIFIED;
 }
@@ -44,7 +44,7 @@ LY_DEFINE (ly_translate_stencil_axis, "ly:stencil-translate-axis",
 
   SCM new_s = s->smobbed_copy ();
   Stencil *q = unsmob_stencil (new_s);
-  q->translate_axis (ly_scm2double (amount), Axis (ly_scm2int (axis)));
+  q->translate_axis (ly_scm2double (amount), Axis (scm_to_int (axis)));
   return new_s;
 
 }
@@ -83,7 +83,7 @@ LY_DEFINE (ly_stencil_get_extent, "ly:stencil-extent",
   SCM_ASSERT_TYPE (s, stil, SCM_ARG1, __FUNCTION__, "stencil");
   SCM_ASSERT_TYPE (is_axis (axis), axis, SCM_ARG2, __FUNCTION__, "axis");
 
-  return ly_interval2scm (s->extent (Axis (ly_scm2int (axis))));
+  return ly_interval2scm (s->extent (Axis (scm_to_int (axis))));
 }
 
 LY_DEFINE (ly_stencil_moved_to_edge, "ly:stencil-moved-to-edge",
@@ -119,8 +119,8 @@ LY_DEFINE (ly_stencil_moved_to_edge, "ly:stencil-moved-to-edge",
     first_stencil = *s1;
 
   if (s2)
-    return first_stencil.moved_to_edge (Axis (ly_scm2int (axis)),
-                                       Direction (ly_scm2int (direction)),
+    return first_stencil.moved_to_edge (Axis (scm_to_int (axis)),
+                                       Direction (scm_to_int (direction)),
                                        *s2, p, m).smobbed_copy ();
   else
     return Stencil().smobbed_copy ();
@@ -169,8 +169,8 @@ LY_DEFINE (ly_stencil_combine_at_edge, "ly:stencil-combine-at-edge",
     result = *s1;
   
   if (s2)
-    result.add_at_edge (Axis (ly_scm2int (axis)),
-                       Direction (ly_scm2int (direction)), *s2, p, m);
+    result.add_at_edge (Axis (scm_to_int (axis)),
+                       Direction (scm_to_int (direction)), *s2, p, m);
 
   return result.smobbed_copy ();
 }
@@ -210,7 +210,7 @@ LY_DEFINE (ly_make_stencil, "ly:make-stencil",
   SCM_ASSERT_TYPE (is_number_pair (xext), xext, SCM_ARG2, __FUNCTION__, "number pair");
   SCM_ASSERT_TYPE (is_number_pair (yext), yext, SCM_ARG3, __FUNCTION__, "number pair");
 
-  Box b (ly_scm2interval (xext), ly_scm2interval (yext));
+  Box b (scm_to_interval (xext), scm_to_interval (yext));
   Stencil s (b, expr);
   return s.smobbed_copy ();
 }
@@ -226,7 +226,7 @@ LY_DEFINE (ly_stencil_align_to_x, "ly:stencil-align-to!",
   SCM_ASSERT_TYPE (is_axis (axis), axis, SCM_ARG2, __FUNCTION__, "axis");
   SCM_ASSERT_TYPE (ly_c_number_p (dir), dir, SCM_ARG3, __FUNCTION__, "number");
 
-  unsmob_stencil (stil)->align_to ((Axis)ly_scm2int (axis),
+  unsmob_stencil (stil)->align_to ((Axis)scm_to_int (axis),
                                   ly_scm2double (dir));
   return stil;
 }
index e4caf6835b14949d4710600a96262c9100253bc8..3ca95596181adcdf88e4a552b65184df0c79f8bc 100644 (file)
@@ -100,7 +100,7 @@ Tab_note_heads_engraver::process_music ()
       bool string_found;
       if (tabstring_event)
        {
-         tab_string = ly_scm2int (tabstring_event->get_property ("string-number"));
+         tab_string = scm_to_int (tabstring_event->get_property ("string-number"));
          string_found = true;
        }
       else
@@ -119,7 +119,7 @@ Tab_note_heads_engraver::process_music ()
          Rhythmic_head::set_dots (note, d);
          
          if (dur.dot_count ()
-             != ly_scm2int (d->get_property ("dot-count")))
+             != scm_to_int (d->get_property ("dot-count")))
            d->set_property ("dot-count", scm_int2num (dur.dot_count ()));
 
          d->set_parent (note, Y_AXIS);
@@ -131,12 +131,12 @@ Tab_note_heads_engraver::process_music ()
       SCM scm_pitch = event->get_property ("pitch");
       SCM proc      = get_property ("tablatureFormat");
       SCM min_fret_scm = get_property ("minimumFret");
-      int min_fret = ly_c_number_p (min_fret_scm) ? ly_scm2int (min_fret_scm) : 0;
+      int min_fret = ly_c_number_p (min_fret_scm) ? scm_to_int (min_fret_scm) : 0;
 
       while (!string_found)
        {
          int fret = unsmob_pitch (scm_pitch)->semitone_pitch ()
-           - ly_scm2int (scm_list_ref (stringTunings,scm_int2num (tab_string-1)));
+           - scm_to_int (scm_list_ref (stringTunings,scm_int2num (tab_string-1)));
          if (fret<min_fret)
            tab_string += high_string_one ? 1 : -1;
          else
index 2e5406bbed34d7ac2e956509692fb54fb30cf5c2..6fad4e0ce43d4ed35654738a82696f82801f24d0 100644 (file)
@@ -47,7 +47,7 @@ Tempo_performer::create_audio_elements ()
       SCM met = tempo_req_->get_property ("metronome-count");
       Duration *d = unsmob_duration (tempo_req_->get_property ("tempo-unit"));
       
-      Rational r =  (d->get_length () / Moment (Rational (1, 4)) * Moment (ly_scm2int (met))).main_part_;
+      Rational r =  (d->get_length () / Moment (Rational (1, 4)) * Moment (scm_to_int (met))).main_part_;
       
       audio_ = new Audio_tempo (int (r));
 
index af6e4c5869aac5d2d54e9a4e9165eb2d3427bbf9..05c8c0ff2477d0840037e3e99e180b582e555a48 100644 (file)
@@ -94,7 +94,7 @@ Text_engraver::process_acknowledged_grobs ()
       int priority = 200;
       SCM s = text->get_property ("script-priority");
       if (ly_c_number_p (s))
-       priority = ly_scm2int (s);
+       priority = scm_to_int (s);
       
       /* see script-engraver.cc */
       priority += i;
index 60c9a63411d1671618ce9be588a97ff06ae62f4b..d41d0bb0c4c48a4922d095317e9db0792b54bf40 100644 (file)
@@ -46,7 +46,7 @@ Time_signature_engraver::process_music ()
       && last_time_fraction_ != fr
       && ly_c_pair_p (fr))
     {
-      int den = ly_scm2int (ly_cdr (fr));
+      int den = scm_to_int (ly_cdr (fr));
       if (den != (1 << intlog2 (den)))
        {
          /*
@@ -56,7 +56,7 @@ Time_signature_engraver::process_music ()
           */
          warning (_f ("Found strange time signature %d/%d.",
                      den,
-                     ly_scm2int (ly_car (fr))
+                     scm_to_int (ly_car (fr))
                      ));
        }
   
index 3d3e26d3273a93a44685fa820245295bf5a3a76e..30627f2b3c5230772f128b6b33b3a49bfeb0d194 100644 (file)
@@ -47,8 +47,8 @@ Time_signature_performer::create_audio_elements ()
   if (ly_c_pair_p (fr) && !ly_c_equal_p (fr, prev_fraction_))
     {
       prev_fraction_ = fr;
-      int b = ly_scm2int (ly_car (fr));
-      int o = ly_scm2int (ly_cdr (fr));
+      int b = scm_to_int (ly_car (fr));
+      int o = scm_to_int (ly_cdr (fr));
       
       audio_ = new Audio_time_signature (b,o);
       Audio_element_info info (audio_, 0);
index 56f191d887422181d500309c9f3964178d9cde64..f4324653fe67f008415e017775dff01ab883010d 100644 (file)
@@ -36,8 +36,8 @@ Time_signature::print (SCM smob)
   int d = 4;
   if (ly_c_pair_p (frac))
     {
-      n = ly_scm2int (ly_car (frac));
-      d = ly_scm2int (ly_cdr (frac));
+      n = scm_to_int (ly_car (frac));
+      d = scm_to_int (ly_cdr (frac));
     }
 
   Stencil m;
index 24d2c3c377d397e4ff13f5a4f24d15fcb4551ff1..965885bd255b21bde74be31834cebf28cc9c9bfb 100644 (file)
@@ -135,7 +135,7 @@ Timing_translator::start_translation_timestep ()
   int b = 0;
   if (ly_c_number_p (barn))
     {
-      b = ly_scm2int (barn);
+      b = scm_to_int (barn);
     }
 
   SCM cad = get_property ("timing");
index 0dd91b2352428af70e9e4a4a3bd7cf5f1ab85694..4f7a4e3cd6116cea05261c86c2195e46cfcb894f 100644 (file)
@@ -30,7 +30,7 @@ Unfolded_repeat_iterator::get_music_list () const
   SCM body = get_music ()->get_property ("element");
   SCM alts = get_music ()->get_property ("elements");
   int alt_count = scm_ilength (alts);
-  int rep_count = ly_scm2int (get_music ()->get_property ("repeat-count"));
+  int rep_count = scm_to_int (get_music ()->get_property ("repeat-count"));
 
   for (int i = 0; i < rep_count; i++)
     {
@@ -93,7 +93,7 @@ Volta_repeat_iterator::construct_children ()
   SCM alts = get_music ()->get_property ("elements");
 
   alt_count_ = scm_ilength (alts);
-  rep_count_ = ly_scm2int (get_music ()->get_property ("repeat-count"));
+  rep_count_ = scm_to_int (get_music ()->get_property ("repeat-count"));
   done_count_ = 0;
 }
 
index 94cccf6f08bdfa9f983b1a62d0420a2091fda9c4..c9ecc2b0d52725bb03838910bcb7eb8b0024db23 100644 (file)
@@ -176,9 +176,9 @@ Vaticana_ligature_engraver::align_heads (Array<Grob_info> primitives,
     {
       Item *primitive = dynamic_cast<Item*> (primitives[i].grob_);
       int prefix_set =
-       ly_scm2int (primitive->get_property ("prefix-set"));
+       scm_to_int (primitive->get_property ("prefix-set"));
       int context_info =
-       ly_scm2int (primitive->get_property ("context-info"));
+       scm_to_int (primitive->get_property ("context-info"));
 
       /*
        * Get glyph_name, delta_pitch and context_info for this head.
@@ -200,7 +200,7 @@ Vaticana_ligature_engraver::align_heads (Array<Grob_info> primitives,
          SCM delta_pitch_scm = prev_primitive->get_property ("delta-pitch");
          if (delta_pitch_scm != SCM_EOL)
            {
-             delta_pitch = ly_scm2int (delta_pitch_scm);
+             delta_pitch = scm_to_int (delta_pitch_scm);
            }
          else
            {
@@ -335,7 +335,7 @@ void
 check_for_prefix_loss (Item *primitive)
 {
   int prefix_set =
-    ly_scm2int (primitive->get_property ("prefix-set"));
+    scm_to_int (primitive->get_property ("prefix-set"));
   if (prefix_set & ~PES_OR_FLEXA)
     {
       String prefs = Gregorian_ligature::prefixes_to_str (primitive);
@@ -365,7 +365,7 @@ Vaticana_ligature_engraver::transform_heads (Spanner *ligature,
     SCM delta_pitch_scm = primitive->get_property ("delta-pitch");
     if (delta_pitch_scm != SCM_EOL)
       {
-       delta_pitch = ly_scm2int (delta_pitch_scm);
+       delta_pitch = scm_to_int (delta_pitch_scm);
       }
     else
       {
@@ -377,9 +377,9 @@ Vaticana_ligature_engraver::transform_heads (Spanner *ligature,
 
     /* retrieve & complete prefix_set and context_info */
     int prefix_set =
-      ly_scm2int (primitive->get_property ("prefix-set"));
+      scm_to_int (primitive->get_property ("prefix-set"));
     int context_info =
-      ly_scm2int (primitive->get_property ("context-info"));
+      scm_to_int (primitive->get_property ("context-info"));
     if (is_stacked_head (prefix_set, context_info))
       {
        context_info |= STACKED_HEAD;
index a298e95c973929b6003f8823ee9f59488b6895bc..3c0d309964b224b7517717820bf7f54edc2aaa36 100644 (file)
@@ -78,7 +78,7 @@ vaticana_brew_flexa (Grob *me,
   SCM flexa_height_scm = me->get_property ("flexa-height");
   if (flexa_height_scm != SCM_EOL)
     {
-      interval = ly_scm2int (flexa_height_scm);
+      interval = scm_to_int (flexa_height_scm);
     }
   else
     {
@@ -217,7 +217,7 @@ vaticana_brew_primitive (Grob *me)
   SCM delta_pitch_scm = me->get_property ("delta-pitch");
   int delta_pitch;
   if (delta_pitch_scm != SCM_EOL)
-    delta_pitch = ly_scm2int (delta_pitch_scm);
+    delta_pitch = scm_to_int (delta_pitch_scm);
   else
     delta_pitch = 0;