]> git.donarmstrong.com Git - lilypond.git/commitdiff
* lily/include/lily-guile.hh: many new ly_ functions. Thanks to
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Wed, 7 Apr 2004 13:40:32 +0000 (13:40 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Wed, 7 Apr 2004 13:40:32 +0000 (13:40 +0000)
Michael Welsh Duggan

* lily/*.cc: deprecate gh_ interface. Thanks to Michael Welsh Duggan

* lily/scaled-font-metric.cc (derived_mark): idem.

* lily/scaled-font-metric.cc (derived_mark): is a const method.
(Modified_font_metric): make alist for coding_description_
(LY_DEFINE): remove coding-name.

* lily/scaled-font-metric.cc (ly_font_encoding): return vector

* lily/my-lily-lexer.cc (set_identifier): remove gh_scm2newstr
use.

203 files changed:
ChangeLog
THANKS
VERSION
lily/accidental-engraver.cc
lily/accidental-placement.cc
lily/accidental.cc
lily/align-interface.cc
lily/all-font-metrics.cc
lily/ambitus.cc
lily/arpeggio.cc
lily/auto-beam-engraver.cc
lily/auto-change-iterator.cc
lily/axis-group-interface.cc
lily/balloon.cc
lily/bar-engraver.cc
lily/bar-line.cc
lily/bar-number-engraver.cc
lily/beam-quanting.cc
lily/beam.cc
lily/break-align-engraver.cc
lily/break-align-interface.cc
lily/break-substitution.cc
lily/breathing-sign.cc
lily/chord-name-engraver.cc
lily/chord-tremolo-engraver.cc
lily/clef-engraver.cc
lily/clef.cc
lily/cluster-engraver.cc
lily/cluster.cc
lily/coherent-ligature-engraver.cc
lily/completion-note-heads-engraver.cc
lily/context-def.cc
lily/context-scheme.cc
lily/context-specced-music-iterator.cc
lily/context.cc
lily/custos-engraver.cc
lily/custos.cc
lily/directional-element-interface.cc
lily/dot-column.cc
lily/dots.cc
lily/drum-note-engraver.cc
lily/drum-note-performer.cc
lily/duration.cc
lily/dynamic-engraver.cc
lily/dynamic-performer.cc
lily/engraver-group-engraver.cc
lily/event-chord-iterator.cc
lily/event.cc
lily/extender-engraver.cc
lily/figured-bass-engraver.cc
lily/fingering-engraver.cc
lily/font-metric.cc
lily/font-select.cc
lily/font-size-engraver.cc
lily/forbid-break-engraver.cc
lily/function-documentation.cc
lily/global-context.cc
lily/gourlay-breaking.cc
lily/gregorian-ligature-engraver.cc
lily/gregorian-ligature.cc
lily/grob-interface.cc
lily/grob-pq-engraver.cc
lily/grob-property.cc
lily/grob-scheme.cc
lily/grob.cc
lily/hairpin.cc
lily/hara-kiri-group-spanner.cc
lily/hyphen-engraver.cc
lily/include/group-interface.hh
lily/include/lily-guile.hh
lily/include/ly-smobs.icc
lily/input-file-results.cc
lily/input-smob.cc
lily/instrument-name-engraver.cc
lily/item.cc
lily/key-engraver.cc
lily/key-performer.cc
lily/key-signature-interface.cc
lily/kpath.cc
lily/lexer.ll
lily/lily-guile.cc
lily/line-interface.cc
lily/line-spanner.cc
lily/lookup.cc
lily/ly-module.cc
lily/lyric-combine-music-iterator.cc
lily/lyric-combine-music.cc
lily/lyric-engraver.cc
lily/lyric-performer.cc
lily/main.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/music-iterator.cc
lily/music-output-def.cc
lily/music-sequence.cc
lily/music.cc
lily/my-lily-lexer.cc
lily/my-lily-parser.cc
lily/new-fingering-engraver.cc
lily/new-lyric-combine-music-iterator.cc
lily/note-collision.cc
lily/note-column.cc
lily/note-head.cc
lily/note-heads-engraver.cc
lily/note-spacing.cc
lily/ottava-bracket.cc
lily/ottava-engraver.cc
lily/output-property-engraver.cc
lily/paper-book.cc
lily/paper-column.cc
lily/paper-def.cc
lily/paper-line.cc
lily/paper-outputter.cc
lily/paper-score.cc
lily/parse-scm.cc
lily/parser.yy
lily/part-combine-iterator.cc
lily/performer-group-performer.cc
lily/phrasing-slur-engraver.cc
lily/piano-pedal-engraver.cc
lily/piano-pedal-performer.cc
lily/pitch-squash-engraver.cc
lily/pitch.cc
lily/property-iterator.cc
lily/quote-iterator.cc
lily/recording-group-engraver.cc
lily/repeat-acknowledge-engraver.cc
lily/repeated-music.cc
lily/rest-collision.cc
lily/rest-engraver.cc
lily/rest.cc
lily/rhythmic-column-engraver.cc
lily/rhythmic-head.cc
lily/scaled-font-metric.cc
lily/scm-hash.cc
lily/scm-option.cc
lily/score-engraver.cc
lily/score.cc
lily/script-column.cc
lily/script-engraver.cc
lily/script.cc
lily/self-aligment-interface.cc
lily/separating-group-spanner.cc
lily/separating-line-group-engraver.cc
lily/separation-item.cc
lily/sequential-iterator.cc
lily/side-position-interface.cc
lily/simple-spacer.cc
lily/simultaneous-music-iterator.cc
lily/slur-bezier-bow.cc
lily/slur-engraver.cc
lily/slur.cc
lily/spaceable-grob.cc
lily/spacing-spanner.cc
lily/span-arpeggio-engraver.cc
lily/span-bar-engraver.cc
lily/span-bar.cc
lily/staff-collecting-engraver.cc
lily/staff-performer.cc
lily/staff-spacing.cc
lily/staff-symbol-engraver.cc
lily/staff-symbol-referencer.cc
lily/staff-symbol.cc
lily/stanza-number-engraver.cc
lily/stem-engraver.cc
lily/stem-tremolo.cc
lily/stem.cc
lily/stencil-scheme.cc
lily/sustain-pedal.cc
lily/system-start-delimiter-engraver.cc
lily/system-start-delimiter.cc
lily/system.cc
lily/tab-note-heads-engraver.cc
lily/tempo-performer.cc
lily/text-engraver.cc
lily/text-item.cc
lily/text-spanner.cc
lily/tfm.cc
lily/tie-engraver.cc
lily/tie-performer.cc
lily/tie.cc
lily/time-signature-engraver.cc
lily/time-signature-performer.cc
lily/time-signature.cc
lily/timing-engraver.cc
lily/timing-translator.cc
lily/translator-ctors.cc
lily/translator-group.cc
lily/translator-property.cc
lily/tuplet-bracket.cc
lily/tuplet-engraver.cc
lily/unfolded-repeat-iterator.cc
lily/vaticana-ligature-engraver.cc
lily/vaticana-ligature.cc
lily/virtual-font-metric.cc
lily/volta-bracket.cc
lily/volta-engraver.cc

index dd6880b79d46a42525f7ec72e4321aadebca02d8..9acfedf5cd766fa39fb68e2a384fe0662228c199 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2004-04-07  Han-Wen Nienhuys   <hanwen@xs4all.nl>
 
+       * lily/include/lily-guile.hh: many new ly_ functions.  Thanks to
+       Michael Welsh Duggan
+
+       * lily/*.cc: deprecate gh_ interface. Thanks to Michael Welsh Duggan
+
        * ly/nederlands.ly: add comment about digits.
 
        * lily/scaled-font-metric.cc (derived_mark): idem.
diff --git a/THANKS b/THANKS
index 4b312c610fd779768d20510d964b230f7864f981..775d497ce0e9d386c4254884faeccf5a214d3ef8 100644 (file)
--- a/THANKS
+++ b/THANKS
@@ -11,11 +11,12 @@ Jan Nieuwenhuizen
 
 CONTRIBUTORS
 
+Michael Welsh Duggan
+
 
 BUG HUNTERS/SUGGESTIONS
 
 Stephen Pollei
-Michael Welsh Duggan
 
 Release 2.2
 ***********
diff --git a/VERSION b/VERSION
index b6bb35054f9b14b6d9fe1b4f144edf74ecf4fcbf..fa87e2c549e6bf3b45eb135d2448c214cece6482 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -2,5 +2,5 @@ PACKAGE_NAME=LilyPond
 MAJOR_VERSION=2
 MINOR_VERSION=3
 PATCH_LEVEL=0
-MY_PATCH_LEVEL=
+MY_PATCH_LEVEL=mwd
 
index 022b2fe1f8d2b05261d72e9955d19dc15f64e7fa..2d57f9fbf99e84c593b51612e71cb3aac8f9f0c2 100644 (file)
@@ -73,7 +73,7 @@ static void
 set_property_on_children (Context * trans, const char * sym, SCM val)
 {
   trans->set_property (sym, val);
-  for (SCM p = trans->context_list_; gh_pair_p (p); p = ly_cdr (p))
+  for (SCM p = trans->context_list_; ly_pair_p (p); p = ly_cdr (p))
     {
       Context *trg =  unsmob_context (ly_car (p));
       set_property_on_children (trg, sym, ly_deep_copy (val));
@@ -117,34 +117,34 @@ number_accidentals_from_sig (bool *different,
   int n = pitch->get_notename ();
   int o = pitch->get_octave ();
   int a = pitch->get_alteration ();
-  int curbarnum_i = gh_scm2int (curbarnum);
+  int curbarnum_i = ly_scm2int (curbarnum);
   int accbarnum_i = 0;
 
   SCM prev;
   if (ignore_octave)
     prev = ly_assoc_cdr (scm_int2num (n), sig);
   else
-    prev = scm_assoc (gh_cons (scm_int2num (o), scm_int2num (n)), sig);
+    prev = scm_assoc (scm_cons (scm_int2num (o), scm_int2num (n)), sig);
 
   /* should really be true unless prev == SCM_BOOL_F */
-  if (gh_pair_p (prev) && gh_pair_p (ly_cdr (prev)))
+  if (ly_pair_p (prev) && ly_pair_p (ly_cdr (prev)))
     {
-      accbarnum_i = gh_scm2int (ly_cddr (prev));
-      prev = gh_cons (ly_car (prev), ly_cadr (prev));
+      accbarnum_i = ly_scm2int (ly_cddr (prev));
+      prev = scm_cons (ly_car (prev), ly_cadr (prev));
     }
   
   /* If an accidental was not found or the accidental was too old */
   if (prev == SCM_BOOL_F ||
-      (gh_number_p (lazyness) && curbarnum_i > accbarnum_i + gh_scm2int (lazyness)))
+      (ly_number_p (lazyness) && curbarnum_i > accbarnum_i + ly_scm2int (lazyness)))
     prev = scm_assoc (scm_int2num (n), sig);
 
 
   SCM prev_acc = (prev == SCM_BOOL_F) ? scm_int2num (0) : ly_cdr (prev);
 
-  int p = gh_number_p (prev_acc) ? gh_scm2int (prev_acc) : 0;
+  int p = ly_number_p (prev_acc) ? ly_scm2int (prev_acc) : 0;
 
   int num;
-  if (a == p && gh_number_p (prev_acc))
+  if (a == p && ly_number_p (prev_acc))
     num = 0;
   else if ( (abs (a)<abs (p) || p*a<0) && a != 0 )
     num = 2;
@@ -163,24 +163,24 @@ number_accidentals (bool *different,
   int number = 0;
 
   *different = false;
-  if (gh_pair_p (accidentals) && !gh_symbol_p (ly_car (accidentals)))
+  if (ly_pair_p (accidentals) && !ly_symbol_p (ly_car (accidentals)))
     warning (_f ("Accidental typesetting list must begin with context-name: %s", 
                 ly_scm2string (ly_car (accidentals)).to_str0 ()));
   
-  for (; gh_pair_p (accidentals) && origin; accidentals = gh_cdr (accidentals))
+  for (; ly_pair_p (accidentals) && origin; accidentals = ly_cdr (accidentals))
     {
       // If pair then it is a new accidentals typesetting rule to be checked
-      SCM rule = gh_car (accidentals);
-      if (gh_pair_p (rule))
+      SCM rule = ly_car (accidentals);
+      if (ly_pair_p (rule))
        {
-         SCM type = gh_car (rule);
-         SCM lazyness = gh_cdr (rule);
+         SCM type = ly_car (rule);
+         SCM lazyness = ly_cdr (rule);
          SCM localsig = origin->get_property ("localKeySignature");
          
          bool same_octave_b = 
-           gh_eq_p (ly_symbol2scm ("same-octave"), type);
+           ly_eq_p (ly_symbol2scm ("same-octave"), type);
          bool any_octave_b = 
-           gh_eq_p (ly_symbol2scm ("any-octave"), type);
+           ly_eq_p (ly_symbol2scm ("any-octave"), type);
 
          if (same_octave_b || any_octave_b)
            {
@@ -199,7 +199,7 @@ number_accidentals (bool *different,
       /*
        if symbol then it is a context name. Scan parent contexts to find it.
       */
-      else if (gh_symbol_p (rule))
+      else if (ly_symbol_p (rule))
        {
          Context * dad = origin;
          while (dad && !dad->is_alias (rule))
@@ -223,8 +223,8 @@ Accidental_engraver::get_bar_num ()
       
   Moment mp = (unsmob_moment (smp)) ? *unsmob_moment (smp) : Moment (0);
   if (mp.main_part_ < Rational (0)
-      && gh_number_p (barnum))
-    barnum = scm_int2num (gh_scm2int (barnum) - 1);
+      && ly_number_p (barnum))
+    barnum = scm_int2num (ly_scm2int (barnum) - 1);
       
   return barnum ;
 }
@@ -301,9 +301,9 @@ Accidental_engraver::process_acknowledged_grobs ()
              announce_grob (a, SCM_EOL);
 
              
-             SCM accs = gh_cons (scm_int2num (pitch->get_alteration ()), SCM_EOL);
+             SCM accs = scm_cons (scm_int2num (pitch->get_alteration ()), SCM_EOL);
              if (num == 2 && extra_natural_b)
-               accs = gh_cons (scm_int2num (0), accs);
+               accs = scm_cons (scm_int2num (0), accs);
 
              /* TODO:
 
@@ -377,7 +377,7 @@ Accidental_engraver::stop_translation_timestep ()
       int n = pitch->get_notename ();
       int o = pitch->get_octave ();
       int a = pitch->get_alteration ();
-      SCM on_s = gh_cons (scm_int2num (o), scm_int2num (n));
+      SCM on_s = scm_cons (scm_int2num (o), scm_int2num (n));
 
       while (origin)
        {
@@ -393,7 +393,7 @@ Accidental_engraver::stop_translation_timestep ()
                that of the tied note and of the key signature.
              */
              localsig = ly_assoc_front_x
-               (localsig, on_s, gh_cons (SCM_BOOL_T, barnum));
+               (localsig, on_s, scm_cons (SCM_BOOL_T, barnum));
 
              change = true;
            }
@@ -404,7 +404,7 @@ Accidental_engraver::stop_translation_timestep ()
                noteheads with the same notename.
              */
              localsig = ly_assoc_front_x
-               (localsig, on_s, gh_cons (scm_int2num (a), barnum));
+               (localsig, on_s, scm_cons (scm_int2num (a), barnum));
 
              change = true;
            }
@@ -441,7 +441,7 @@ Accidental_engraver::acknowledge_grob (Grob_info info)
       && Rhythmic_head::has_interface (info.grob_))
     {
       if (to_boolean ( get_property ("harmonicAccidentals"))
-         || !gh_equal_p (info.grob_->get_property ("style"),
+         || !ly_equal_p (info.grob_->get_property ("style"),
                          ly_symbol2scm ("harmonic")))
        {
          
index 48308142fd4abb10a66b611427c6149e7a6becb5..ccb2bbf92745766d9fe10b2841fa9f0e6e775f33 100644 (file)
@@ -64,9 +64,9 @@ Accidental_placement::add_accidental (Grob* me, Grob* a)
       entry = SCM_EOL;
     }
   else
-    entry = gh_cdr (entry);
+    entry = ly_cdr (entry);
 
-  entry = gh_cons (a->self_scm (), entry);
+  entry = scm_cons (a->self_scm (), entry);
 
   accs = scm_assq_set_x (accs,  key, entry);
 
@@ -81,11 +81,11 @@ Accidental_placement::split_accidentals (Grob * accs,
                                         Link_array<Grob> *break_reminder,
                                         Link_array<Grob> *real_acc)
 {
-  for (SCM acs =accs->get_property ("accidental-grobs"); gh_pair_p (acs);
-       acs =gh_cdr (acs))
-    for (SCM s = gh_cdar (acs); gh_pair_p (s); s = gh_cdr (s))
+  for (SCM acs =accs->get_property ("accidental-grobs"); ly_pair_p (acs);
+       acs =ly_cdr (acs))
+    for (SCM s = ly_cdar (acs); ly_pair_p (s); s = ly_cdr (s))
       {
-       Grob *a = unsmob_grob (gh_car (s));
+       Grob *a = unsmob_grob (ly_car (s));
 
        if (unsmob_grob (a->get_property ("tie")))
          break_reminder->push (a);
@@ -260,13 +260,13 @@ Accidental_placement::position_accidentals (Grob * me)
     Y-position, they share an Ape, and will be printed in overstrike.
    */
   Link_array<Accidental_placement_entry> apes;
-  for (SCM s = accs; gh_pair_p (s); s =gh_cdr (s))
+  for (SCM s = accs; ly_pair_p (s); s =ly_cdr (s))
     {
       Accidental_placement_entry *ape = new Accidental_placement_entry;
-      ape->notename_ = gh_scm2int (gh_caar (s));
+      ape->notename_ = ly_scm2int (ly_caar (s));
       
-      for (SCM t = gh_cdar (s); gh_pair_p (t); t =gh_cdr (t))
-       ape->grobs_.push (unsmob_grob (gh_car (t)));
+      for (SCM t = ly_cdar (s); ly_pair_p (t); t =ly_cdr (t))
+       ape->grobs_.push (unsmob_grob (ly_car (t)));
 
       apes.push (ape);
     }
index b565881e88c21d7b1293d349dd1b2071518c0f31..e4985830d1efc2265beecb49c819fbf1d3c3cf31 100644 (file)
@@ -60,17 +60,17 @@ Accidental_interface::accurate_boxes (Grob *a,Grob**common)
   if (to_boolean (a->get_property ("cautionary")))
     {
       SCM cstyle = a->get_property ("cautionary-style");
-      parens = gh_equal_p (cstyle, ly_symbol2scm ("parentheses"));
+      parens = ly_equal_p (cstyle, ly_symbol2scm ("parentheses"));
 
     }
 
   SCM accs = a->get_property ("accidentals");
   SCM scm_style = a->get_property ("style");
-  if (!gh_symbol_p (scm_style)
+  if (!ly_symbol_p (scm_style)
       && !parens
       && scm_ilength (accs) == 1)
     {
-      if (gh_scm2int (gh_car (accs)) == FLAT)
+      if (ly_scm2int (ly_car (accs)) == FLAT)
        {
          Box stem = b;
          Box bulb = b;
@@ -175,13 +175,13 @@ Accidental_interface::print (SCM smob)
   if (caut)
     {
       SCM cstyle = me->get_property ("cautionary-style");
-      parens = gh_equal_p (cstyle, ly_symbol2scm ("parentheses"));
-      smaller = gh_equal_p (cstyle, ly_symbol2scm ("smaller"));
+      parens = ly_equal_p (cstyle, ly_symbol2scm ("parentheses"));
+      smaller = ly_equal_p (cstyle, ly_symbol2scm ("smaller"));
     }
 
   SCM scm_style = me->get_property ("style");
   String style;
-  if (gh_symbol_p (scm_style))
+  if (ly_symbol_p (scm_style))
     {
       style = ly_symbol2string (scm_style);
     }
@@ -197,7 +197,7 @@ Accidental_interface::print (SCM smob)
   if (smaller)
     {
       SCM ac = Font_interface::text_font_alist_chain (me);
-      ac = gh_cons (gh_cons (gh_cons
+      ac = scm_cons (scm_cons (scm_cons
                             (ly_symbol2scm ("font-size"),
                              scm_int2num (-2)), SCM_EOL),
                    ac);
@@ -208,9 +208,9 @@ Accidental_interface::print (SCM smob)
 
   Stencil mol;
   for (SCM s = me->get_property ("accidentals");
-       gh_pair_p (s); s = gh_cdr (s))
+       ly_pair_p (s); s = ly_cdr (s))
     {
-      int alteration = gh_scm2int (gh_car (s));
+      int alteration = ly_scm2int (ly_car (s));
       String font_char = get_fontcharname (style, alteration);
       Stencil acc (fm->find_by_name ("accidentals-" + font_char));
 
index 20f07919bde0c2392b0fff4d7539e32a40f8e53f..2cc4c182e712051fb42c2a97df837d50f287b2f7 100644 (file)
@@ -19,13 +19,13 @@ SCM
 Align_interface::alignment_callback (SCM element_smob, SCM axis)
 {
   Grob * me = unsmob_grob (element_smob);
-  Axis ax = (Axis)gh_scm2int (axis);
+  Axis ax = (Axis)ly_scm2int (axis);
   Grob * par = me->get_parent (ax);
   if (par && !to_boolean (par->get_property ("positioning-done")))
     {
       Align_interface::align_elements_to_extents (par, ax);
     }
-  return gh_double2scm (0.0);
+  return scm_make_real (0.0);
 }
 
 MAKE_SCHEME_CALLBACK (Align_interface,fixed_distance_alignment_callback,2);
@@ -33,13 +33,13 @@ SCM
 Align_interface::fixed_distance_alignment_callback (SCM element_smob, SCM axis)
 {
   Grob * me = unsmob_grob (element_smob);
-  Axis ax = (Axis)gh_scm2int (axis);
+  Axis ax = (Axis)ly_scm2int (axis);
   Grob * par = me->get_parent (ax);
   if (par && !to_boolean (par->get_property ("positioning-done")))
     {
       Align_interface::align_to_fixed_distance (par, ax);
     }
-  return gh_double2scm (0.0);
+  return scm_make_real (0.0);
 }
 
 /*
@@ -52,7 +52,7 @@ Align_interface::align_to_fixed_distance (Grob *me , Axis a)
   
   SCM d =   me->get_property ("stacking-dir");
   
-  Direction stacking_dir = gh_number_p (d) ? to_dir (d) : CENTER;
+  Direction stacking_dir = ly_number_p (d) ? to_dir (d) : CENTER;
   if (!stacking_dir)
     stacking_dir = DOWN;
 
@@ -124,7 +124,7 @@ Align_interface::align_elements_to_extents (Grob * me, Axis a)
   
   SCM d =   me->get_property ("stacking-dir");
   
-  Direction stacking_dir = gh_number_p (d) ? to_dir (d) : CENTER;
+  Direction stacking_dir = ly_number_p (d) ? to_dir (d) : CENTER;
   if (!stacking_dir)
     stacking_dir = DOWN;
   
@@ -216,8 +216,8 @@ Align_interface::align_elements_to_extents (Grob * me, Axis a)
        FIXME: uncommenting freaks out the Y-alignment of
        line-of-score.
        */
-      if (gh_number_p (align))
-       center_offset = total.linear_combination (gh_scm2double (align));
+      if (ly_number_p (align))
+       center_offset = total.linear_combination (ly_scm2double (align));
 
       for (int j = 0 ;  j < all_grobs.size (); j++)
        all_grobs[j]->translate_axis (all_translates[j] - center_offset, a);
@@ -226,7 +226,7 @@ Align_interface::align_elements_to_extents (Grob * me, Axis a)
 Axis
 Align_interface::axis (Grob*me)
 {
-  return  Axis (gh_scm2int (ly_car (me->get_property ("axes"))));
+  return  Axis (ly_scm2int (ly_car (me->get_property ("axes"))));
 }
 
 void
@@ -253,7 +253,7 @@ find_fixed_alignment_parent  (Grob *g)
 {
   while (g)
     {
-      if (gh_number_p (g->get_property ("forced-distance")))
+      if (ly_number_p (g->get_property ("forced-distance")))
        return g;
 
       g = g->get_parent (Y_AXIS);
index b961a7cc5de7fb98ce922eb2bbacc5678945683b..f878338bcb3ec93263559f859db9931cbecc8a52 100644 (file)
@@ -70,8 +70,8 @@ All_font_metrics::find_afm (String name)
       val = read_afm_file (filename);
       unsmob_metrics (val)->filename_ = filename;
       
-      unsmob_metrics (val)->description_ = gh_cons (name_string,
-                                                   gh_double2scm (1.0));
+      unsmob_metrics (val)->description_ = scm_cons (name_string, 
+                                                    scm_make_real (1.0));
 
       if (verbose_global_b)
        progress_indication ("]");
@@ -148,8 +148,8 @@ All_font_metrics::find_tfm (String name)
        progress_indication ("]");
 
       unsmob_metrics (val)->filename_ = filename;
-      unsmob_metrics (val)->description_ = gh_cons (name_string,
-                                                   gh_double2scm (1.0));
+      unsmob_metrics (val)->description_ = scm_cons (name_string,
+                                                    scm_make_real (1.0));
       tfm_p_dict_->set (sname, val);
       scm_gc_unprotect_object (val);
     }
@@ -212,7 +212,7 @@ LY_DEFINE (ly_font_load, "ly:font-load", 1, 0, 0,
           (SCM name),
           "Load the font @var{name}. ")
 {
-  SCM_ASSERT_TYPE (gh_string_p (name), name, SCM_ARG1, __FUNCTION__, "string");
+  SCM_ASSERT_TYPE (ly_string_p (name), name, SCM_ARG1, __FUNCTION__, "string");
 
   Font_metric * fm = all_fonts_global->find_font (ly_scm2string (name));
 
index d2224744ac217aafbef714a201fcee1f27c97e67..33c8122e420abfd8ed871249a8267bbd85939f27 100644 (file)
@@ -86,13 +86,13 @@ number_accidentals (SCM key_signature, Pitch *pitch,
   if (ignore_octave_b)
     prev = ly_assoc_cdr (scm_int2num (notename), key_signature);
   else
-    prev = scm_assoc (gh_cons (scm_int2num (octave), scm_int2num (notename)),
+    prev = scm_assoc (scm_cons (scm_int2num (octave), scm_int2num (notename)),
                     key_signature);
 
   /* should really be true unless prev == SCM_BOOL_F */
-  if (gh_pair_p (prev) && gh_pair_p (ly_cdr (prev)))
+  if (ly_pair_p (prev) && ly_pair_p (ly_cdr (prev)))
     {
-      prev = gh_cons (ly_car (prev), ly_cadr (prev));
+      prev = scm_cons (ly_car (prev), ly_cadr (prev));
     }
 
   /* If an accidental was not found */
@@ -100,7 +100,7 @@ number_accidentals (SCM key_signature, Pitch *pitch,
     prev = scm_assoc (scm_int2num (notename), key_signature);
 
   SCM prev_acc = (prev == SCM_BOOL_F) ? scm_int2num (0) : ly_cdr (prev);
-  int sig_alteration = gh_number_p (prev_acc) ? gh_scm2int (prev_acc) : 0;
+  int sig_alteration = ly_number_p (prev_acc) ? ly_scm2int (prev_acc) : 0;
 
   if (alteration == sig_alteration) // no accidental at all needed
     return 0;
@@ -149,7 +149,7 @@ Ambitus::print (SCM smob)
 
   SCM scm_note_head_style = me->get_property ("note-head-style");
   String note_head_style;
-  if (gh_symbol_p (scm_note_head_style))
+  if (ly_symbol_p (scm_note_head_style))
     {
       String note_head_style =
        ly_symbol2string (scm_note_head_style);
@@ -195,10 +195,10 @@ Ambitus::print (SCM smob)
     }
 
   SCM c0 = me->get_property ("c0-position");
-  if (gh_number_p (c0))
+  if (ly_number_p (c0))
     {
-      p_min += gh_scm2int (c0);
-      p_max += gh_scm2int (c0);
+      p_min += ly_scm2int (c0);
+      p_max += ly_scm2int (c0);
     }
 
   // create heads
@@ -244,7 +244,7 @@ Ambitus::print (SCM smob)
   SCM key_signature = me->get_property ("key-signature");
   SCM scm_accidentals_style = me->get_property ("accidentals-style");
   String accidentals_style;
-  if (gh_symbol_p (scm_accidentals_style))
+  if (ly_symbol_p (scm_accidentals_style))
     {
       accidentals_style =
        ly_symbol2string (scm_accidentals_style);
index 4bf7695e5bfe7e3ca729d0b40dc23ed0d82857a6..cfe86ca4f994ea92b6fd80d98448f117b8a8a52f 100644 (file)
@@ -25,7 +25,7 @@ Arpeggio::print (SCM smob)
   Grob *me = unsmob_grob (smob);
   
   Grob * common = me;
-  for (SCM s = me->get_property ("stems"); gh_pair_p (s); s = ly_cdr (s))
+  for (SCM s = me->get_property ("stems"); ly_pair_p (s); s = ly_cdr (s))
     {
       Grob * stem =  unsmob_grob (ly_car (s));
       common =  common->common_refpoint (Staff_symbol_referencer::get_staff_symbol (stem),
@@ -43,7 +43,7 @@ Arpeggio::print (SCM smob)
   Interval heads;
   Real my_y = me->relative_coordinate (common, Y_AXIS);
       
-  for (SCM s = me->get_property ("stems"); gh_pair_p (s); s = ly_cdr (s))
+  for (SCM s = me->get_property ("stems"); ly_pair_p (s); s = ly_cdr (s))
     {
       Grob * stem = unsmob_grob (ly_car (s));
       Grob * ss = Staff_symbol_referencer::get_staff_symbol (stem);
@@ -104,7 +104,7 @@ Arpeggio::brew_chord_bracket (SCM smob)
   Grob *me = unsmob_grob (smob);
   
   Grob * common = me;
-  for (SCM s = me->get_property ("stems"); gh_pair_p (s); s = ly_cdr (s))
+  for (SCM s = me->get_property ("stems"); ly_pair_p (s); s = ly_cdr (s))
     {
       Grob * stem =  unsmob_grob (ly_car (s));
       common =  common->common_refpoint (Staff_symbol_referencer::get_staff_symbol (stem),
@@ -114,7 +114,7 @@ Arpeggio::brew_chord_bracket (SCM smob)
   Interval heads;
   Real my_y = me->relative_coordinate (common, Y_AXIS);
       
-  for (SCM s = me->get_property ("stems"); gh_pair_p (s); s = ly_cdr (s))
+  for (SCM s = me->get_property ("stems"); ly_pair_p (s); s = ly_cdr (s))
     {
       Grob * stem = unsmob_grob (ly_car (s));
       Grob * ss = Staff_symbol_referencer::get_staff_symbol (stem);
@@ -143,7 +143,7 @@ SCM
 Arpeggio::width_callback (SCM smob, SCM axis)
 {
   Grob * me = unsmob_grob (smob);
-  Axis a = (Axis)gh_scm2int (axis);
+  Axis a = (Axis)ly_scm2int (axis);
   assert (a == X_AXIS);
   Stencil arpeggio = Font_interface::get_default_font (me)->find_by_name ("scripts-arpeggio");
 
index a4c431ba5520f9baef6de30db2abbbbed0c7d7c6..77b707438cbdb814312dfc17c7585a4edbca84e1 100644 (file)
@@ -78,7 +78,7 @@ private:
 void
 Auto_beam_engraver::process_music ()
 {
-  if (gh_string_p (get_property ("whichBar")))
+  if (ly_string_p (get_property ("whichBar")))
     {
       consider_end (shortest_mom_);
       junk_beam ();
@@ -188,23 +188,23 @@ Auto_beam_engraver::test_moment (Direction dir, Moment test_mom)
     }
 
   /* second guess: property generic time exception */
-  SCM m = scm_assoc (gh_append3 (function, wild, time), settings);
+  SCM m = scm_assoc (ly_append3 (function, wild, time), settings);
   
   if (m != SCM_BOOL_F && unsmob_moment (ly_cdr (m)))
     moment = * unsmob_moment (ly_cdr (m));
 
   /* third guess: property time exception, specific for duration type */
-  m = scm_assoc (gh_append3 (function, type, time), settings);
+  m = scm_assoc (ly_append3 (function, type, time), settings);
   if (m != SCM_BOOL_F && unsmob_moment (ly_cdr (m)))
     moment = * unsmob_moment (ly_cdr (m));
 
   /* fourth guess [user override]: property plain generic */
-  m = scm_assoc (gh_append3 (function, wild, wild), settings);
+  m = scm_assoc (ly_append3 (function, wild, wild), settings);
   if (m != SCM_BOOL_F && unsmob_moment (ly_cdr (m)))
     moment = * unsmob_moment (ly_cdr (m));
 
   /* fifth guess [user override]: property plain, specific for duration type */
-  m = scm_assoc (gh_append3 (function, type, wild), settings);
+  m = scm_assoc (ly_append3 (function, type, wild), settings);
   if (m != SCM_BOOL_F && unsmob_moment (ly_cdr (m)))
     moment = * unsmob_moment (ly_cdr (m));
   
@@ -304,7 +304,7 @@ Auto_beam_engraver::begin_beam ()
   
   beam_start_moment_ = now_mom ();
   beam_start_location_ = *unsmob_moment (get_property ("measurePosition"));
-  subdivide_beams_ = gh_scm2bool (get_property ("subdivideBeams"));
+  subdivide_beams_ = ly_scm2bool (get_property ("subdivideBeams"));
   beat_length_ = *unsmob_moment (get_property ("beatLength"));
 }
 
index 852df8d28794a724ae3dd943fd5e236cf5170dc0..000e0417d07f901d34024172111429adf0d7b020 100644 (file)
@@ -91,13 +91,13 @@ Auto_change_iterator::process (Moment m)
   Moment now = get_outlet ()->now_mom ();
   Moment *splitm = 0;
   
-  for (; gh_pair_p (split_list_); split_list_ = gh_cdr (split_list_))
+  for (; ly_pair_p (split_list_); split_list_ = ly_cdr (split_list_))
     {
-      splitm = unsmob_moment (gh_caar (split_list_));
+      splitm = unsmob_moment (ly_caar (split_list_));
       if ((*splitm + start_moment_) > now)
        break ;
 
-      SCM tag = gh_cdar (split_list_);
+      SCM tag = ly_cdar (split_list_);
       Direction d = to_dir  (tag);
       
       if (d && d != where_dir_)
index 1f628a458c2d7fcf8b8d8f924a788ee4f7047214..b7ce9afd3d182f131551e21242801de50a4a9453 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) gh_scm2int (ly_car (ax));
+      Axis a = (Axis) ly_scm2int (ly_car (ax));
       
       if (!e->get_parent (a))
        e->set_parent (me, a);
@@ -41,7 +41,7 @@ Interval
 Axis_group_interface::relative_group_extent (Axis a, Grob *common, SCM elts)
 {
   Interval r;
-  for (SCM s = elts; gh_pair_p (s); s = ly_cdr (s))
+  for (SCM s = elts; ly_pair_p (s); s = ly_cdr (s))
     {
       Grob * se = unsmob_grob (ly_car (s));
       Interval dims = se->extent (common, a);
@@ -56,7 +56,7 @@ SCM
 Axis_group_interface::group_extent_callback (SCM element_smob, SCM scm_axis)
 {
   Grob *me = unsmob_grob (element_smob);
-  Axis a = (Axis) gh_scm2int (scm_axis);
+  Axis a = (Axis) ly_scm2int (scm_axis);
 
   SCM elts = me->get_property ("elements");
   Grob * common = common_refpoint_of_list (elts, me, a);
@@ -75,13 +75,13 @@ Axis_group_interface::set_axes (Grob*me,Axis a1, Axis a2)
 
   SCM axes = me->get_property ("axes");
   
-  if (!gh_pair_p (axes)
+  if (!ly_pair_p (axes)
       || scm_c_memq (sa1, axes) == SCM_BOOL_F
       || scm_c_memq (sa2, axes) == SCM_BOOL_F)
     {
-      SCM ax = gh_cons (sa1, SCM_EOL);
+      SCM ax = scm_cons (sa1, SCM_EOL);
       if (a1 != a2)
-       ax= gh_cons (sa2, ax);
+       ax= scm_cons (sa2, ax);
       me->set_property ("axes", ax);
     }
 
@@ -108,7 +108,7 @@ Axis_group_interface::get_children (Grob*me)
   if (!has_interface (me))
     return childs;
   
-  for (SCM ep = me->get_property ("elements"); gh_pair_p (ep); ep = ly_cdr (ep))
+  for (SCM ep = me->get_property ("elements"); ly_pair_p (ep); ep = ly_cdr (ep))
     {
       Grob* e = unsmob_grob (ly_car (ep));
       if (e)
index 07d75803cc4891d68a68fe014d70758de6e8628b..0b4dd2e98d36fe00253c91fda343ba723b58b517 100644 (file)
@@ -29,7 +29,7 @@ Balloon_interface::print (SCM smob)
   SCM cb = me->get_property ("balloon-original-callback");
   SCM scm_mol  =  SCM_EOL;
 
-  if (gh_procedure_p (cb))
+  if (ly_procedure_p (cb))
     {
       scm_mol = scm_call_1 (cb, smob);
     }
@@ -60,7 +60,7 @@ Balloon_interface::print (SCM smob)
 
   SCM bt = me->get_property ("balloon-text");
   SCM chain = Font_interface::text_font_alist_chain (me);
-  chain = gh_cons (me->get_property ("balloon-text-props"), chain);
+  chain = scm_cons (me->get_property ("balloon-text-props"), chain);
 
 
   SCM text = Text_item::interpret_markup (me->get_paper ()->self_scm (), chain, bt);
index 26dd7a64b31059d24b9dd055370e7225ed1b52ec..2feb5f12a71a5a964f3a06002b76ade104946aad 100644 (file)
@@ -77,7 +77,7 @@ Bar_engraver::finalize ()
 void
 Bar_engraver::process_acknowledged_grobs ()
 {
-  if (!bar_ && gh_string_p (get_property ("whichBar")))
+  if (!bar_ && ly_string_p (get_property ("whichBar")))
     {
       create_bar ();
     }
index 9a7a2b30b11dbd671a01b53817ba248e1f305b34..ada699b27137e18c1edc6ed9325b9c7fb515f4c3 100644 (file)
@@ -30,10 +30,10 @@ Bar_line::print (SCM smob)
 
   SCM s = me->get_property ("glyph");
   SCM barsiz_proc = me->get_property ("bar-size-procedure");
-  if (gh_string_p (s) && gh_procedure_p (barsiz_proc))
+  if (ly_string_p (s) && ly_procedure_p (barsiz_proc))
     {
       String str  =ly_scm2string (s);
-      SCM siz = gh_call1 (barsiz_proc, me->self_scm ());
+      SCM siz = scm_call_1 (barsiz_proc, me->self_scm ());
       Real sz = robust_scm2double (siz, 0);
       if (sz < 0)
        return SCM_EOL;
@@ -157,20 +157,20 @@ Bar_line::before_line_breaking (SCM smob)
   SCM g = me->get_property ("glyph");
   SCM orig = g;
   Direction bsd = item->break_status_dir ();
-  if (gh_string_p (g) && bsd)
+  if (ly_string_p (g) && bsd)
     {
       SCM proc = me->get_property ("break-glyph-function");
-      g = gh_call2 (proc, g, scm_int2num (bsd));
+      g = scm_call_2 (proc, g, scm_int2num (bsd));
     }
   
-  if (!gh_string_p (g))
+  if (!ly_string_p (g))
     {
       me->set_property ("print-function", SCM_EOL);
       me->set_extent (SCM_EOL, X_AXIS);
       // leave y_extent for spanbar? 
     }
 
-  if (! gh_equal_p (g, orig))
+  if (! ly_equal_p (g, orig))
     me->set_property ("glyph", g);
 
   return SCM_UNSPECIFIED;
@@ -186,8 +186,8 @@ Bar_line::get_staff_bar_size (SCM smob)
   Grob*me = unsmob_grob (smob);
   Real ss = Staff_symbol_referencer::staff_space (me);
   SCM size = me->get_property ("bar-size");
-  if (gh_number_p (size))
-    return gh_double2scm (gh_scm2double (size)*ss);
+  if (ly_number_p (size))
+    return scm_make_real (ly_scm2double (size)*ss);
   else if (Staff_symbol_referencer::get_staff_symbol (me))
     {
       /*
@@ -195,7 +195,7 @@ Bar_line::get_staff_bar_size (SCM smob)
        calculation. That's a nonsense value, which would collapse the
        barline so we return 0.0 in the next alternative.
       */
-      return gh_double2scm ((Staff_symbol_referencer::line_count (me) -1) * ss);
+      return scm_make_real ((Staff_symbol_referencer::line_count (me) -1) * ss);
     }
   else
     return scm_int2num (0);
index cea5a246e8016257ea917a6d293b8e4a41bb3897..75a147f6bd9e7b930a11385aebddb448403e5786 100644 (file)
@@ -45,7 +45,7 @@ Bar_number_engraver::process_music ()
 
   SCM wb = get_property ("whichBar");
   
-  if (gh_string_p (wb))
+  if (ly_string_p (wb))
     {
       SCM smp = get_property ("measurePosition");
       
@@ -54,13 +54,13 @@ Bar_number_engraver::process_music ()
        {
          SCM bn = get_property ("currentBarNumber");
          SCM proc = get_property ("barNumberVisibility");
-         if (gh_number_p (bn) && gh_procedure_p (proc)
-             && to_boolean (gh_call1(proc, bn)))
+         if (ly_number_p (bn) && ly_procedure_p (proc)
+             && to_boolean (scm_call_1(proc, bn)))
            {
              create_items ();
              // guh.
              text_->set_property
-               ("text", scm_makfrom0str (to_string (gh_scm2int (bn)).to_str0 ()));
+               ("text", scm_makfrom0str (to_string (ly_scm2int (bn)).to_str0 ()));
            }
        }
     }
index c752512a76d3586a4bbd92d00300d171ef28b8b7..7bb434318f10d9e15cc361f32d7cf15aee3d0e8a 100644 (file)
@@ -96,8 +96,8 @@ Beam::quanting (SCM smob)
   Grob *me = unsmob_grob (smob);
 
   SCM s = me->get_property ("positions");
-  Real yl = gh_scm2double (gh_car (s));
-  Real yr = gh_scm2double (gh_cdr (s));
+  Real yl = ly_scm2double (ly_car (s));
+  Real yr = ly_scm2double (ly_cdr (s));
 
 
   /*
@@ -110,7 +110,7 @@ Beam::quanting (SCM smob)
   Real slt = Staff_symbol_referencer::line_thickness (me) / ss;
 
   SCM sdy = me->get_property ("least-squares-dy");
-  Real dy_mus = gh_number_p (sdy) ? gh_scm2double (sdy) : 0.0;
+  Real dy_mus = ly_number_p (sdy) ? ly_scm2double (sdy) : 0.0;
   
   Real straddle = 0.0;
   Real sit = (thickness - slt) / 2;
@@ -282,7 +282,7 @@ Beam::quanting (SCM smob)
 #if DEBUG_QUANTING
   SCM inspect_quants = me->get_property ("inspect-quants");
   if (debug_beam_quanting_flag
-      && gh_pair_p (inspect_quants))
+      && ly_pair_p (inspect_quants))
     {
       Drul_array<Real> ins = ly_scm2interval (inspect_quants);
 
index 746d3ba60f9101f432414ad966ef5f65c20511b3..c75fc58882713bc7162e5fd2b4c6ef64ff5a78af 100644 (file)
@@ -79,10 +79,10 @@ Beam::get_beam_translation (Grob *me)
 {
   SCM func = me->get_property ("space-function");
 
-  if (gh_procedure_p (func))
+  if (ly_procedure_p (func))
     {
-      SCM s = gh_call2 (func, me->self_scm (), scm_int2num (get_beam_count (me)));
-      return gh_scm2double (s);
+      SCM s = scm_call_2 (func, me->self_scm (), scm_int2num (get_beam_count (me)));
+      return ly_scm2double (s);
     }
   else
     {
@@ -95,7 +95,7 @@ int
 Beam::get_beam_count (Grob *me) 
 {
   int m = 0;
-  for (SCM s = me->get_property ("stems"); gh_pair_p (s); s = ly_cdr (s))
+  for (SCM s = me->get_property ("stems"); ly_pair_p (s); s = ly_cdr (s))
     {
       Grob *stem = unsmob_grob (ly_car (s));
       m = m >? (Stem::beam_multiplicity (stem).length () + 1);
@@ -117,11 +117,11 @@ Beam::space_function (SCM smob, SCM beam_count)
   Real line = Staff_symbol_referencer::line_thickness (me);
   Real thickness = get_thickness (me);
   
-  Real beam_translation = gh_scm2int (beam_count) < 4
+  Real beam_translation = ly_scm2int (beam_count) < 4
     ? (2*staff_space + line - thickness) / 2.0
     : (3*staff_space + line - thickness) / 3.0;
   
-  return gh_double2scm (beam_translation);
+  return scm_make_real (beam_translation);
 }
 
 
@@ -155,7 +155,7 @@ Beam::before_line_breaking (SCM smob)
        {
          me->warning (_ ("removing beam with less than two stems"));
 
-         unsmob_grob (gh_car (stems))->set_property ("beam", SCM_EOL);
+         unsmob_grob (ly_car (stems))->set_property ("beam", SCM_EOL);
          me->suicide ();
 
          return SCM_UNSPECIFIED;
@@ -201,7 +201,7 @@ position_with_maximal_common_beams (SCM left_beaming, SCM right_beaming,
                                    Direction left_dir,
                                    Direction right_dir)
 {
-  Slice lslice = int_list_to_slice (gh_cdr (left_beaming));
+  Slice lslice = int_list_to_slice (ly_cdr (left_beaming));
 
   int best_count = 0;
   int best_start = 0;
@@ -209,9 +209,9 @@ position_with_maximal_common_beams (SCM left_beaming, SCM right_beaming,
        (i - lslice[left_dir])* left_dir <= 0 ; i+= left_dir) 
     {
       int count =0;
-      for ( SCM s = gh_car (right_beaming); gh_pair_p (s); s = gh_cdr (s))
+      for ( SCM s = ly_car (right_beaming); ly_pair_p (s); s = ly_cdr (s))
        {
-         int k = - right_dir * gh_scm2int (gh_car (s)) + i;
+         int k = - right_dir * ly_scm2int (ly_car (s)) + i;
          if (scm_c_memq (scm_int2num (k), left_beaming) != SCM_BOOL_F)
            count ++;
        }
@@ -242,7 +242,7 @@ Beam::connect_beams (Grob *me)
       SCM this_beaming = this_stem->get_property ("beaming");
 
       Direction this_dir = get_grob_direction (this_stem);
-      if (gh_pair_p (last_beaming) && gh_pair_p (this_beaming))
+      if (ly_pair_p (last_beaming) && ly_pair_p (this_beaming))
        {
          int start_point = position_with_maximal_common_beams
            (last_beaming, this_beaming,
@@ -257,13 +257,13 @@ Beam::connect_beams (Grob *me)
              
              new_slice.set_empty ();
              SCM s = index_get_cell (this_beaming, d);
-             for (; gh_pair_p (s); s = gh_cdr (s))
+             for (; ly_pair_p (s); s = ly_cdr (s))
                {
                  int new_beam_pos =
-                   start_point - this_dir * gh_scm2int (gh_car (s));
+                   start_point - this_dir * ly_scm2int (ly_car (s));
 
                  new_slice.add_point (new_beam_pos);
-                 gh_set_car_x (s, scm_int2num (new_beam_pos));
+                 scm_set_car_x (s, scm_int2num (new_beam_pos));
                }
 
 
@@ -275,22 +275,22 @@ Beam::connect_beams (Grob *me)
        }
       else
        {
-         gh_set_car_x ( this_beaming, SCM_EOL);
-         SCM s = gh_cdr (this_beaming);
-         for (; gh_pair_p (s); s = gh_cdr (s))
+         scm_set_car_x ( this_beaming, SCM_EOL);
+         SCM s = ly_cdr (this_beaming);
+         for (; ly_pair_p (s); s = ly_cdr (s))
            {
-             int np = - this_dir * gh_scm2int (gh_car (s));
-             gh_set_car_x (s, scm_int2num (np));
+             int np = - this_dir * ly_scm2int (ly_car (s));
+             scm_set_car_x (s, scm_int2num (np));
              last_int.add_point (np);
            }
        }
 
       if (i == stems.size () -1)
        {
-         gh_set_cdr_x (this_beaming, SCM_EOL);
+         scm_set_cdr_x (this_beaming, SCM_EOL);
        }
 
-      if (scm_ilength (gh_cdr (this_beaming)) > 0)
+      if (scm_ilength (ly_cdr (this_beaming)) > 0)
        {
          last_beaming = this_beaming;
          last_dir = this_dir;
@@ -369,18 +369,18 @@ Beam::print (SCM grob)
        right from the left stem, and rfliebertjes pointing left from
        right stem.
        */
-      SCM left = (i>0) ? gh_cdr (last_beaming) : SCM_EOL;
-      SCM right = st ? gh_car (this_beaming) : SCM_EOL;
+      SCM left = (i>0) ? ly_cdr (last_beaming) : SCM_EOL;
+      SCM right = st ? ly_car (this_beaming) : SCM_EOL;
 
       Array<int> full_beams;
       Array<int> lfliebertjes;
       Array<int> rfliebertjes;   
 
       for (SCM s = left;
-          gh_pair_p (s); s =gh_cdr (s))
+          ly_pair_p (s); s =ly_cdr (s))
        {
-         int b = gh_scm2int (gh_car (s));
-         if (scm_c_memq (gh_car (s), right) != SCM_BOOL_F)
+         int b = ly_scm2int (ly_car (s));
+         if (scm_c_memq (ly_car (s), right) != SCM_BOOL_F)
            {
              full_beams.push (b);
            }
@@ -390,10 +390,10 @@ Beam::print (SCM grob)
            }
        }
       for (SCM s = right;
-          gh_pair_p (s); s =gh_cdr (s))
+          ly_pair_p (s); s =ly_cdr (s))
        {
-         int b = gh_scm2int (gh_car (s));
-         if (scm_c_memq (gh_car (s), left) == SCM_BOOL_F)
+         int b = ly_scm2int (ly_car (s));
+         if (scm_c_memq (ly_car (s), left) == SCM_BOOL_F)
            {
              rfliebertjes.push (b);
            }
@@ -421,9 +421,9 @@ Beam::print (SCM grob)
       Stencil gapped;
 
       int gap_count = 0;
-      if (gh_number_p (me->get_property ("gap-count")))
+      if (ly_number_p (me->get_property ("gap-count")))
        {
-         gap_count = gh_scm2int (me->get_property ("gap-count"));
+         gap_count = ly_scm2int (me->get_property ("gap-count"));
          gapped = Lookup::beam (dydx, w - 2 * gap_length, thick, blot);
 
          full_beams.sort (default_compare);
@@ -456,8 +456,8 @@ Beam::print (SCM grob)
              int t = Stem::duration_log (st); 
 
              SCM proc = me->get_property ("flag-width-function");
-             SCM result = gh_call1 (proc, scm_int2num (t));
-             nw_f = gh_scm2double (result);
+             SCM result = scm_call_1 (proc, scm_int2num (t));
+             nw_f = ly_scm2double (result);
            }
          else
            nw_f = break_overshoot / 2;
@@ -511,7 +511,7 @@ Beam::print (SCM grob)
 #if (DEBUG_QUANTING)
   SCM quant_score = me->get_property ("quant-score");
   if (debug_beam_quanting_flag
-      && gh_string_p (quant_score))
+      && ly_string_p (quant_score))
     {
       
       /*
@@ -564,13 +564,13 @@ Beam::get_default_dir (Grob *me)
     } while (flip (&d) != DOWN);
   
   SCM func = me->get_property ("dir-function");
-  SCM s = gh_call2 (func,
-                   gh_cons (scm_int2num (count[UP]),
+  SCM s = scm_call_2 (func,
+                   scm_cons (scm_int2num (count[UP]),
                             scm_int2num (count[DOWN])),
-                   gh_cons (scm_int2num (total[UP]),
+                   scm_cons (scm_int2num (total[UP]),
                             scm_int2num (total[DOWN])));
 
-  if (gh_number_p (s) && gh_scm2int (s))
+  if (ly_number_p (s) && ly_scm2int (s))
     return to_dir (s);
   
   /* If dir is not determined: get default */
@@ -666,10 +666,10 @@ void
 Beam::consider_auto_knees (Grob* me)
 {
   SCM scm = me->get_property ("auto-knee-gap");
-  if (!gh_number_p (scm))
+  if (!ly_number_p (scm))
     return ;
 
-  Real threshold = gh_scm2double (scm);
+  Real threshold = ly_scm2double (scm);
   
   Int_set gaps;
 
@@ -791,13 +791,13 @@ Beam::set_stem_shorten (Grob *me)
   
   SCM shorten_elt =
     robust_list_ref (beam_count -1, shorten_list);
-  Real shorten_f = gh_scm2double (shorten_elt) * staff_space;
+  Real shorten_f = ly_scm2double (shorten_elt) * staff_space;
 
   /* your similar cute comment here */
   shorten_f *= forced_fraction;
 
   if (shorten_f)
-    me->set_property ("shorten", gh_double2scm (shorten_f));
+    me->set_property ("shorten", scm_make_real (shorten_f));
 }
 
 /*  Call list of y-dy-callbacks, that handle setting of
@@ -830,8 +830,8 @@ Beam::position_beam (Grob *me)
     {
       // one wonders if such genericity is necessary  --hwn.
       SCM callbacks = me->get_property ("position-callbacks");
-      for (SCM i = callbacks; gh_pair_p (i); i = ly_cdr (i))
-       gh_call1 (ly_car (i), me->self_scm ());
+      for (SCM i = callbacks; ly_pair_p (i); i = ly_cdr (i))
+       scm_call_1 (ly_car (i), me->self_scm ());
     }
 
   set_stem_lengths (me);  
@@ -918,7 +918,7 @@ Beam::least_squares (SCM smob)
         where the second part goes.
        */
       me->set_property ("least-squares-dy",
-                            gh_double2scm (pos[RIGHT] - pos[LEFT]));
+                            scm_make_real (pos[RIGHT] - pos[LEFT]));
     }
   else
     {
@@ -937,7 +937,7 @@ Beam::least_squares (SCM smob)
       minimise_least_squares (&dydx, &y, ideals);
 
       dy = dydx * dx;
-      me->set_property ("least-squares-dy", gh_double2scm (dy));
+      me->set_property ("least-squares-dy", scm_make_real (dy));
       pos = Interval (y, (y+dy));
     }
 
@@ -1101,9 +1101,9 @@ Beam::check_concave (SCM smob)
   */
   bool is_concave1 = false;
   SCM gap = me->get_property ("concaveness-gap");
-  if (gh_number_p (gap))
+  if (ly_number_p (gap))
     {
-      Real r1 = gh_scm2double (gap);
+      Real r1 = ly_scm2double (gap);
       Real dy = Stem::chord_start_y (stems.top ())
        - Stem::chord_start_y (stems[0]);
 
@@ -1138,9 +1138,9 @@ Beam::check_concave (SCM smob)
   Real concaveness2 = 0;
   SCM thresh = me->get_property ("concaveness-threshold");
   Real r2 = infinity_f;
-  if (!is_concave1 && gh_number_p (thresh))
+  if (!is_concave1 && ly_number_p (thresh))
     {
-      r2 = gh_scm2double (thresh);
+      r2 = ly_scm2double (thresh);
       
       Interval iv;
       iv.add_point (Stem::chord_start_y (stems[0]));
@@ -1164,7 +1164,7 @@ Beam::check_concave (SCM smob)
 
       r /= Staff_symbol_referencer::staff_space (me);
       me->set_property ("positions", ly_interval2scm (Drul_array<Real> (r, r)));
-      me->set_property ("least-squares-dy", gh_double2scm (0));
+      me->set_property ("least-squares-dy", scm_make_real (0));
     }
 
   return SCM_UNSPECIFIED;
@@ -1183,7 +1183,7 @@ Beam::slope_damping (SCM smob)
     return SCM_UNSPECIFIED;
 
   SCM s = me->get_property ("damping"); 
-  int damping = gh_scm2int (s);
+  int damping = ly_scm2int (s);
 
   if (damping)
     {
@@ -1223,11 +1223,11 @@ where_are_the_whole_beams (SCM beaming)
 {
   Slice l; 
   
-  for ( SCM s = gh_car (beaming); gh_pair_p (s) ; s = gh_cdr (s))
+  for ( SCM s = ly_car (beaming); ly_pair_p (s) ; s = ly_cdr (s))
     {
-      if (scm_c_memq (gh_car (s), gh_cdr (beaming)) != SCM_BOOL_F)
+      if (scm_c_memq (ly_car (s), ly_cdr (beaming)) != SCM_BOOL_F)
        
-       l.add_point (gh_scm2int (gh_car (s)));
+       l.add_point (ly_scm2int (ly_car (s)));
     }
 
   return l;
@@ -1297,8 +1297,8 @@ Beam::set_stem_lengths (Grob *me)
 
   bool gap = false;
   Real thick =0.0;
-  if (gh_number_p (me->get_property ("gap-count"))
-      &&gh_scm2int (me->get_property ("gap-count")))
+  if (ly_number_p (me->get_property ("gap-count"))
+      &&ly_scm2int (me->get_property ("gap-count")))
     {
       gap = true;
       thick = get_thickness (me);
@@ -1453,26 +1453,26 @@ SCM
 Beam::rest_collision_callback (SCM element_smob, SCM axis)
 {
   Grob *rest = unsmob_grob (element_smob);
-  Axis a = (Axis) gh_scm2int (axis);
+  Axis a = (Axis) ly_scm2int (axis);
 
-  if (gh_number_p (rest->get_property ("staff-position")))
-    return gh_int2scm (0);
+  if (ly_number_p (rest->get_property ("staff-position")))
+    return scm_int2num (0);
   
   assert (a == Y_AXIS);
 
   Grob *st = unsmob_grob (rest->get_property ("stem"));
   Grob *stem = st;
   if (!stem)
-    return gh_double2scm (0.0);
+    return scm_make_real (0.0);
   Grob *beam = unsmob_grob (stem->get_property ("beam"));
   if (!beam
       || !Beam::has_interface (beam)
       || !Beam::visible_stem_count (beam))
-    return gh_double2scm (0.0);
+    return scm_make_real (0.0);
 
   Drul_array<Real> pos (0, 0);
   SCM s = beam->get_property ("positions");
-  if (gh_pair_p (s) && gh_number_p (ly_car (s)))
+  if (ly_pair_p (s) && ly_number_p (ly_car (s)))
     pos = ly_scm2interval (s);
   Real staff_space = Staff_symbol_referencer::staff_space (rest);
 
@@ -1518,19 +1518,19 @@ Beam::rest_collision_callback (SCM element_smob, SCM axis)
       < rad)
     shift = ceil (fabs (shift)) *sign (shift);
 
-  return gh_double2scm (staff_space * shift);
+  return scm_make_real (staff_space * shift);
 }
 
 bool
 Beam::is_knee (Grob* me)
 {
   SCM k = me->get_property ("knee");
-  if (gh_boolean_p (k))
-    return gh_scm2bool (k);
+  if (ly_boolean_p (k))
+    return ly_scm2bool (k);
 
   bool knee = false;
   int d = 0;
-  for (SCM s = me->get_property ("stems"); gh_pair_p (s); s = ly_cdr (s))
+  for (SCM s = me->get_property ("stems"); ly_pair_p (s); s = ly_cdr (s))
     {
       Direction dir = get_grob_direction (unsmob_grob (ly_car (s)));
       if (d && d != dir)
@@ -1541,7 +1541,7 @@ Beam::is_knee (Grob* me)
       d = dir;
     }
   
-  me->set_property ("knee", gh_bool2scm (knee));
+  me->set_property ("knee", ly_bool2scm (knee));
 
   return knee;
 }
index f1bf4c6383a753ded309ddfe0f99133146490c7e..66f893c79f0b62640fa571739d5e03208d8cef6c 100644 (file)
@@ -48,7 +48,7 @@ Break_align_engraver::finalize ()
 void
 Break_align_engraver::stop_translation_timestep ()
 {
-  for (SCM p = column_alist_; gh_pair_p (p); p = ly_cdr (p))
+  for (SCM p = column_alist_; ly_pair_p (p); p = ly_cdr (p))
     {
       SCM pair = ly_car (p);
       add_column (ly_cdr (pair));
@@ -92,7 +92,7 @@ Break_align_engraver::acknowledge_grob (Grob_info inf)
        return ;
 
       SCM align_name = item->get_property ("break-align-symbol");
-      if (!gh_symbol_p (align_name))
+      if (!ly_symbol_p (align_name))
        return ;
 
       if (!align_)
index 0eab0d9414b964b6d67d40797ca6d39f0001f19a..363f505fafc30d7dedf92d424f2c8809489532cb 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) gh_scm2int (axis);
+  Axis a = (Axis) ly_scm2int (axis);
 
   assert (a == X_AXIS);
   Grob *par = me->get_parent (a);
@@ -38,7 +38,7 @@ Break_align_interface::alignment_callback (SCM element_smob, SCM axis)
       Break_align_interface::do_alignment (par);
     }
     
-  return gh_double2scm (0);
+  return scm_make_real (0);
 }
 
 MAKE_SCHEME_CALLBACK (Break_align_interface,self_align_callback,2);
@@ -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) gh_scm2int (axis);
+  Axis a = (Axis) ly_scm2int (axis);
   assert (a == X_AXIS);
   
   Item* item = dynamic_cast<Item*> (me);
@@ -76,25 +76,25 @@ Break_align_interface::ordered_elements (Grob *grob)
   Item *me  = dynamic_cast<Item*> (grob);
   SCM elts = me->get_property ("elements");
   SCM order_vec = me->get_property ("break-align-orders");
-  if (!gh_vector_p (order_vec)
-      || gh_vector_length (order_vec) < 3)
+  if (!ly_vector_p (order_vec)
+      || ly_vector_length (order_vec) < 3)
     return  Pointer_group_interface__extract_grobs (me, (Grob*)0,
                                                    "elements");
   SCM order = scm_vector_ref (order_vec,
-                             gh_int2scm (me->break_status_dir() + 1));
+                             scm_int2num (me->break_status_dir() + 1));
 
 
   /*
     Copy in order specified in BREAK-ALIGN-ORDER.
   */
   Link_array<Grob> new_elts;
-  for (; gh_pair_p (order); order = ly_cdr (order))
+  for (; ly_pair_p (order); order = ly_cdr (order))
     {
-      SCM sym = gh_car (order);
+      SCM sym = ly_car (order);
       
-      for (SCM s =elts; gh_pair_p (s); s = gh_cdr (s))
+      for (SCM s =elts; ly_pair_p (s); s = ly_cdr (s))
        {
-         Grob *g = unsmob_grob (gh_car (s));
+         Grob *g = unsmob_grob (ly_car (s));
          if (g && sym == g->get_property ("break-align-symbol"))
            {
              new_elts.push (g);
@@ -161,9 +161,9 @@ Break_align_interface::do_alignment (Grob *grob)
        Find the first grob with a space-alist entry.
        */
       for (SCM s = l->get_property ("elements");
-          gh_pair_p (s) ; s = gh_cdr (s))
+          ly_pair_p (s) ; s = ly_cdr (s))
          {
-           Grob *elt = unsmob_grob (gh_car (s));
+           Grob *elt = unsmob_grob (ly_car (s));
 
            if (edge_idx < 0
                && elt->get_property ("break-align-symbol")
@@ -171,7 +171,7 @@ Break_align_interface::do_alignment (Grob *grob)
              edge_idx = idx;
            
            SCM l =elt->get_property ("space-alist");
-           if (gh_pair_p (l))
+           if (ly_pair_p (l))
              {
                alist= l;
                break;
@@ -186,9 +186,9 @@ Break_align_interface::do_alignment (Grob *grob)
        reason.
       */
       for (SCM s = r ? r->get_property ("elements") : SCM_EOL;
-          !gh_symbol_p (rsym) && gh_pair_p (s); s = gh_cdr (s))
+          !ly_symbol_p (rsym) && ly_pair_p (s); s = ly_cdr (s))
        {
-         Grob * elt =unsmob_grob (gh_car (s));
+         Grob * elt =unsmob_grob (ly_car (s));
 
          rsym = elt->get_property ("break-align-symbol");
        }
@@ -197,14 +197,14 @@ Break_align_interface::do_alignment (Grob *grob)
        edge_idx = next_idx;
 
       SCM entry = SCM_EOL;
-      if (gh_symbol_p (rsym))
+      if (ly_symbol_p (rsym))
        entry = scm_assq (rsym, alist);
 
-      bool entry_found = gh_pair_p (entry);
+      bool entry_found = ly_pair_p (entry);
       if (!entry_found)
        {
          String sym_string;
-         if (gh_symbol_p (rsym))
+         if (ly_symbol_p (rsym))
            sym_string = ly_symbol2string (rsym);
 
          String orig_string ;
@@ -221,10 +221,10 @@ Break_align_interface::do_alignment (Grob *grob)
       
       if (entry_found)
        {
-         entry = gh_cdr (entry);
+         entry = ly_cdr (entry);
          
-         distance = gh_scm2double (gh_cdr (entry));
-         type = gh_car (entry) ;
+         distance = ly_scm2double (ly_cdr (entry));
+         type = ly_car (entry) ;
        }
 
       if (r)
index 0645a1c6c08910acbf803fa43265fadbb34d89c0..cd1ff04703ee9a69451ba91195173a30d9d38369 100644 (file)
@@ -91,7 +91,7 @@ do_break_substitution (SCM src)
  
   if (unsmob_grob (src))
     return substitute_grob (unsmob_grob (src));
-  else if (gh_vector_p (src))
+  else if (ly_vector_p (src))
     {
       int len = SCM_VECTOR_LENGTH (src);
       SCM nv = scm_c_make_vector (len, SCM_UNDEFINED);
@@ -111,7 +111,7 @@ do_break_substitution (SCM src)
       SCM oldcdr = ly_cdr (src);
       
       if (newcar == SCM_UNDEFINED
-         && (gh_pair_p (oldcdr) || oldcdr == SCM_EOL))
+         && (ly_pair_p (oldcdr) || oldcdr == SCM_EOL))
        {
          /*
            This is tail-recursion, ie. 
@@ -142,13 +142,13 @@ substitute_grob_list (SCM grob_list)
   SCM l = SCM_EOL;
   SCM * tail = &l;
 
-  for (SCM s = grob_list; gh_pair_p (s); s =  gh_cdr (s))
+  for (SCM s = grob_list; ly_pair_p (s); s =  ly_cdr (s))
     {
-      SCM n= substitute_grob (unsmob_grob (gh_car (s)));
+      SCM n= substitute_grob (unsmob_grob (ly_car (s)));
 
       if (n != SCM_UNDEFINED)
        {
-         *tail = gh_cons (n, SCM_EOL);
+         *tail = scm_cons (n, SCM_EOL);
          tail = SCM_CDRLOC (*tail);
        }
     }
@@ -350,9 +350,9 @@ Spanner::fast_fubstitute_grob_list (SCM sym,
   
   int sp_index = len;
   int it_index = 0;
-  for (SCM s = grob_list; gh_pair_p (s); s = gh_cdr (s))
+  for (SCM s = grob_list; ly_pair_p (s); s = ly_cdr (s))
     {
-      Grob * g = unsmob_grob (gh_car (s));
+      Grob * g = unsmob_grob (ly_car (s));
 
       Slice sr = grob_system_range (g);
       sr.intersect (system_range);
@@ -467,10 +467,10 @@ substitute_mutable_property_alist (SCM alist)
 
   SCM l = SCM_EOL;
   SCM *tail = &l;
-  for (SCM s = alist; gh_pair_p (s); s = gh_cdr (s))
+  for (SCM s = alist; ly_pair_p (s); s = ly_cdr (s))
     {
-      SCM sym = gh_caar (s);
-      SCM val = gh_cdar (s);
+      SCM sym = ly_caar (s);
+      SCM val = ly_cdar (s);
       SCM type = scm_object_property (sym, ly_symbol2scm ("backend-type?"));
 
       if (type == grob_list_p)
@@ -478,7 +478,7 @@ substitute_mutable_property_alist (SCM alist)
       else
        val = do_break_substitution (val);
 
-      *tail = gh_cons (gh_cons (sym, val), SCM_EOL);
+      *tail = scm_cons (scm_cons (sym, val), SCM_EOL);
       tail = SCM_CDRLOC (*tail);
     }
 
index 565975359fb57a25bff49f3ff2221a718299297d..312c3463d522c6d80a6b1f7755da2d81ee3a223d 100644 (file)
@@ -187,7 +187,7 @@ Breathing_sign::offset_callback (SCM element_smob, SCM)
 
   Real inter_f = Staff_symbol_referencer::staff_space (me)/2;
   int sz = Staff_symbol_referencer::line_count (me)-1;
-  return gh_double2scm (inter_f * sz * d);
+  return scm_make_real (inter_f * sz * d);
 }
 
 ADD_INTERFACE (Breathing_sign, "breathing-sign-interface",
index a13f527601aa0548c33c1ef70dbe7cce6640dd10..aad400136c726346d2a9f23c8bce02782e882c0a 100644 (file)
@@ -80,19 +80,19 @@ Chord_name_engraver::process_music ()
       else if (n->get_property ("bass") == SCM_BOOL_T)
        bass = p;
       else
-       pitches = gh_cons (p, pitches);
+       pitches = scm_cons (p, pitches);
     }
 
   if (inversion_event)
     {
       SCM oct = inversion_event->get_property ("octavation");
-      if (gh_number_p (oct))
+      if (ly_number_p (oct))
        {
          Pitch *p = unsmob_pitch (inversion_event->get_property ("pitch"));
-         int octavation =  gh_scm2int (oct);
+         int octavation =  ly_scm2int (oct);
          Pitch orig = p->transposed (Pitch (-octavation, 0,0));
          
-         pitches= gh_cons (orig.smobbed_copy (), pitches);
+         pitches= scm_cons (orig.smobbed_copy (), pitches);
        }
       else
        programming_error ("Inversion does not have original pitch.");
@@ -107,14 +107,14 @@ Chord_name_engraver::process_music ()
   /*
     Ugh. 
    */
-  SCM chord_as_scm = gh_cons (pitches, gh_cons (bass, inversion));
+  SCM chord_as_scm = scm_cons (pitches, scm_cons (bass, inversion));
   
   chord_name_ = make_item ("ChordName");
   chord_name_->set_property ("text", markup);
   announce_grob (chord_name_, notes_[0]->self_scm ());
   SCM s = get_property ("chordChanges");
-  if (to_boolean (s) && gh_pair_p (last_chord_) 
-      && gh_equal_p (chord_as_scm, last_chord_))
+  if (to_boolean (s) && ly_pair_p (last_chord_) 
+      && ly_equal_p (chord_as_scm, last_chord_))
     chord_name_->set_property ("begin-of-line-visible", SCM_BOOL_T);
 
   last_chord_ = chord_as_scm;
index 1d06bd4ea419e4db837b9740ad5aab2d29e7cc46..4272ec2bef599fdb0bc5affa4a567a06c2a593bc 100644 (file)
@@ -167,7 +167,7 @@ Chord_tremolo_engraver::acknowledge_grob (Grob_info info)
          
       if (Stem::duration_log (s) != 1)
        {
-         beam_->set_property ("gap-count", gh_int2scm (flags_ - total_duration_flags_));
+         beam_->set_property ("gap-count", scm_int2num (flags_ - total_duration_flags_));
        }
 
       if (info.music_cause ()->is_mus_type ("rhythmic-event"))
index 12fbaaf18faa706ff19744326c6a8220c850eb83..6131aa1310f5b1e030bc2206e39db3b65cd3592e 100644 (file)
@@ -76,7 +76,7 @@ Clef_engraver::acknowledge_grob (Grob_info info)
   if (item)
     {
       if (Bar_line::has_interface (info.grob_)
-         && gh_string_p (get_property ("clefGlyph")))
+         && ly_string_p (get_property ("clefGlyph")))
        create_clef ();
     } 
 }
@@ -92,19 +92,19 @@ Clef_engraver::create_clef ()
       clef_ = c;
       SCM cpos = get_property ("clefPosition");
 
-      if (gh_number_p (cpos))
-       Staff_symbol_referencer::set_position (clef_, gh_scm2int (cpos));
+      if (ly_number_p (cpos))
+       Staff_symbol_referencer::set_position (clef_, ly_scm2int (cpos));
 
       SCM oct =  get_property ("clefOctavation");
-      if (gh_number_p (oct) && gh_scm2int (oct))
+      if (ly_number_p (oct) && ly_scm2int (oct))
        {
          Item * g = make_item ("OctavateEight");
 
-         int abs_oct = gh_scm2int (oct) ;
+         int abs_oct = ly_scm2int (oct) ;
          int dir = sign (abs_oct);
          abs_oct = abs (abs_oct)  + 1;
 
-         SCM txt = scm_number_to_string (gh_int2scm (abs_oct),
+         SCM txt = scm_number_to_string (scm_int2num (abs_oct),
                                          SCM_MAKINUM (10));
 
          g->set_property ("text",
index 73216528f0424e8e2cd636a4ec27c9bef541e615..70c7a2c5931e19f5776ef16e41c0872db17f9692 100644 (file)
@@ -23,7 +23,7 @@ Clef::before_line_breaking (SCM smob)
 
   SCM glyph = s->get_property ("glyph-name");
   
-  if (gh_string_p (glyph))
+  if (ly_string_p (glyph))
     {
       String str = ly_scm2string (glyph);
 
@@ -53,7 +53,7 @@ Clef::print (SCM smob)
 {
   Grob *me = unsmob_grob (smob);
   SCM glyph_scm = me->get_property ("glyph-name");
-  if (!gh_string_p (glyph_scm))
+  if (!ly_string_p (glyph_scm))
     return SCM_EOL;
 
   String glyph = String (ly_scm2string (glyph_scm));
index 5ae931f3d98ce3b22dac6ea3e671c5d5d1b9c198..94cd0e6a68e85429fae8459b803e9adc21673438 100644 (file)
@@ -82,7 +82,7 @@ Cluster_spanner_engraver::process_music ()
     {
       SCM c0scm = get_property ("middleCPosition");
 
-      int c0 =  gh_number_p (c0scm) ? gh_scm2int (c0scm) : 0;
+      int c0 =  ly_number_p (c0scm) ? ly_scm2int (c0scm) : 0;
       int pmax = INT_MIN;
       int pmin = INT_MAX;
       
@@ -98,8 +98,8 @@ Cluster_spanner_engraver::process_music ()
       
       beacon_ = make_item ("ClusterSpannerBeacon");
       beacon_->set_property ("positions",
-                                 scm_cons (gh_int2scm (pmin),
-                                           gh_int2scm (pmax)));
+                                 scm_cons (scm_int2num (pmin),
+                                           scm_int2num (pmax)));
       announce_grob (beacon_, cluster_notes_[0]->self_scm ());
     }
 
index 490840f1576b7f88417b8a6b80e6b5d9993b4501..390659c4d1734d00d681725ad6d03213224dca95 100644 (file)
@@ -41,7 +41,7 @@ brew_cluster_piece (Grob *me, Array<Offset> bottom_points, Array<Offset> top_poi
   SCM shape_scm = me->get_property ("style");
   String shape;
 
-  if (gh_symbol_p (shape_scm))
+  if (ly_symbol_p (shape_scm))
     {
       shape = ly_symbol2string (shape_scm);
     }
@@ -144,7 +144,7 @@ Cluster::print (SCM smob)
   Grob *commonx = left_bound->common_refpoint (right_bound, X_AXIS);
   SCM cols  =me->get_property ("columns");
 
-  if (!gh_pair_p (cols))
+  if (!ly_pair_p (cols))
     {
       me->warning ("junking empty cluster");
       me->suicide ();
@@ -165,7 +165,7 @@ Cluster::print (SCM smob)
     line with the center of the note heads?
     
    */
-  for (SCM s = cols; gh_pair_p (s); s = ly_cdr (s))
+  for (SCM s = cols; ly_pair_p (s); s = ly_cdr (s))
     {
       Grob * col = unsmob_grob (ly_car (s));
       Interval yext = col->extent (commony, Y_AXIS);
@@ -186,7 +186,7 @@ Cluster::print (SCM smob)
        {
          Spanner * next = orig->broken_intos_[spanner->get_break_index () + 1];
          SCM cols = next->get_property ("columns");
-         if (gh_pair_p (cols))
+         if (ly_pair_p (cols))
            {
              Grob *next_commony = common_refpoint_of_list (cols, next, Y_AXIS);
              Grob * col = unsmob_grob (ly_car (scm_last_pair (cols)));
index 3c36448914ffe52bbad1a2c074e1b73c542cde4c..31f77111845cfa72824b2ba4fe2d2d30ce4e6ee7 100644 (file)
@@ -86,7 +86,7 @@
          Real distance;
          if (incr_scm != SCM_EOL)
            {
-             distance = gh_scm2double (incr_scm);
+             distance = ly_scm2double (incr_scm);
            }
          else
            {
@@ -127,7 +127,7 @@ Coherent_ligature_engraver::get_set_column (Item *item, Paper_column *column)
       // also for all associated grobs (NoteSpacing, SeparationItem).
       Grob *sl = Staff_symbol_referencer::get_staff_symbol (item);
       for (SCM tail = parent->get_property ("elements");
-          gh_pair_p (tail);
+          ly_pair_p (tail);
           tail = ly_cdr (tail))
        {
          Item *sibling = unsmob_item (ly_car (tail));
@@ -140,7 +140,7 @@ Coherent_ligature_engraver::get_set_column (Item *item, Paper_column *column)
                                           "setting `spacing-increment = "
                                           "0.01': ptr=%ul", parent));
              sibling_parent->set_property ("forced-spacing",
-                                             gh_double2scm (0.01));
+                                             scm_make_real (0.01));
 #endif
              sibling->set_parent (column, X_AXIS);
            }
@@ -184,12 +184,12 @@ compute_delta_pitches (Array<Grob_info> primitives)
       {
        delta_pitch = pitch - prev_pitch;
        prev_primitive->set_property ("delta-pitch",
-                                          gh_int2scm (delta_pitch));
+                                          scm_int2num (delta_pitch));
       }
     prev_pitch = pitch;
     prev_primitive = primitive;
   }
-  primitive->set_property ("delta-pitch", gh_int2scm (0));
+  primitive->set_property ("delta-pitch", scm_int2num (0));
 }
 
 void
index bf4437e41f32b24654e4b36ce60b9fb9e5127f03..d26a893b5820921b1fd092d7841ce73284845f23 100644 (file)
@@ -222,7 +222,7 @@ Completion_heads_engraver::process_music ()
       
       req->set_property ("duration", note_dur.smobbed_copy ());
       note->set_property ("duration-log",
-                                gh_int2scm (note_dur.duration_log ()));
+                                scm_int2num (note_dur.duration_log ()));
       
       int dots= note_dur.dot_count ();
       if (dots)
@@ -233,8 +233,8 @@ Completion_heads_engraver::process_music ()
          /*
           measly attempt to save an eeny-weenie bit of memory.
          */
-         if (dots != gh_scm2int (d->get_property ("dot-count")))
-           d->set_property ("dot-count", gh_int2scm (dots));
+         if (dots != ly_scm2int (d->get_property ("dot-count")))
+           d->set_property ("dot-count", scm_int2num (dots));
 
          d->set_parent (note, Y_AXIS);
          announce_grob (d, SCM_EOL);
@@ -245,10 +245,10 @@ Completion_heads_engraver::process_music ()
 
       int pos = pit->steps ();
       SCM c0 = get_property ("middleCPosition");
-      if (gh_number_p (c0))
-       pos += gh_scm2int (c0);
+      if (ly_number_p (c0))
+       pos += ly_scm2int (c0);
 
-      note->set_property ("staff-position",   gh_int2scm (pos));
+      note->set_property ("staff-position",   scm_int2num (pos));
       announce_grob (note,req->self_scm ());
       notes_.push (note);
     }
index afa8ccfac6e87309901c737cd6b0e948d0001105..b8d22ffb392b5a3cf4732d2f74b9bf0da94e1037 100644 (file)
@@ -96,15 +96,15 @@ Context_def::Context_def (Context_def const & s)
 void
 Context_def::add_context_mod (SCM mod)
 {
-  SCM tag  = gh_car (mod);
+  SCM tag  = ly_car (mod);
   if (ly_symbol2scm ("description")  == tag)
     {
-      description_ = gh_cadr (mod);
+      description_ = ly_cadr (mod);
       return ;
     }
 
-  SCM sym = gh_cadr (mod);
-  if (gh_string_p (sym))
+  SCM sym = ly_cadr (mod);
+  if (ly_string_p (sym))
     sym = scm_string_to_symbol (sym);
   
   if (ly_symbol2scm ("consists") == tag
@@ -114,12 +114,12 @@ Context_def::add_context_mod (SCM mod)
       if (!get_translator (sym))
        error (_f ("Program has no such type: `%s'", ly_symbol2string (sym).to_str0 ()));
       else
-       translator_mods_ = gh_cons (scm_list_2 (tag, sym), translator_mods_ );
+       translator_mods_ = scm_cons (scm_list_2 (tag, sym), translator_mods_ );
     }
   else if (ly_symbol2scm ("accepts") == tag
           || ly_symbol2scm ("denies") == tag)
     {
-      accept_mods_ = gh_cons (scm_list_2 (tag, sym), accept_mods_); 
+      accept_mods_ = scm_cons (scm_list_2 (tag, sym), accept_mods_); 
     }
   else if (ly_symbol2scm ("poppush") == tag
           || ly_symbol2scm ("pop") == tag
@@ -127,11 +127,11 @@ Context_def::add_context_mod (SCM mod)
           || ly_symbol2scm ("assign") == tag
           || ly_symbol2scm ("unset") == tag)
     {
-      property_ops_ = gh_cons (mod, property_ops_);
+      property_ops_ = scm_cons (mod, property_ops_);
     }
   else if (ly_symbol2scm ("alias") == tag)
     {
-      context_aliases_ = gh_cons (sym, context_aliases_);
+      context_aliases_ = scm_cons (sym, context_aliases_);
     }
   else if (ly_symbol2scm ("translator-type")  == tag)
     {
@@ -161,12 +161,12 @@ Context_def::get_accepted (SCM user_mod) const
   SCM mods = scm_reverse_x (scm_list_copy (accept_mods_),
                            user_mod);
   SCM acc = SCM_EOL;
-  for (SCM s = mods; gh_pair_p (s); s = gh_cdr (s))
+  for (SCM s = mods; ly_pair_p (s); s = ly_cdr (s))
     {
-      SCM tag = gh_caar (s);
-      SCM sym = gh_cadar (s);
+      SCM tag = ly_caar (s);
+      SCM sym = ly_cadar (s);
       if (tag == ly_symbol2scm ("accepts"))
-       acc = gh_cons (sym, acc);
+       acc = scm_cons (sym, acc);
       else if (tag == ly_symbol2scm ("denies"))
        acc = scm_delete_x (sym, acc);
     }
@@ -177,12 +177,12 @@ Context_def::get_accepted (SCM user_mod) const
 Link_array<Context_def>
 Context_def::path_to_acceptable_context (SCM type_sym, Music_output_def* odef) const
 {
-  assert (gh_symbol_p (type_sym));
+  assert (ly_symbol_p (type_sym));
   
   SCM accepted = get_accepted (SCM_EOL);
 
   Link_array<Context_def> accepteds;
-  for (SCM s = accepted; gh_pair_p (s); s = ly_cdr (s))
+  for (SCM s = accepted; ly_pair_p (s); s = ly_cdr (s))
     {
       Context_def *t = unsmob_context_def (odef->find_context_def (ly_car (s)));
       if (!t)
@@ -196,7 +196,7 @@ Context_def::path_to_acceptable_context (SCM type_sym, Music_output_def* odef) c
       /*
        don't check aliases, because \context Staff should not create RhythmicStaff.
       */
-      if (gh_equal_p (accepteds[i]->get_context_name (), type_sym))
+      if (ly_equal_p (accepteds[i]->get_context_name (), type_sym))
        {
          best_result.push (accepteds[i]);
          return best_result;
@@ -239,18 +239,18 @@ Context_def::get_translator_names (SCM user_mod) const
   SCM mods = scm_reverse_x (scm_list_copy (translator_mods_),
                            user_mod);
   
-  for (SCM s = mods; gh_pair_p (s); s = gh_cdr (s))
+  for (SCM s = mods; ly_pair_p (s); s = ly_cdr (s))
     {
-      SCM tag = gh_caar (s);
-      SCM arg = gh_cadar (s);
+      SCM tag = ly_caar (s);
+      SCM arg = ly_cadar (s);
 
-      if (gh_string_p (arg))
+      if (ly_string_p (arg))
        arg = scm_string_to_symbol (arg);
       
       if (ly_symbol2scm ("consists") == tag)
-       l1 = gh_cons (arg, l1);
+       l1 = scm_cons (arg, l1);
       else if (ly_symbol2scm ("consists-end") == tag)
-       l2 = gh_cons (arg, l2);
+       l2 = scm_cons (arg, l2);
       else if (ly_symbol2scm ("remove") == tag)
        {
          l1 = scm_delete_x (arg, l1);
@@ -265,11 +265,11 @@ Context_def::get_translator_names (SCM user_mod) const
 SCM
 filter_performers (SCM l)
 {
-  for (SCM *tail = &l; gh_pair_p (*tail); tail = SCM_CDRLOC (*tail))
+  for (SCM *tail = &l; ly_pair_p (*tail); tail = SCM_CDRLOC (*tail))
     {
-      if (dynamic_cast<Performer*> (unsmob_translator (gh_car (*tail))))
+      if (dynamic_cast<Performer*> (unsmob_translator (ly_car (*tail))))
        {
-         *tail = gh_cdr (*tail);
+         *tail = ly_cdr (*tail);
        }
     }
   return l;
@@ -279,11 +279,11 @@ filter_performers (SCM l)
 SCM
 filter_engravers (SCM l)
 {
-  for (SCM *tail = &l; gh_pair_p (*tail) ; tail = SCM_CDRLOC (*tail))
+  for (SCM *tail = &l; ly_pair_p (*tail) ; tail = SCM_CDRLOC (*tail))
     {
-      if (dynamic_cast<Engraver*> (unsmob_translator (gh_car (*tail))))
+      if (dynamic_cast<Engraver*> (unsmob_translator (ly_car (*tail))))
        {
-         *tail = gh_cdr (*tail);
+         *tail = ly_cdr (*tail);
        }
     }
   return l;
@@ -356,16 +356,16 @@ Context_def::to_alist () const
 {
   SCM l = SCM_EOL;
 
-  l = gh_cons (gh_cons (ly_symbol2scm ("consists"),
+  l = scm_cons (scm_cons (ly_symbol2scm ("consists"),
                        get_translator_names (SCM_EOL)), l);
-  l = gh_cons (gh_cons (ly_symbol2scm ("description"),  description_), l);
-  l = gh_cons (gh_cons (ly_symbol2scm ("aliases"),  context_aliases_), l);
-  l = gh_cons (gh_cons (ly_symbol2scm ("accepts"),  get_accepted (SCM_EOL)), l);
-  l = gh_cons (gh_cons (ly_symbol2scm ("property-ops"),  property_ops_), l);
-  l = gh_cons (gh_cons (ly_symbol2scm ("context-name"),  context_name_), l);
-
-  if (gh_symbol_p (translator_group_type_))
-    l = gh_cons (gh_cons (ly_symbol2scm ("group-type"),  translator_group_type_), l);    
+  l = scm_cons (scm_cons (ly_symbol2scm ("description"),  description_), l);
+  l = scm_cons (scm_cons (ly_symbol2scm ("aliases"),  context_aliases_), l);
+  l = scm_cons (scm_cons (ly_symbol2scm ("accepts"),  get_accepted (SCM_EOL)), l);
+  l = scm_cons (scm_cons (ly_symbol2scm ("property-ops"),  property_ops_), l);
+  l = scm_cons (scm_cons (ly_symbol2scm ("context-name"),  context_name_), l);
+
+  if (ly_symbol_p (translator_group_type_))
+    l = scm_cons (scm_cons (ly_symbol2scm ("group-type"),  translator_group_type_), l);    
 
   return l;  
 }
index c11c266162168f8a1045cf69ba0feb03ba862f3b..aa914c68a4311ccc1c5b425d3a6669fdf64691f4 100644 (file)
@@ -42,8 +42,8 @@ LY_DEFINE (ly_context_pushpop_property, "ly:context-pushpop-property",
 {
   Context *tg = unsmob_context (context);
   SCM_ASSERT_TYPE (tg, context, SCM_ARG1, __FUNCTION__, "context");
-  SCM_ASSERT_TYPE (gh_symbol_p (grob), grob, SCM_ARG2, __FUNCTION__, "symbol");
-  SCM_ASSERT_TYPE (gh_symbol_p (eltprop), eltprop, SCM_ARG3, __FUNCTION__, "symbol");
+  SCM_ASSERT_TYPE (ly_symbol_p (grob), grob, SCM_ARG2, __FUNCTION__, "symbol");
+  SCM_ASSERT_TYPE (ly_symbol_p (eltprop), eltprop, SCM_ARG3, __FUNCTION__, "symbol");
 
   execute_pushpop_property (tg, grob, eltprop, val);
 
@@ -57,7 +57,7 @@ LY_DEFINE (ly_context_property, "ly:context-property",
   Context *t = unsmob_context (c);
   Context * tr= (t);
   SCM_ASSERT_TYPE (tr, c, SCM_ARG1, __FUNCTION__, "Translator group");
-  SCM_ASSERT_TYPE (gh_symbol_p (name), name, SCM_ARG2, __FUNCTION__, "symbol");
+  SCM_ASSERT_TYPE (ly_symbol_p (name), name, SCM_ARG2, __FUNCTION__, "symbol");
 
   return tr->internal_get_property (name);
 }
@@ -69,7 +69,7 @@ LY_DEFINE (ly_context_set_property, "ly:context-set-property!",
 {
   Context *tr = unsmob_context (context);
   SCM_ASSERT_TYPE (tr, context, SCM_ARG1, __FUNCTION__, "Context");
-  SCM_ASSERT_TYPE (gh_symbol_p (name), name, SCM_ARG2, __FUNCTION__, "symbol");
+  SCM_ASSERT_TYPE (ly_symbol_p (name), name, SCM_ARG2, __FUNCTION__, "symbol");
 
   tr->internal_set_property (name, val);
 
@@ -83,7 +83,7 @@ LY_DEFINE (ly_context_property_where_defined, "ly:context-property-where-defined
 {
   Context *tr = unsmob_context (context);
   SCM_ASSERT_TYPE (tr, context, SCM_ARG1, __FUNCTION__, "Context");
-  SCM_ASSERT_TYPE (gh_symbol_p (name), name, SCM_ARG2, __FUNCTION__, "symbol");
+  SCM_ASSERT_TYPE (ly_symbol_p (name), name, SCM_ARG2, __FUNCTION__, "symbol");
 
   tr = tr->where_defined (name);
   if (tr)
@@ -98,7 +98,7 @@ LY_DEFINE (ly_unset_context_property, "ly:context-unset-property", 2, 0, 0,
 {
   Context *tr = unsmob_context (context);
   SCM_ASSERT_TYPE (tr, context, SCM_ARG1, __FUNCTION__, "Context");
-  SCM_ASSERT_TYPE (gh_symbol_p (name), name, SCM_ARG2, __FUNCTION__, "symbol");
+  SCM_ASSERT_TYPE (ly_symbol_p (name), name, SCM_ARG2, __FUNCTION__, "symbol");
 
   tr->unset_property (name);
   return SCM_UNSPECIFIED;
@@ -126,7 +126,7 @@ LY_DEFINE (ly_context_find, "ly:context-find",
 {
   Context *tr = unsmob_context (context);
   SCM_ASSERT_TYPE (tr, context, SCM_ARG1, __FUNCTION__, "context");
-  SCM_ASSERT_TYPE (gh_symbol_p (name), name, SCM_ARG2, __FUNCTION__, "symbol");
+  SCM_ASSERT_TYPE (ly_symbol_p (name), name, SCM_ARG2, __FUNCTION__, "symbol");
   
   while (tr)
     {
index 2f7445fd6760fa34bf96b8f65f93df2eab471d30..f5d678115670df50a5f3bef1d1c7b28497c958c9 100644 (file)
@@ -25,7 +25,7 @@ Context_specced_music_iterator::construct_children ()
 
   String c_id;
   SCM ci = get_music ()->get_property ("context-id");
-  if (gh_string_p (ci))
+  if (ly_string_p (ci))
     c_id = ly_scm2string (ci);
   SCM ops = get_music ()->get_property ("property-operations");
   
index d891aac163880ce72c92e3cef74edf9fa90be975..55aac9bb3a21fcdc59b466d43df5a19366181462 100644 (file)
@@ -28,7 +28,7 @@ Context::is_removable () const
 void
 Context::check_removal ()
 {
-  for (SCM p = context_list_; gh_pair_p (p); p = gh_cdr (p))
+  for (SCM p = context_list_; ly_pair_p (p); p = ly_cdr (p))
     {
       Context *trg =  unsmob_context (ly_car (p));
 
@@ -56,8 +56,8 @@ void
 Context::add_context (Context*t)
 {
   SCM ts = t->self_scm ();
-  context_list_ = gh_append2 (context_list_,
-                             gh_cons (ts, SCM_EOL));
+  context_list_ = ly_append2 (context_list_,
+                             scm_cons (ts, SCM_EOL));
   
   t->daddy_context_ = this;
   if (!t->init_)
@@ -102,7 +102,7 @@ Context::find_context_below (SCM n, String id)
     return this;
 
   Context* r = 0;
-  for (SCM p = context_list_; !r && gh_pair_p (p); p = ly_cdr (p))
+  for (SCM p = context_list_; !r && ly_pair_p (p); p = ly_cdr (p))
     {
       Context *  t = unsmob_context (ly_car (p));
       
@@ -191,7 +191,7 @@ Context::find_create_context (SCM n, String id,
 SCM
 default_child_context_name (Context const *tg)
 {
-  return gh_pair_p (tg->accepts_list_)
+  return ly_pair_p (tg->accepts_list_)
     ? ly_car (scm_last_pair (tg->accepts_list_))
     : SCM_EOL;
 }
@@ -200,7 +200,7 @@ default_child_context_name (Context const *tg)
 bool
 Context::is_bottom_context () const
 {
-  return !gh_symbol_p (default_child_context_name (this));
+  return !ly_symbol_p (default_child_context_name (this));
 }
 
 Context*
@@ -261,7 +261,7 @@ bool
 Context::is_alias (SCM sym) const
 {
   if (sym == ly_symbol2scm ("Bottom")
-      && !gh_pair_p (accepts_list_))
+      && !ly_pair_p (accepts_list_))
     return true;
   if (sym == unsmob_context_def (definition_)->get_context_name ())
     return true;
@@ -325,9 +325,9 @@ find_context_below (Context * where,
   
   Context * found = 0;
   for (SCM s = where->context_list_;
-       !found && gh_pair_p (s); s = gh_cdr (s))
+       !found && ly_pair_p (s); s = ly_cdr (s))
     {
-      Context * tr = unsmob_context (gh_car (s));
+      Context * tr = unsmob_context (ly_car (s));
 
       found = find_context_below (tr, type, id);
     }
index 7b1a59da1d4dc44d393a61117bdebdd462c16da3..2b22ce5c6ab94dd371245b369285762ab7f335d9 100644 (file)
@@ -97,7 +97,7 @@ Custos_engraver::acknowledge_grob (Grob_info info)
 void
 Custos_engraver::process_acknowledged_grobs ()
 {
-  if (gh_string_p (get_property ("whichBar")))
+  if (ly_string_p (get_property ("whichBar")))
     custos_permitted = true;
   
   if (custos_permitted)
@@ -108,12 +108,12 @@ Custos_engraver::process_acknowledged_grobs ()
 
          int p = pitches_[i].steps ();
          SCM c0 = get_property ("middleCPosition");
-         if (gh_number_p (c0))
-           p += gh_scm2int (c0);
+         if (ly_number_p (c0))
+           p += ly_scm2int (c0);
 
          
          c->set_property ("staff-position",
-                               gh_int2scm (p));
+                               scm_int2num (p));
          
        }
 
index db442a3dee226963ca02dbc913208085d202c8cc..20815715bf9f6d386bcf51e67f2bafea4864f137 100644 (file)
@@ -34,7 +34,7 @@ Custos::print (SCM smob)
 
   SCM scm_style = me->get_property ("style");
   String style;
-  if (gh_symbol_p (scm_style))
+  if (ly_symbol_p (scm_style))
     {
       style = ly_symbol2string (scm_style);
     }
index 19fb77b0f687fe340a40092d9e13148854be0d9d..b45012c3bec2507e35b11c0015d954d5c5625e49 100644 (file)
@@ -23,6 +23,6 @@ get_grob_direction (Grob*me)
 void
 set_grob_direction (Grob*me, Direction d) 
 {
-  SCM sd = gh_int2scm (d);
+  SCM sd = scm_int2num (d);
   me->set_property ("direction", sd);
 }
index 2d49465eb9b4df0cd9cad142fded8fd6cc1b1dff..f3669231c82d1e764cd548cdb1d48346b652b01b 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) gh_scm2int (axis);
+  Axis a = (Axis) ly_scm2int (axis);
   assert (a == Y_AXIS);
   me = me->get_parent (X_AXIS);
 
@@ -39,7 +39,7 @@ Dot_column::force_shift_callback (SCM element_smob, SCM axis)
   
       do_shifts (me);
     }
-  return gh_double2scm (0.0);
+  return scm_make_real (0.0);
 }
 
 MAKE_SCHEME_CALLBACK (Dot_column,side_position, 2);
@@ -47,7 +47,7 @@ SCM
 Dot_column::side_position (SCM element_smob, SCM axis)
 {
   Grob *me = unsmob_grob (element_smob);
-  Axis a = (Axis) gh_scm2int (axis);
+  Axis a = (Axis) ly_scm2int (axis);
   assert (a == X_AXIS);
 
   Grob * stem = unsmob_grob (me->get_property ("stem"));
index 8fcd15e8ed6bf0eabbbff18a7b9685e10e052df5..24ecb4aa4cc0cc4523ab43bd7af1407de2a2ca86 100644 (file)
@@ -24,7 +24,7 @@ Dots::print (SCM d)
   
   SCM c = sc->get_property ("dot-count");
 
-  if (gh_number_p (c))
+  if (ly_number_p (c))
     {
       Stencil d = Font_interface::get_default_font (sc)->find_by_name (String ("dots-dot"));
       Real dw = d.extent (X_AXIS).length ();
@@ -40,7 +40,7 @@ Dots::print (SCM d)
       mol = Lookup::blank (Box (Interval (0,0),
                                Interval (0,0)));
   
-      for (int i = gh_scm2int (c); i--;)
+      for (int i = ly_scm2int (c); i--;)
        {
          d.translate_axis (2*dw,X_AXIS);
          mol.add_at_edge (X_AXIS, RIGHT, d, dw, 0);
index fd0464e687291a04c542f5cb88259a093b9a701f..528e07624ad6284f4621ddcd4397b0b0151c1d4c 100644 (file)
@@ -67,7 +67,7 @@ Drum_notes_engraver::process_music ()
       
       Duration dur = *unsmob_duration (ev->get_property ("duration"));
 
-      note->set_property ("duration-log", gh_int2scm (dur.duration_log ()));
+      note->set_property ("duration-log", scm_int2num (dur.duration_log ()));
 
       if (dur.dot_count ())
        {
@@ -76,7 +76,7 @@ Drum_notes_engraver::process_music ()
          
          if (dur.dot_count ()
              != robust_scm2int (d->get_property ("dot-count"), 0))
-           d->set_property ("dot-count", gh_int2scm (dur.dot_count ()));
+           d->set_property ("dot-count", scm_int2num (dur.dot_count ()));
 
          d->set_parent (note, Y_AXIS);
          announce_grob (d, SCM_EOL);
@@ -90,18 +90,18 @@ Drum_notes_engraver::process_music ()
       if (scm_hash_table_p (tab) == SCM_BOOL_T)
        defn = scm_hashq_ref (tab, drum_type, SCM_EOL);
       
-      if (gh_pair_p (defn))
+      if (ly_pair_p (defn))
        {
-         SCM pos = gh_caddr (defn);
-         SCM style =gh_car (defn);
-         SCM script = gh_cadr (defn);
+         SCM pos = ly_caddr (defn);
+         SCM style =ly_car (defn);
+         SCM script = ly_cadr (defn);
          
          if (scm_integer_p (pos) == SCM_BOOL_T)
            note->set_property ("staff-position", pos);
-         if (gh_symbol_p (style))
+         if (ly_symbol_p (style))
            note->set_property ("style", style);
 
-         if (gh_string_p (script))
+         if (ly_string_p (script))
            {
              Item *p  = make_item ("Script");
              SCM desc  = SCM_EOL;
index e5888fcfbcfef34e1e65f464949c0d610518b7b5..50b8c3f9774b4892febb4eff48bdfed2b8de2a1c 100644 (file)
@@ -39,7 +39,7 @@ Drum_note_performer::create_audio_elements ()
       SCM sym = n->get_property ("drum-type");
       SCM defn = SCM_EOL;
 
-      if (gh_symbol_p (sym)
+      if (ly_symbol_p (sym)
          &&  (scm_hash_table_p (tab) == SCM_BOOL_T))
        defn = scm_hashq_ref (tab, sym, SCM_EOL);
       
index 39fe26ca397f482c892fe694bf621e200d422be6..876bfbe5c3997fa69737faa9eb5bd6f6a8f29bfd 100644 (file)
@@ -166,29 +166,29 @@ LY_DEFINE (make_duration, "ly:make-duration",
     {
       SCM_ASSERT_TYPE (scm_integer_p (dotcount) == SCM_BOOL_T,
                       dotcount, SCM_ARG2, __FUNCTION__, "integer");
-      dots = gh_scm2int (dotcount);
+      dots = ly_scm2int (dotcount);
     }
 
   bool compress = false;
   if (num != SCM_UNDEFINED)
     {
-      SCM_ASSERT_TYPE (gh_number_p (num), length, SCM_ARG3, __FUNCTION__, "integer");
+      SCM_ASSERT_TYPE (ly_number_p (num), length, SCM_ARG3, __FUNCTION__, "integer");
       compress = true;
     }
   else
-    num = gh_int2scm (1);
+    num = scm_int2num (1);
 
   if (den != SCM_UNDEFINED)
     {
-      SCM_ASSERT_TYPE (gh_number_p (den), length, SCM_ARG4, __FUNCTION__, "integer");
+      SCM_ASSERT_TYPE (ly_number_p (den), length, SCM_ARG4, __FUNCTION__, "integer");
       compress = true;
     }
   else
-    den = gh_int2scm (1);
+    den = scm_int2num (1);
 
-  Duration p (gh_scm2int (length), dots);
+  Duration p (ly_scm2int (length), dots);
   if (compress)
-    p = p.compressed (Rational (gh_scm2int (num), gh_scm2int (den)));
+    p = p.compressed (Rational (ly_scm2int (num), ly_scm2int (den)));
 
   return p.smobbed_copy ();
 }
@@ -198,7 +198,7 @@ LY_DEFINE (duration_log, "ly:duration-log",
          "Extract the duration log from @var{dur}")
 {
   SCM_ASSERT_TYPE (unsmob_duration (dur), dur, SCM_ARG1, __FUNCTION__, "duration");
-  return gh_int2scm (unsmob_duration (dur)->duration_log ());
+  return scm_int2num (unsmob_duration (dur)->duration_log ());
 }
 
 LY_DEFINE (dot_count_log, "ly:duration-dot-count", 1, 0, 0, (SCM dur),
@@ -206,7 +206,7 @@ LY_DEFINE (dot_count_log, "ly:duration-dot-count", 1, 0, 0, (SCM dur),
 )
 {
   SCM_ASSERT_TYPE (unsmob_duration (dur), dur, SCM_ARG1, __FUNCTION__, "duration");
-  return gh_int2scm (unsmob_duration (dur)->dot_count ());
+  return scm_int2num (unsmob_duration (dur)->dot_count ());
 }
 
 
@@ -214,9 +214,9 @@ LY_DEFINE (ly_intlog2, "ly:intlog2",
           1, 0, 0, (SCM d),
          "The 2-logarithm of 1/@var{d}.")
 {
-  SCM_ASSERT_TYPE (gh_number_p (d), d, SCM_ARG1, __FUNCTION__, "integer");
-  int log = intlog2 (gh_scm2int (d));
-  return gh_int2scm (log);
+  SCM_ASSERT_TYPE (ly_number_p (d), d, SCM_ARG1, __FUNCTION__, "integer");
+  int log = intlog2 (ly_scm2int (d));
+  return scm_int2num (log);
 }
 
 LY_DEFINE (compression_factor, "ly:duration-factor",
@@ -225,7 +225,7 @@ LY_DEFINE (compression_factor, "ly:duration-factor",
 {
   SCM_ASSERT_TYPE (unsmob_duration (dur), dur, SCM_ARG1, __FUNCTION__, "duration");
   Rational r = unsmob_duration (dur)->factor ();
-  return gh_cons (gh_int2scm (r.num ()), gh_int2scm (r.den ()));
+  return scm_cons (scm_int2num (r.num ()), scm_int2num (r.den ()));
 }
 
 int
index 9ea571da32e643b017e95d89693267469ff2f2fd..1e0f8768e7f2fca5c2516972bf736757483b7945 100644 (file)
@@ -220,11 +220,11 @@ Dynamic_engraver::process_music ()
            start_type = "crescendo";
          
          SCM s = get_property ((start_type + "Spanner").to_str0 ());
-         if (!gh_symbol_p (s) || s == ly_symbol2scm ("hairpin"))
+         if (!ly_symbol_p (s) || s == ly_symbol2scm ("hairpin"))
            {
              cresc_  = make_spanner ("Hairpin");
              cresc_->set_property ("grow-direction",
-                                          gh_int2scm ((start_type == "crescendo")
+                                          scm_int2num ((start_type == "crescendo")
                                                       ? BIGGER : SMALLER));
              
            }
@@ -245,10 +245,10 @@ Dynamic_engraver::process_music ()
              /*
                FIXME: use get_markup () to check type.
              */
-             if (gh_string_p (s) || gh_pair_p (s))
+             if (ly_string_p (s) || ly_pair_p (s))
                {
                  cresc_->set_property ("edge-text",
-                                            gh_cons (s, scm_makfrom0str ("")));
+                                            scm_cons (s, scm_makfrom0str ("")));
                  daddy_context_->set_property ((start_type + "Text").to_str0 (),
                                                SCM_EOL);
                }
@@ -400,8 +400,8 @@ Dynamic_engraver::acknowledge_grob (Grob_info i)
       if (script_ && !script_->get_parent (X_AXIS))
        {
          SCM head = scm_last_pair (i.grob_->get_property ("note-heads"));
-         if (gh_pair_p (head))
-           script_->set_parent (unsmob_grob (gh_car (head)),  X_AXIS);
+         if (ly_pair_p (head))
+           script_->set_parent (unsmob_grob (ly_car (head)),  X_AXIS);
        }
       
     }
@@ -414,8 +414,8 @@ Dynamic_engraver::acknowledge_grob (Grob_info i)
 
        DynamicText doesn't really have a script-priority field.
        */
-      if (gh_number_p (p)
-         && gh_scm2int (p) < gh_scm2int (script_->get_property ("script-priority")))
+      if (ly_number_p (p)
+         && ly_scm2int (p) < ly_scm2int (script_->get_property ("script-priority")))
        {
          Side_position_interface::add_support (line_spanner_, i.grob_);
 
index 97641a729769059d72083958339cff5725d1a8f7..4505dbd024a1ce15e785b2a7da9d57235ea42f4d 100644 (file)
@@ -46,10 +46,10 @@ Dynamic_performer::create_audio_elements ()
       SCM proc = get_property ("dynamicAbsoluteVolumeFunction");
 
       SCM svolume  = SCM_EOL;
-      if (gh_procedure_p (proc))
+      if (ly_procedure_p (proc))
        {
          // urg
-         svolume = gh_call1 (proc, script_req_->get_property ("text"));
+         svolume = scm_call_1 (proc, script_req_->get_property ("text"));
        }
 
       Real volume = robust_scm2double (svolume, 0.5); 
@@ -59,13 +59,13 @@ Dynamic_performer::create_audio_elements ()
        */
       SCM min = get_property ("midiMinimumVolume");
       SCM max = get_property ("midiMaximumVolume");
-      if (gh_number_p (min) || gh_number_p (max))
+      if (ly_number_p (min) || ly_number_p (max))
        {
          Interval iv (0, 1);
-         if (gh_number_p (min))
-           iv[MIN] = gh_scm2double (min);
-         if (gh_number_p (max))
-           iv[MAX] = gh_scm2double (max);
+         if (ly_number_p (min))
+           iv[MIN] = ly_scm2double (min);
+         if (ly_number_p (max))
+           iv[MAX] = ly_scm2double (max);
          volume = iv[MIN] + iv.length () * volume;
        }
       else
@@ -75,17 +75,17 @@ Dynamic_performer::create_audio_elements ()
          */
          SCM s = get_property ("midiInstrument");
          
-         if (!gh_string_p (s))
+         if (!ly_string_p (s))
            s = get_property ("instrument");
          
-         if (!gh_string_p (s))
+         if (!ly_string_p (s))
            s = scm_makfrom0str ("piano");
          
          
          SCM eq = get_property ("instrumentEqualizer");
-         if (gh_procedure_p (eq))
+         if (ly_procedure_p (eq))
            {
-             s = gh_call1 (eq, s);
+             s = scm_call_1 (eq, s);
            }
 
          if (is_number_pair (s))
index 58cd338d1f216213acf44ef2277beb866a7dea15..dc51fd495f52acbd7a9e365c0a8a4a5207788c3b 100644 (file)
@@ -44,7 +44,7 @@ Engraver_group_engraver::acknowledge_grobs ()
       
       SCM meta = info.grob_->internal_get_property (meta_sym);
       SCM nm = scm_assoc (name_sym, meta);
-      if (gh_pair_p (nm))
+      if (ly_pair_p (nm))
        nm = ly_cdr (nm);
       else
        {
@@ -63,11 +63,11 @@ Engraver_group_engraver::acknowledge_grobs ()
       SCM acklist = scm_hashq_ref (tab, nm, SCM_UNDEFINED);
       if (acklist == SCM_BOOL_F)
        {
-         acklist = find_acknowledge_engravers (gh_cons (self_scm (), get_simple_trans_list ()), meta);
+         acklist = find_acknowledge_engravers (scm_cons (self_scm (), get_simple_trans_list ()), meta);
          scm_hashq_set_x (tab, nm, acklist);
        }
 
-      for (SCM p = acklist; gh_pair_p (p); p = ly_cdr (p))
+      for (SCM p = acklist; ly_pair_p (p); p = ly_cdr (p))
        {
          Translator * t = unsmob_translator (ly_car (p));
          Engraver * eng = dynamic_cast<Engraver*> (t);
@@ -100,7 +100,7 @@ Engraver_group_engraver::do_announces ()
 void
 Engraver_group_engraver::initialize ()
 {
-  SCM tab = scm_make_vector (gh_int2scm (61), SCM_BOOL_F);
+  SCM tab = scm_make_vector (scm_int2num (61), SCM_BOOL_F);
   daddy_context_->set_property ("acknowledgeHashTable", tab);
 
   Translator_group::initialize ();
@@ -125,7 +125,7 @@ bool
 engraver_valid (Translator*tr, SCM ifaces)
 {
   SCM ack_ifs = scm_assoc (ly_symbol2scm ("interfaces-acked"), tr->translator_description ());
-  ack_ifs = gh_cdr (ack_ifs);
+  ack_ifs = ly_cdr (ack_ifs);
   for (SCM s = ifaces; ly_pair_p (s); s = ly_cdr (s))
     if (scm_c_memq (ly_car (s), ack_ifs) != SCM_BOOL_F)
       return true;
@@ -137,7 +137,7 @@ engraver_valid (Translator*tr, SCM ifaces)
 SCM
 find_acknowledge_engravers (SCM gravlist, SCM meta_alist)
 {
-  SCM ifaces = gh_cdr (scm_assoc (ly_symbol2scm ("interfaces"), meta_alist));
+  SCM ifaces = ly_cdr (scm_assoc (ly_symbol2scm ("interfaces"), meta_alist));
 
   SCM l = SCM_EOL;
   for (SCM s = gravlist; ly_pair_p (s);  s = ly_cdr (s))
@@ -168,10 +168,10 @@ recurse_down_engravers (Context * c, Engraver_method ptr, bool context_first)
       (tg->*ptr) ();
     }
 
-  for (SCM s = c->context_list_ ; gh_pair_p (s);
-       s =gh_cdr (s))
+  for (SCM s = c->context_list_ ; ly_pair_p (s);
+       s =ly_cdr (s))
     {
-      recurse_down_engravers (unsmob_context (gh_car (s)), ptr, context_first);
+      recurse_down_engravers (unsmob_context (ly_car (s)), ptr, context_first);
     }
 
   if (context_first)
@@ -186,7 +186,7 @@ recurse_down_engravers (Context * c, Engraver_method ptr, bool context_first)
 void
 engraver_each (SCM list, Engraver_method method)
 {
-  for (SCM p = list; gh_pair_p (p); p = ly_cdr (p))
+  for (SCM p = list; ly_pair_p (p); p = ly_cdr (p))
     {
       Engraver * e = dynamic_cast<Engraver*>(unsmob_translator (ly_car (p)));
       if (e)
index 08bb8fff89f641b1072c7873cb6099fd1f15ca00..4c293aa329d0a5c57ad21bd2ff7f17cbeffb315a 100644 (file)
@@ -47,7 +47,7 @@ Event_chord_iterator::process (Moment m)
   if (last_processed_mom_ < Moment (0))
     {
       for (SCM s = dynamic_cast<Music_sequence *> (get_music ())->music_list ();
-          gh_pair_p (s);  s = ly_cdr (s))
+          ly_pair_p (s);  s = ly_cdr (s))
        {
          Music *mus = unsmob_music (ly_car (s));
 
index baa5ad15c91bc6ff13310ea057dda04f2d9a9f0a..8077fec8aef11258bd737610fc8da51366fb1964 100644 (file)
@@ -63,10 +63,10 @@ Event::to_relative_octave (Pitch last)
       new_pit = new_pit.to_relative_octave (last);
 
       SCM check = get_property ("absolute-octave");
-      if (gh_number_p (check) &&
-         new_pit.get_octave () != gh_scm2int (check))
+      if (ly_number_p (check) &&
+         new_pit.get_octave () != ly_scm2int (check))
        {
-         Pitch expected_pit (gh_scm2int (check),
+         Pitch expected_pit (ly_scm2int (check),
                              new_pit.get_notename (),
                              new_pit.get_alteration ());
          origin ()->warning (_f ("octave check failed; expected %s, found: %s",
@@ -142,32 +142,32 @@ LY_DEFINE (ly_transpose_key_alist, "ly:transpose-key-alist",
   SCM newlist = SCM_EOL;
   Pitch *p = unsmob_pitch (pit);
   
-  for (SCM s = l; gh_pair_p (s); s = ly_cdr (s))
+  for (SCM s = l; ly_pair_p (s); s = ly_cdr (s))
     {
       SCM key = ly_caar (s);
       SCM alter = ly_cdar (s);
-      if (gh_pair_p (key))
+      if (ly_pair_p (key))
        {
-         Pitch orig (gh_scm2int (ly_car (key)),
-                     gh_scm2int (ly_cdr (key)),
-                     gh_scm2int (alter));
+         Pitch orig (ly_scm2int (ly_car (key)),
+                     ly_scm2int (ly_cdr (key)),
+                     ly_scm2int (alter));
 
          orig =orig.transposed (*p);
 
-         SCM key = gh_cons (scm_int2num (orig.get_octave ()),
+         SCM key = scm_cons (scm_int2num (orig.get_octave ()),
                             scm_int2num (orig.get_notename ()));
 
-         newlist = gh_cons (gh_cons (key, scm_int2num (orig.get_alteration ())),
+         newlist = scm_cons (scm_cons (key, scm_int2num (orig.get_alteration ())),
                             newlist);
        }
-      else if (gh_number_p (key))
+      else if (ly_number_p (key))
        {
-         Pitch orig (0, gh_scm2int (key), gh_scm2int (alter));
+         Pitch orig (0, ly_scm2int (key), ly_scm2int (alter));
          orig = orig.transposed (*p);
 
          key =scm_int2num (orig.get_notename ());
          alter = scm_int2num (orig.get_alteration ());
-         newlist = gh_cons (gh_cons (key, alter), newlist);
+         newlist = scm_cons (scm_cons (key, alter), newlist);
        }
     }
   return scm_reverse_x (newlist, SCM_EOL);
@@ -188,14 +188,14 @@ bool
 alist_equal_p (SCM a, SCM b)
 {
   for (SCM s = a;
-       gh_pair_p (s); s = ly_cdr (s))
+       ly_pair_p (s); s = ly_cdr (s))
     {
       SCM key = ly_caar (s);
       SCM val = ly_cdar (s);
       SCM l = scm_assoc (key, b);
 
       if (l == SCM_BOOL_F
-         || !gh_equal_p ( ly_cdr (l), val))
+         || !ly_equal_p ( ly_cdr (l), val))
 
        return false;
     }
index e65bc5d5bdf8de12d9de57cba5f1a0b314b754e1..cc2939a030fd151c96b6da39fd58acb3cacc9e36 100644 (file)
@@ -121,9 +121,9 @@ completize_extender (Spanner* sp)
   if (!sp->get_bound (RIGHT))
     {
       SCM heads = sp->get_property ("heads");
-      if (gh_pair_p (heads))
+      if (ly_pair_p (heads))
        {
-         Item* it = dynamic_cast<Item*> (unsmob_grob (gh_car (heads)));
+         Item* it = dynamic_cast<Item*> (unsmob_grob (ly_car (heads)));
          if (it)
            sp->set_bound (RIGHT, it);
        }
index b7114de9eaab23a7bd8c79629fa52f2e475874e4..8b2b364df93639e3019fad7dcf642ee3e495f547 100644 (file)
@@ -75,7 +75,7 @@ Figured_bass_engraver::process_music ()
   else if (figures_.size ())
     {
       SCM proc = get_property ("bassFigureFormatFunction");
-      if (gh_procedure_p (proc)) 
+      if (ly_procedure_p (proc)) 
        {
          SCM l = SCM_EOL;
          SCM * t = &l;
index c87aab6b31b27689864d53421aa4296e5c2494f1..a536f77390d7bfd61a1decad32bf2bf00e5a3b06 100644 (file)
@@ -105,25 +105,25 @@ Fingering_engraver::make_script (Direction d, Music *r, int i)
   // Hmm
   int priority = 200;
   SCM s = fingering->get_property ("script-priority");
-  if (gh_number_p (s))
-    priority = gh_scm2int (s);
+  if (ly_number_p (s))
+    priority = ly_scm2int (s);
   
   /* See script-engraver.cc */
   priority += i;
 
-  fingering->set_property ("script-priority", gh_int2scm (priority));
+  fingering->set_property ("script-priority", scm_int2num (priority));
 
 
   if (!is_direction (fingering->get_property ("direction")))
     {
       if (d)
-       fingering->set_property ("direction", gh_int2scm (d));
+       fingering->set_property ("direction", scm_int2num (d));
       else
-       fingering->set_property ("direction",  gh_int2scm (RIGHT));
+       fingering->set_property ("direction",  scm_int2num (RIGHT));
     }
 
   SCM dig =  r->get_property ("digit");
-  fingering->set_property ("text", scm_number_to_string (dig, gh_int2scm (10)));
+  fingering->set_property ("text", scm_number_to_string (dig, scm_int2num (10)));
 
   announce_grob (fingering, r->self_scm ());
   fingerings_.push (fingering);
index 578824b0847792b1a07de067eb313c242720f707..18a91d8b8c4902877b8783fa50343c19027d3a1f 100644 (file)
@@ -42,7 +42,7 @@ Font_metric::find_by_name (String s) const
     {
       expr = scm_list_3 (ly_symbol2scm ("char"),
                         self_scm (),
-                        gh_int2scm (index_to_ascii (idx)));
+                        scm_int2num (index_to_ascii (idx)));
       b = get_indexed_char (idx);
     }
   
@@ -139,7 +139,7 @@ LY_DEFINE (ly_find_glyph_by_name, "ly:find-glyph-by-name",
 {
   Font_metric *fm = unsmob_metrics (font);
   SCM_ASSERT_TYPE (fm, font, SCM_ARG1, __FUNCTION__, "font-metric");
-  SCM_ASSERT_TYPE (gh_string_p (name), name, SCM_ARG2, __FUNCTION__, "string");
+  SCM_ASSERT_TYPE (ly_string_p (name), name, SCM_ARG2, __FUNCTION__, "string");
 
   Stencil m = fm->find_by_name (ly_scm2string (name));
 
@@ -155,9 +155,9 @@ LY_DEFINE (ly_get_glyph, "ly:get-glyph",
 {
   Font_metric *fm = unsmob_metrics (font);
   SCM_ASSERT_TYPE (fm, font, SCM_ARG1, __FUNCTION__, "font-metric");
-  SCM_ASSERT_TYPE (gh_number_p (index), index, SCM_ARG2, __FUNCTION__, "number");
+  SCM_ASSERT_TYPE (ly_number_p (index), index, SCM_ARG2, __FUNCTION__, "number");
 
-  return fm->get_ascii_char_stencil (gh_scm2int (index)).smobbed_copy ();
+  return fm->get_ascii_char_stencil (ly_scm2int (index)).smobbed_copy ();
 }
 
 LY_DEFINE (ly_text_dimension,"ly:text-dimension",
@@ -171,11 +171,11 @@ LY_DEFINE (ly_text_dimension,"ly:text-dimension",
   Modified_font_metric*fm = dynamic_cast<Modified_font_metric*>
     (unsmob_metrics (font));
   SCM_ASSERT_TYPE (fm, font, SCM_ARG1, __FUNCTION__, "modified font metric");
-  SCM_ASSERT_TYPE (gh_string_p (text), text, SCM_ARG2, __FUNCTION__, "string");
+  SCM_ASSERT_TYPE (ly_string_p (text), text, SCM_ARG2, __FUNCTION__, "string");
   
   b = fm->text_dimension (ly_scm2string (text));
   
-  return gh_cons (ly_interval2scm (b[X_AXIS]), ly_interval2scm (b[Y_AXIS]));
+  return scm_cons (ly_interval2scm (b[X_AXIS]), ly_interval2scm (b[Y_AXIS]));
 }
 
 LY_DEFINE (ly_font_name,"ly:font-name",
@@ -186,7 +186,7 @@ LY_DEFINE (ly_font_name,"ly:font-name",
 {
   Font_metric *fm = unsmob_metrics (font);
   SCM_ASSERT_TYPE (fm, font, SCM_ARG1, __FUNCTION__, "font-metric");
-  return gh_car (fm->description_);
+  return ly_car (fm->description_);
 }
 
 LY_DEFINE (ly_font_magnification,"ly:font-magnification", 1 , 0, 0,
@@ -196,7 +196,7 @@ LY_DEFINE (ly_font_magnification,"ly:font-magnification", 1 , 0, 0,
 {
   Font_metric *fm = unsmob_metrics (font);
   SCM_ASSERT_TYPE (fm, font, SCM_ARG1, __FUNCTION__, "font-metric");
-  return gh_cdr (fm->description_);
+  return ly_cdr (fm->description_);
 }
 
 LY_DEFINE (ly_font_design_size,"ly:font-design-size", 1 , 0, 0,
@@ -206,7 +206,7 @@ LY_DEFINE (ly_font_design_size,"ly:font-design-size", 1 , 0, 0,
 {
   Font_metric *fm = unsmob_metrics (font);
   SCM_ASSERT_TYPE (fm, font, SCM_ARG1, __FUNCTION__, "font-metric");
-  return gh_double2scm (fm->design_size ());
+  return scm_make_real (fm->design_size ());
 }
 
 
@@ -220,7 +220,7 @@ Font_metric::index_to_ascii (int i) const
 Stencil
 Font_metric::get_ascii_char_stencil (int code) const
 {
-  SCM at = scm_list_2 (ly_symbol2scm ("char"), gh_int2scm (code));
+  SCM at = scm_list_2 (ly_symbol2scm ("char"), scm_int2num (code));
   at = fontify_atom (this, at);
   Box b = get_ascii_char (code);
   return Stencil (b, at);
@@ -229,7 +229,7 @@ Font_metric::get_ascii_char_stencil (int code) const
 Stencil
 Font_metric::get_indexed_char_stencil (int code) const
 {
-  SCM at = scm_list_2 (ly_symbol2scm ("char"), gh_int2scm (code));
+  SCM at = scm_list_2 (ly_symbol2scm ("char"), scm_int2num (code));
   at = fontify_atom (this, at);
   Box b = get_indexed_char (code);
   return Stencil (b, at);
@@ -246,5 +246,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 gh_scm2int (s);
+  return ly_scm2int (s);
 }
index 2c1d7f1ec6c4b642544d58f934ec662d3347a05f..17b2e0cb2bf76f2aa0335b44680f2f38ae98339a 100644 (file)
@@ -34,7 +34,7 @@ LY_DEFINE (ly_paper_get_number, "ly:paper-get-number", 2, 0, 0,
 {
   Paper_def *pap = unsmob_paper (paper);
   SCM_ASSERT_TYPE (pap, paper, SCM_ARG1, __FUNCTION__, "paper definition");
-  return gh_double2scm (pap->get_dimension (name));
+  return scm_make_real (pap->get_dimension (name));
 }
 
 bool
@@ -110,20 +110,20 @@ select_font (Paper_def *paper, SCM chain)
 {
   SCM name = ly_assoc_chain (ly_symbol2scm  ("font-name"), chain);
   
-  if (!gh_pair_p (name) || !gh_string_p (gh_cdr (name)))
+  if (!ly_pair_p (name) || !ly_string_p (ly_cdr (name)))
     {
       SCM fonts = paper->lookup_variable (ly_symbol2scm ("fonts"));
       name = properties_to_font_size_family (fonts, chain);
     }
   else
-    name  = gh_cdr (name);
+    name  = ly_cdr (name);
 
 
-  if (gh_string_p (name))
+  if (ly_string_p (name))
     {
       SCM mag = ly_assoc_chain (ly_symbol2scm ("font-magnification"), chain);
   
-      Real rmag = gh_pair_p (mag) ? robust_scm2double (gh_cdr (mag), 1.0) : 1;
+      Real rmag = ly_pair_p (mag) ? robust_scm2double (ly_cdr (mag), 1.0) : 1;
 
       Font_metric * fm = all_fonts_global->find_font (ly_scm2string (name));
       
@@ -137,11 +137,11 @@ select_font (Paper_def *paper, SCM chain)
       
       SCM font_size = ly_assoc_chain (ly_symbol2scm ("font-size"), chain);
       Real req = 0.0;
-      if (gh_pair_p (font_size))
-       req = gh_scm2double (ly_cdr (font_size));
+      if (ly_pair_p (font_size))
+       req = ly_scm2double (ly_cdr (font_size));
 
       return get_font_by_mag_step (paper, req,
-                                  vec, gh_scm2double (base_size));
+                                  vec, ly_scm2double (base_size));
     }
 
   assert (0);
index 9066bee1f6132c4f8f200d8d19beaaf7158cc83c..f26b17ce4249b178331fa94853de7827a3bc0b27 100644 (file)
@@ -36,12 +36,12 @@ Font_size_engraver::acknowledge_grob (Grob_info gi)
   if (gi.origin_trans_->daddy_context_ != daddy_context_)
     return ;
   
-  if (gh_number_p (sz) && gh_scm2double (sz))
+  if (ly_number_p (sz) && ly_scm2double (sz))
     {
-      Real font_size = gh_scm2double (sz);
+      Real font_size = ly_scm2double (sz);
       
       font_size +=  robust_scm2double (gi.grob_->get_property ("font-size"), 0);
-      gi.grob_->set_property ("font-size", gh_double2scm (font_size));
+      gi.grob_->set_property ("font-size", scm_make_real (font_size));
     }
 }
 
index a7bf47b2df2924dc84165092c3b2df49ce91f6be..492a35e4f79f560a2c4abaed2583ebd9a6fed405 100644 (file)
@@ -21,18 +21,18 @@ Forbid_line_break_engraver::start_translation_timestep ()
   SCM busy = get_property ("busyGrobs");
 
   Moment now = now_mom ();
-  while (gh_pair_p (busy) && unsmob_moment (gh_caar (busy))->main_part_ == now.main_part_)
-    busy = gh_cdr (busy);
+  while (ly_pair_p (busy) && unsmob_moment (ly_caar (busy))->main_part_ == now.main_part_)
+    busy = ly_cdr (busy);
 
   
-  while (gh_pair_p (busy))
+  while (ly_pair_p (busy))
     {
-      Grob *g = unsmob_grob (gh_cdar (busy));
+      Grob *g = unsmob_grob (ly_cdar (busy));
       if (Rhythmic_head::has_interface (g))
        {
          get_score_engraver ()->forbid_breaks ();
        }
-      busy = gh_cdr (busy);
+      busy = ly_cdr (busy);
     }
 }
 
index bb6beb9e8b76f90d0df94a274a961c2ea5b9a1b8..13f387c46db48409f05b56ee3a78160104a248ca 100644 (file)
@@ -23,15 +23,15 @@ void ly_add_function_documentation (SCM func,
   if (!strlen (doc))
     return ; 
     
-  if (!gh_vector_p (doc_hash_table ))
-    doc_hash_table = scm_make_vector (gh_int2scm (59), SCM_EOL);
+  if (!ly_vector_p (doc_hash_table ))
+    doc_hash_table = scm_make_vector (scm_int2num (59), SCM_EOL);
 
   String s = String (" - ") + "LilyPond procedure: " + fname + " " + varlist
     + "\n" + doc ;
 
   scm_set_procedure_property_x (func, ly_symbol2scm ("documentation"),
                                scm_makfrom0str (s.to_str0 ()));
-  SCM entry = gh_cons (scm_makfrom0str (varlist), scm_makfrom0str (doc));
+  SCM entry = scm_cons (scm_makfrom0str (varlist), scm_makfrom0str (doc));
   scm_hashq_set_x (doc_hash_table, ly_symbol2scm (fname), entry);
 }
 
index dbb66d10ef001357461fdbe67cad5acc28889c31..41b073d541c3bde7d1a7ae27ecc693323ee000d7 100644 (file)
@@ -81,8 +81,8 @@ Global_context::now_mom () const
 Score_context*
 Global_context::get_score_context () const
 {
-  return (gh_pair_p (context_list_))
-    ? dynamic_cast<Score_context*> (unsmob_context (gh_car (context_list_)))
+  return (ly_pair_p (context_list_))
+    ? dynamic_cast<Score_context*> (unsmob_context (ly_car (context_list_)))
     : 0;
 }
 
@@ -166,9 +166,9 @@ Global_context::apply_finalizations ()
 {
   SCM lst = get_property ("finalizations");
   set_property ("finalizations" , SCM_EOL); 
-  for (SCM s = lst ; gh_pair_p (s); s = gh_cdr (s))
+  for (SCM s = lst ; ly_pair_p (s); s = ly_cdr (s))
     {
-      scm_primitive_eval (gh_car (s)); // TODO: make safe.
+      scm_primitive_eval (ly_car (s)); // TODO: make safe.
     }
 }
 
index 93192d1a289ad5fc0927f108de501fac7e257e99..32839d2433e1233455f0f81754eea5068f840c15 100644 (file)
@@ -233,9 +233,9 @@ Gourlay_breaking::combine_demerits (Column_x_positions const &prev,
   if (pc->original_)
     {
       SCM pen = pc->get_property ("penalty");
-      if (gh_number_p (pen) && fabs (gh_scm2double (pen)) < 10000)
+      if (ly_number_p (pen) && fabs (ly_scm2double (pen)) < 10000)
        {
-         break_penalties += gh_scm2double (pen);
+         break_penalties += ly_scm2double (pen);
        }
     }
 
index ed88e82defcad3dda86a3fc2b6dfe9af00eeafa8..8e96a11f48865c4575c1289118e800038b8343ff 100644 (file)
@@ -186,7 +186,7 @@ void check_and_fix_all_prefixes (Array<Grob_info> primitives)
     /* all other combinations should be valid (unless I made a
        mistake) */
 
-    primitive->set_property ("prefix-set", gh_int2scm (prefix_set));
+    primitive->set_property ("prefix-set", scm_int2num (prefix_set));
   }
 }
 
@@ -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 = gh_scm2int (primitive->get_property ("prefix-set"));
+    int prefix_set = ly_scm2int (primitive->get_property ("prefix-set"));
 
     if (prefix_set & PES_OR_FLEXA)
       if (!i) // ligature may not start with 2nd head of pes or flexa
@@ -235,7 +235,7 @@ provide_context_info (Array<Grob_info> primitives)
 
     if (prev_primitive)
       prev_primitive->set_property ("context-info",
-                                        gh_int2scm (prev_context_info));
+                                        scm_int2num (prev_context_info));
     prev_primitive = primitive;
     prev_prefix_set = prefix_set;
     prev_context_info = context_info;
@@ -243,7 +243,7 @@ provide_context_info (Array<Grob_info> primitives)
   }
   if (prev_primitive)
     prev_primitive->set_property ("context-info",
-                                      gh_int2scm (prev_context_info));
+                                      scm_int2num (prev_context_info));
 }
 
 void
index 26e7bfbb9245c963e00735686c8108fad171cc1e..4ccc5c0fe8803468ea696b4d36a1aad23f6cadeb 100644 (file)
@@ -24,7 +24,7 @@ Gregorian_ligature::prefixes_to_str (Grob *primitive)
 {
   String str;
   int prefix_set =
-    gh_scm2int (primitive->get_property ("prefix-set"));
+    ly_scm2int (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 cf6ca2327dd0bcc78a6ea7798ac2cc05fc18a5cb..b1f163d807c273a987584af01ec6c9f57ef454c3 100644 (file)
@@ -29,11 +29,11 @@ void add_interface (const char * symbol,
 LY_DEFINE (ly_add_interface, "ly:add-interface", 3,0,0, (SCM a, SCM b, SCM c),
          "Add an interface description.")
 {
-  SCM_ASSERT_TYPE (gh_symbol_p (a), a, SCM_ARG1, __FUNCTION__, "symbol");
-  SCM_ASSERT_TYPE (gh_string_p (b), b, SCM_ARG2, __FUNCTION__, "string");  
-  SCM_ASSERT_TYPE (gh_list_p (c), c, SCM_ARG3, __FUNCTION__, "list of syms");    
-  if (!gh_vector_p (all_ifaces))
-    all_ifaces = scm_make_vector (gh_int2scm (40), SCM_EOL);
+  SCM_ASSERT_TYPE (ly_symbol_p (a), a, SCM_ARG1, __FUNCTION__, "symbol");
+  SCM_ASSERT_TYPE (ly_string_p (b), b, SCM_ARG2, __FUNCTION__, "string");  
+  SCM_ASSERT_TYPE (ly_list_p (c), c, SCM_ARG3, __FUNCTION__, "list of syms");    
+  if (!ly_vector_p (all_ifaces))
+    all_ifaces = scm_make_vector (scm_int2num (40), SCM_EOL);
 
   SCM entry = scm_list_n (a, b, c, SCM_UNDEFINED);
 
@@ -65,18 +65,18 @@ check_interfaces_for_property (Grob const *me, SCM sym)
   SCM ifs = me->get_property ("interfaces");
 
   bool found = false;
-  for (; !found && gh_pair_p (ifs); ifs =gh_cdr (ifs))
+  for (; !found && ly_pair_p (ifs); ifs =ly_cdr (ifs))
     {
-      SCM iface = scm_hashq_ref (all_ifaces , gh_car (ifs), SCM_BOOL_F);
+      SCM iface = scm_hashq_ref (all_ifaces , ly_car (ifs), SCM_BOOL_F);
       if (iface == SCM_BOOL_F)
        {
          String msg = to_string (_f ("Unknown interface `%s'",
-                                     ly_symbol2string (gh_car (ifs)).to_str0 ()));
+                                     ly_symbol2string (ly_car (ifs)).to_str0 ()));
          programming_error (msg);
          continue;
        }
 
-      found= found || (scm_c_memq (sym, gh_caddr (iface)) != SCM_BOOL_F);
+      found= found || (scm_c_memq (sym, ly_caddr (iface)) != SCM_BOOL_F);
     }
 
   if (!found)
index c620d4c5f8b481ec3a6af1bb2193573000649d0c..ec2035303b4d6e63bcf61827e249bf8b2d1774e8 100644 (file)
@@ -37,8 +37,8 @@ LY_DEFINE (ly_grob_pq_less_p, "ly:grob-pq-less?",
          2, 0 ,0, (SCM a, SCM b), 
          "Compare 2 grob priority queue entries. Internal")
 {
-  if (Moment::compare (*unsmob_moment (gh_car (a)),
-                      *unsmob_moment (gh_car (b))) < 0)
+  if (Moment::compare (*unsmob_moment (ly_car (a)),
+                      *unsmob_moment (ly_car (b))) < 0)
     return SCM_BOOL_T;
   else
     return SCM_BOOL_F;
@@ -82,9 +82,9 @@ Grob_pq_engraver::stop_translation_timestep ()
   Moment now = now_mom ();
   SCM start_busy = get_property ("busyGrobs");
   SCM busy = start_busy;
-  while (gh_pair_p (busy) && *unsmob_moment (gh_caar (busy)) == now)
+  while (ly_pair_p (busy) && *unsmob_moment (ly_caar (busy)) == now)
     {
-      busy = gh_cdr (busy);
+      busy = ly_cdr (busy);
     }
 
   if (start_busy != busy)
@@ -98,13 +98,13 @@ Grob_pq_engraver::start_translation_timestep ()
 
   SCM start_busy = get_property ("busyGrobs");
   SCM busy = start_busy;
-  while (gh_pair_p (busy) && *unsmob_moment (gh_caar (busy)) < now)
+  while (ly_pair_p (busy) && *unsmob_moment (ly_caar (busy)) < now)
     {
       /*
        The grob-pq-engraver is not water tight, and stuff like
        tupletSpannerDuration confuses it.
        */
-      busy = gh_cdr (busy);
+      busy = ly_cdr (busy);
     }
 
   if (start_busy != busy)
index 46d032c64f8800d0431551490084cd180eecf6ed..fc24bc184cfd84d25f6380667c531812335e2ee9 100644 (file)
@@ -45,7 +45,7 @@ Grob::add_to_list_property (SCM sym, SCM thing)
 
   if (handle != SCM_BOOL_F)
     {
-      gh_set_cdr_x (handle, gh_cons (thing, gh_cdr (handle)));
+      scm_set_cdr_x (handle, scm_cons (thing, ly_cdr (handle)));
     }
   else
     {
@@ -54,10 +54,10 @@ Grob::add_to_list_property (SCM sym, SCM thing)
        mutable prop list.
       */
       handle = scm_sloppy_assq (sym, immutable_property_alist_);
-      SCM tail = (handle != SCM_BOOL_F) ? gh_cdr (handle) : SCM_EOL;
-      SCM val = gh_cons (thing, tail);
+      SCM tail = (handle != SCM_BOOL_F) ? ly_cdr (handle) : SCM_EOL;
+      SCM val = scm_cons (thing, tail);
 
-      mutable_property_alist_ = gh_cons (gh_cons (sym, val),
+      mutable_property_alist_ = scm_cons (scm_cons (sym, val),
                                         mutable_property_alist_);
     }
 }
@@ -92,9 +92,9 @@ Grob::internal_get_property (SCM sym) const
 
   s = scm_sloppy_assq (sym, immutable_property_alist_);
   
-  if (internal_type_checking_global_b && gh_pair_p (s))
+  if (internal_type_checking_global_b && ly_pair_p (s))
     {
-      if (!type_check_assignment (sym, gh_cdr (s),
+      if (!type_check_assignment (sym, ly_cdr (s),
                                  ly_symbol2scm ("backend-type?")))
        abort ();
 
index 77cc5d914e5a46f0fd4da53a57ee773424176bfe..738e68a15c684c6cdbff9a8bfd27b5a485c195d3 100644 (file)
@@ -21,7 +21,7 @@ LY_DEFINE (ly_grob_set_property,"ly:grob-set-property!", 3, 0, 0,
 {
   Grob * sc = unsmob_grob (grob);
   SCM_ASSERT_TYPE (sc, grob, SCM_ARG1, __FUNCTION__, "grob");
-  SCM_ASSERT_TYPE (gh_symbol_p (sym), sym, SCM_ARG2, __FUNCTION__, "symbol");
+  SCM_ASSERT_TYPE (ly_symbol_p (sym), sym, SCM_ARG2, __FUNCTION__, "symbol");
 
   if (!type_check_assignment (sym, val, ly_symbol2scm ("backend-type?")))
     error ("typecheck failed");
@@ -40,7 +40,7 @@ LY_DEFINE (ly_get_property, "ly:grob-property",
 {
   Grob *sc = unsmob_grob (grob);
   SCM_ASSERT_TYPE (sc, grob, SCM_ARG1, __FUNCTION__, "grob");
-  SCM_ASSERT_TYPE (gh_symbol_p (sym), sym, SCM_ARG2, __FUNCTION__, "symbol");
+  SCM_ASSERT_TYPE (ly_symbol_p (sym), sym, SCM_ARG2, __FUNCTION__, "symbol");
 
   return sc->internal_get_property (sym);
 }
@@ -99,7 +99,7 @@ LY_DEFINE (ly_get_extent, "ly:grob-extent", 3, 0, 0,
 
   SCM_ASSERT_TYPE (is_axis (axis), axis, SCM_ARG3, __FUNCTION__, "axis");
 
-  return ly_interval2scm ( sc->extent (ref, Axis (gh_scm2int (axis))));
+  return ly_interval2scm ( sc->extent (ref, Axis (ly_scm2int (axis))));
 }
 
 LY_DEFINE (ly_get_parent, "ly:grob-parent", 2, 0, 0, (SCM grob, SCM axis),
@@ -110,7 +110,7 @@ LY_DEFINE (ly_get_parent, "ly:grob-parent", 2, 0, 0, (SCM grob, SCM axis),
   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 (gh_scm2int (axis)));
+  Grob *par = sc->get_parent (Axis (ly_scm2int (axis)));
   return par ? par->self_scm () : SCM_EOL;
 }
 
@@ -148,7 +148,7 @@ LY_DEFINE (get_broken_into, "ly:spanner-broken-into",
 
   SCM s = SCM_EOL;
   for (int i = me->broken_intos_.size (); i--;)
-    s = gh_cons (me->broken_intos_[i]->self_scm (), s);
+    s = scm_cons (me->broken_intos_[i]->self_scm (), s);
   return s;
 }
 
@@ -169,10 +169,10 @@ LY_DEFINE (ly_grob_translate_axis_x, "ly:grob-translate-axis!",
 {
   Grob *me = unsmob_grob (g);
   SCM_ASSERT_TYPE (me, g, SCM_ARG1, __FUNCTION__, "grob");
-  SCM_ASSERT_TYPE (gh_number_p (d), d, SCM_ARG2, __FUNCTION__, "dimension");
+  SCM_ASSERT_TYPE (ly_number_p (d), d, SCM_ARG2, __FUNCTION__, "dimension");
   SCM_ASSERT_TYPE (is_axis (a), a, SCM_ARG3, __FUNCTION__, "axis");
 
-  me->translate_axis (gh_scm2double (d), Axis (gh_scm2int (a)));
+  me->translate_axis (ly_scm2double (d), Axis (ly_scm2int (a)));
   return SCM_UNDEFINED;
 }
 
@@ -183,7 +183,7 @@ LY_DEFINE (ly_spanner_p, "ly:spanner?",
   Grob *me = unsmob_grob (g);
   bool b = dynamic_cast<Spanner*> (me);
 
-  return gh_bool2scm (b);
+  return ly_bool2scm (b);
 }
 
 LY_DEFINE (ly_item_p, "ly:item?",
@@ -192,7 +192,7 @@ LY_DEFINE (ly_item_p, "ly:item?",
 {
   Grob *me = unsmob_grob (g);
   bool b = dynamic_cast<Item*> (me);
-  return gh_bool2scm (b);
+  return ly_bool2scm (b);
 }
 
 LY_DEFINE (ly_item_break_dir, "ly:item-break-dir",
@@ -202,5 +202,5 @@ LY_DEFINE (ly_item_break_dir, "ly:item-break-dir",
 {
   Item *me = dynamic_cast<Item*> (unsmob_grob (it));
   SCM_ASSERT_TYPE (me, it, SCM_ARG1, __FUNCTION__, "Item");
-  return gh_int2scm (me->break_status_dir ());
+  return scm_int2num (me->break_status_dir ());
 }
index 0fd48933619f5d72a18d3105ca4bf4591665a320..12d29d7b8c28b690233523dc440621290c96837f 100644 (file)
@@ -65,7 +65,7 @@ Grob::Grob (SCM basicprops)
 #endif
   
   SCM meta = get_property ("meta");
-  if (gh_pair_p (meta))
+  if (ly_pair_p (meta))
     {
       SCM ifs = scm_assoc (ly_symbol2scm ("interfaces"), meta);
 
@@ -74,7 +74,7 @@ Grob::Grob (SCM basicprops)
        */
       bool itc = internal_type_checking_global_b;
       internal_type_checking_global_b = false;
-      internal_set_property (ly_symbol2scm ("interfaces"), gh_cdr (ifs));
+      internal_set_property (ly_symbol2scm ("interfaces"), ly_cdr (ifs));
       internal_type_checking_global_b = itc;
     }
   
@@ -112,8 +112,8 @@ Grob::Grob (SCM basicprops)
       if (is_number_pair (xt))
        cb = xt;
       else if (cb != SCM_BOOL_F
-         && !gh_procedure_p (cb) && !gh_pair_p (cb)
-         && gh_procedure_p (get_property ("print-function")))
+         && !ly_procedure_p (cb) && !ly_pair_p (cb)
+         && ly_procedure_p (get_property ("print-function")))
        cb = stencil_extent_proc;
     
       dim_cache_[a].dimension_ = cb;
@@ -157,7 +157,7 @@ SCM
 Grob::stencil_extent (SCM element_smob, SCM scm_axis)
 {
   Grob *s = unsmob_grob (element_smob);
-  Axis a = (Axis) gh_scm2int (scm_axis);
+  Axis a = (Axis) ly_scm2int (scm_axis);
 
   Stencil *m = s->get_stencil ();
   Interval e ;
@@ -186,7 +186,7 @@ Grob::calculate_dependencies (int final, int busy, SCM funcname)
   
   status_= busy;
 
-  for (SCM d = get_property ("dependencies"); gh_pair_p (d);
+  for (SCM d = get_property ("dependencies"); ly_pair_p (d);
        d = ly_cdr (d))
     {
       unsmob_grob (ly_car (d))
@@ -195,8 +195,8 @@ Grob::calculate_dependencies (int final, int busy, SCM funcname)
 
   
   SCM proc = internal_get_property (funcname);
-  if (gh_procedure_p (proc))
-    gh_call1 (proc, this->self_scm ());
+  if (ly_procedure_p (proc))
+    scm_call_1 (proc, this->self_scm ());
  
   status_= final;
 }
@@ -230,8 +230,8 @@ Grob::get_uncached_stencil ()const
   SCM proc = get_property ("print-function");
 
   SCM  mol = SCM_EOL;
-  if (gh_procedure_p (proc)) 
-    mol = gh_apply (proc, scm_list_n (this->self_scm (), SCM_UNDEFINED));
+  if (ly_procedure_p (proc)) 
+    mol = scm_apply_0 (proc, scm_list_n (this->self_scm (), SCM_UNDEFINED));
   
   Stencil *m = unsmob_stencil (mol);
   
@@ -310,11 +310,11 @@ Grob::handle_broken_dependencies ()
        because some Spanners have enormously long lists in their
        properties.
        */
-      for (SCM s = mutable_property_alist_; gh_pair_p (s);
-          s = gh_cdr (s))
+      for (SCM s = mutable_property_alist_; ly_pair_p (s);
+          s = ly_cdr (s))
        {
-         sp->substitute_one_mutable_property (gh_caar (s),
-                                             gh_cdar (s));
+         sp->substitute_one_mutable_property (ly_caar (s),
+                                             ly_cdar (s));
        }
     }
 
@@ -396,7 +396,7 @@ Grob::handle_prebroken_dependencies ()
   if (original_)
     {
       Item * it = dynamic_cast<Item*> (this);
-      substitute_mutable_properties (gh_int2scm (it->break_status_dir ()),
+      substitute_mutable_properties (scm_int2num (it->break_status_dir ()),
                               original_->mutable_property_alist_);
     }
 }
@@ -457,10 +457,10 @@ Grob::get_offset (Axis a) const
   while (dim_cache_[a].offsets_left_)
     {
       int l = --me->dim_cache_[a].offsets_left_;
-      SCM cb = scm_list_ref (dim_cache_[a].offset_callbacks_,  gh_int2scm (l));
-      SCM retval = gh_call2 (cb, self_scm (), gh_int2scm (a));
+      SCM cb = scm_list_ref (dim_cache_[a].offset_callbacks_,  scm_int2num (l));
+      SCM retval = scm_call_2 (cb, self_scm (), scm_int2num (a));
 
-      Real r =  gh_scm2double (retval);
+      Real r =  ly_scm2double (retval);
       if (isinf (r) || isnan (r))
        {
          programming_error (INFINITY_MSG);
@@ -475,8 +475,8 @@ Grob::get_offset (Axis a) const
 bool
 Grob::is_empty (Axis a)const
 {
-  return ! (gh_pair_p (dim_cache_[a].dimension_) ||
-           gh_procedure_p (dim_cache_[a].dimension_));
+  return ! (ly_pair_p (dim_cache_[a].dimension_) ||
+           ly_procedure_p (dim_cache_[a].dimension_));
 }
 
 Interval
@@ -487,19 +487,19 @@ Grob::extent (Grob * refp, Axis a) const
   
   Dimension_cache * d = (Dimension_cache *)&dim_cache_[a];
   Interval ext ;   
-  if (gh_pair_p (d->dimension_))
+  if (ly_pair_p (d->dimension_))
     ;
-  else if (gh_procedure_p (d->dimension_))
+  else if (ly_procedure_p (d->dimension_))
     {
       /*
        FIXME: add doco on types, and should typecheck maybe? 
        */
-      d->dimension_= gh_call2 (d->dimension_, self_scm (), gh_int2scm (a));
+      d->dimension_= scm_call_2 (d->dimension_, self_scm (), scm_int2num (a));
     }
   else
     return ext;
 
-  if (!gh_pair_p (d->dimension_))
+  if (!ly_pair_p (d->dimension_))
     return ext;
   
   ext = ly_scm2interval (d->dimension_);
@@ -511,19 +511,19 @@ Grob::extent (Grob * refp, Axis a) const
   /*
     signs ?
    */
-  if (gh_pair_p (extra))
+  if (ly_pair_p (extra))
     {
-      ext[BIGGER] +=  gh_scm2double (ly_cdr (extra));
-      ext[SMALLER] +=   gh_scm2double (ly_car (extra));
+      ext[BIGGER] +=  ly_scm2double (ly_cdr (extra));
+      ext[SMALLER] +=   ly_scm2double (ly_car (extra));
     }
   
   extra = get_property (a == X_AXIS
                                ? "minimum-X-extent"
                                : "minimum-Y-extent");
-  if (gh_pair_p (extra))
+  if (ly_pair_p (extra))
     {
-      ext.unite (Interval (gh_scm2double (ly_car (extra)),
-                          gh_scm2double (ly_cdr (extra))));
+      ext.unite (Interval (ly_scm2double (ly_car (extra)),
+                          ly_scm2double (ly_cdr (extra))));
     }
 
   ext.translate (x);
@@ -553,7 +553,7 @@ Grob::common_refpoint (Grob const* s, Axis a) const
 Grob *
 common_refpoint_of_list (SCM elist, Grob *common, Axis a) 
 {
-  for (; gh_pair_p (elist); elist = ly_cdr (elist))
+  for (; ly_pair_p (elist); elist = ly_cdr (elist))
     {
       Grob * s = unsmob_grob (ly_car (elist));
       if (!s)
@@ -592,8 +592,8 @@ Grob::name () const
 {
   SCM meta = get_property ("meta");
   SCM nm = scm_assoc (ly_symbol2scm ("name"), meta);
-  nm = (gh_pair_p (nm)) ? ly_cdr (nm) : SCM_EOL;
-  return  gh_symbol_p (nm) ? ly_symbol2string (nm) :  classname (this);  
+  nm = (ly_pair_p (nm)) ? ly_cdr (nm) : SCM_EOL;
+  return  ly_symbol_p (nm) ? ly_symbol2string (nm) :  classname (this);  
 }
 
 void
@@ -601,7 +601,7 @@ Grob::add_offset_callback (SCM cb, Axis a)
 {
   if (!has_offset_callback (cb, a))
   {
-    dim_cache_[a].offset_callbacks_ = gh_cons (cb, dim_cache_[a].offset_callbacks_);
+    dim_cache_[a].offset_callbacks_ = scm_cons (cb, dim_cache_[a].offset_callbacks_);
     dim_cache_[a].offsets_left_ ++;
   }
 }
@@ -773,9 +773,9 @@ ly_scm2grobs (SCM l)
 {
   Link_array<Grob> arr;
 
-  for (SCM s = l; gh_pair_p (s); s = gh_cdr (s))
+  for (SCM s = l; ly_pair_p (s); s = ly_cdr (s))
     {
-      SCM e = gh_car (s);
+      SCM e = ly_car (s);
       arr.push (unsmob_grob (e));
     }
 
@@ -789,7 +789,7 @@ ly_grobs2scm (Link_array<Grob> a)
 {
   SCM s = SCM_EOL;
   for (int i = a.size (); i; i--)
-    s = gh_cons (a[i-1]->self_scm (), s);
+    s = scm_cons (a[i-1]->self_scm (), s);
 
   return s;
 }
index 629f8254609f5042453d3f2167c36f01d0f03cfe..28b5a0910f5ef5ca1fc5c3937d06322970b6c80a 100644 (file)
@@ -41,7 +41,7 @@ Hairpin::print (SCM smob)
   /*
     Ugh. property name is not general.
    */
-  Real padding = gh_scm2double (me->get_property ("if-text-padding"));
+  Real padding = ly_scm2double (me->get_property ("if-text-padding"));
  
   Drul_array<bool> broken;
   Drul_array<Item*> bounds ;
index dabcf7c7e186d054dbb6d5fb76496acfc04d6118..78b6a06590f9fe53b77961bf21904585b350f0b5 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) gh_scm2int (scm_axis);
+  Axis a = (Axis) ly_scm2int (scm_axis);
 
   assert (a == Y_AXIS);
   consider_suicide (me);
@@ -32,7 +32,7 @@ Hara_kiri_group_spanner::consider_suicide (Grob*me)
 {
   Spanner*sp = dynamic_cast<Spanner*> (me);
   SCM worth = me->get_property ("items-worth-living");
-  if (gh_pair_p (worth))
+  if (ly_pair_p (worth))
     return ;
 
   if (!to_boolean (me->get_property ("remove-first"))
@@ -63,10 +63,10 @@ SCM
 Hara_kiri_group_spanner::force_hara_kiri_callback (SCM element_smob, SCM axis)
 {
   Grob *me = unsmob_grob (element_smob);
-  Axis a = (Axis) gh_scm2int (axis);
+  Axis a = (Axis) ly_scm2int (axis);
   assert (a == Y_AXIS);
   consider_suicide (me);
-  return gh_double2scm (0.0);
+  return scm_make_real (0.0);
 }
 
 
@@ -75,10 +75,10 @@ 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) gh_scm2int (axis);
+  Axis a = (Axis) ly_scm2int (axis);
   assert (a == Y_AXIS);
   force_hara_kiri_callback (daughter->get_parent (a)->self_scm (), axis);
-  return gh_double2scm (0.0);
+  return scm_make_real (0.0);
 }
 
 void
index b1614ca9ab5f713e8a596a077d47e332c33d017d..f0d349a5fe2393c60fabd583e98859044dde00b9 100644 (file)
@@ -73,9 +73,9 @@ completize_hyphen (Spanner* sp)
   if (!sp->get_bound (RIGHT))
     {
       SCM heads = sp->get_property ("heads");
-      if (gh_pair_p (heads))
+      if (ly_pair_p (heads))
        {
-         Item* it = dynamic_cast<Item*> (unsmob_grob (gh_car (heads)));
+         Item* it = dynamic_cast<Item*> (unsmob_grob (ly_car (heads)));
          if (it)
            sp->set_bound (RIGHT, it);
        }
index 55519b0123a6e8dc37d0d6f921792a5869a7e475..e7d69d4e181b9d683703c056b1049197350b7757 100644 (file)
@@ -42,9 +42,9 @@ Pointer_group_interface__extract_grobs (Grob const *elt, T *, const char* name)
 {
   Link_array<T> arr;
 
-  for (SCM s = elt->get_property (name); gh_pair_p (s); s = gh_cdr (s))
+  for (SCM s = elt->get_property (name); ly_pair_p (s); s = ly_cdr (s))
     {
-      SCM e = gh_car (s);
+      SCM e = ly_car (s);
       arr.push (dynamic_cast<T*> (unsmob_grob (e)));
     }
 
index d9aad2c9def1a19840ee5b7fb8fe7a7a4067a11c..e5e63ff6775f382df6c909cc9b026cdc2bcce4b7 100644 (file)
 #define LILY_GUILE_HH
 
 
-/*
-  TODO: the  GH interface is deprecated as of GUILE 1.6
-
-  Remove all gh_XXX functions.
- */
-#include <guile/gh.h>
-
-
 /* GUILE only includes version in headers (libguile/version.h) as of
    1.5.x.  For some strange reason, they call it SCM.*VERSION.
 
@@ -43,9 +35,6 @@
 
 #define scm_t_bits scm_bits_t
 
-#define fix_guile_1_4_gh_scm2newstr(str, lenp) gh_scm2newstr (str, (int*)lenp)
-#define gh_scm2newstr(str, lenp) fix_guile_1_4_gh_scm2newstr (str, lenp)
-
 #define fix_guile_1_4_scm_primitive_eval(form) scm_eval_3 (form, 1, SCM_EOL)
 #define scm_primitive_eval(form) fix_guile_1_4_scm_primitive_eval (form)
 
@@ -58,7 +47,6 @@ inline SCM scm_c_make_vector  (int k, SCM val) {
   return scm_make_vector (SCM_MAKINUM (k), val);
 }
 #define scm_c_define_gsubr scm_make_gsubr
-#define scm_c_eval_string(str) gh_eval_str ((char*)str)
 #define scm_remember_upto_here_1(s) scm_remember (&s)
 #define scm_gc_protect_object scm_protect_object
 #define scm_gc_unprotect_object scm_unprotect_object
@@ -127,7 +115,7 @@ SCM ly_truncate_list (int k, SCM l );
 
 
 /*
-  Using this trick we cache the value of gh_symbol2scm ("fooo") where
+  Using this trick we cache the value of scm_str2symbol ("fooo") where
   "fooo" is a constant string. This is done at the cost of one static
   variable per ly_symbol2scm() use, and one boolean evaluation for
   every call.
@@ -139,12 +127,12 @@ SCM ly_truncate_list (int k, SCM l );
  SCM value = cached;  /* We store this one locally, since G++ -O2 fucks up else */   \
  if ( __builtin_constant_p ((x)))\
  {  if (!cached)\
-     value = cached =  scm_gc_protect_object (gh_symbol2scm((x)));\
+     value = cached =  scm_gc_protect_object (scm_str2symbol((x)));\
  } else\
-  value = gh_symbol2scm ((char*) (x)); \
+  value = scm_str2symbol ((char*) (x)); \
   value; })
 #else
-inline SCM ly_symbol2scm(char const* x) { return gh_symbol2scm((x)); }
+inline SCM ly_symbol2scm(char const* x) { return scm_str2symbol((x)); }
 #endif 
 
 extern SCM global_lily_module;
@@ -153,9 +141,9 @@ extern SCM global_lily_module;
  SCM value = cached;  /* We store this one locally, since G++ -O2 fucks up else */   \
  if ( __builtin_constant_p ((x)))\
  {  if (!cached)\
-     value = cached =  scm_gc_protect_object (scm_eval(gh_symbol2scm (x), global_lily_module));\
+     value = cached =  scm_gc_protect_object (scm_eval(scm_str2symbol (x), global_lily_module));\
  } else\
-  value = scm_eval(gh_symbol2scm (x), global_lily_module);\
+  value = scm_eval(scm_str2symbol (x), global_lily_module);\
   value; })
 
 
@@ -170,6 +158,7 @@ Interval ly_scm2interval (SCM);
 Drul_array<Real> ly_scm2realdrul (SCM);
 Slice int_list_to_slice (SCM l);
 SCM ly_interval2scm (Drul_array<Real>);
+char *ly_scm2newstr (SCM str, size_t *lenp);
 
 Real robust_scm2double (SCM, double);
 int robust_scm2int (SCM, int);
@@ -195,20 +184,46 @@ inline SCM ly_cddr (SCM x) { return SCM_CDDR (x); }
 inline SCM ly_caddr (SCM x) { return SCM_CADDR (x); }
 inline SCM ly_cdadr (SCM x) { return SCM_CDADR (x); }
 inline SCM ly_caadr (SCM x) { return SCM_CAADR (x); }
+inline SCM ly_cadar (SCM x) { return SCM_CADAR (x); }
 /* inserts at front, removing dublicates */
 inline SCM ly_assoc_front_x(SCM alist, SCM key, SCM val)
 {
   return scm_acons(key, val, scm_assoc_remove_x (alist, key));
 }
-#ifdef PARANOID
-#define gh_pair_p ly_pair_p
-bool ly_pair_p (SCM x);
-#else
 inline bool ly_pair_p (SCM x) { return SCM_NFALSEP (scm_pair_p (x)); }
-#endif
 inline bool ly_symbol_p (SCM x) { return SCM_SYMBOLP (x); }
+inline bool ly_boolean_p (SCM x) { return SCM_BOOLP (x); }
+inline bool ly_char_p (SCM x) { return SCM_CHARP (x); }
 inline bool ly_number_p (SCM x) { return SCM_NUMBERP (x); }
+inline bool ly_string_p (SCM x) { return SCM_STRINGP (x); }
+inline bool ly_vector_p (SCM x) { return SCM_VECTORP (x); }
+inline bool ly_list_p (SCM x) { return SCM_NFALSEP (scm_list_p (x)); }
 inline bool ly_procedure_p (SCM x) { return SCM_NFALSEP (scm_procedure_p (x)); }
+inline bool ly_eq_p (SCM x, SCM y) { return SCM_EQ_P (x, y); }
+inline bool ly_equal_p (SCM x, SCM y) { 
+  return SCM_NFALSEP (scm_equal_p (x, y)); 
+}
+
+inline bool ly_scm2bool (SCM x) { return SCM_NFALSEP (x); }
+inline char ly_scm2char (SCM x) { return SCM_CHAR(x); }
+inline int ly_scm2int (SCM x) { return scm_num2int (x, 0, "ly_scm2int"); }
+inline double ly_scm2double (SCM x) { return scm_num2dbl (x, "ly_scm2double"); }
+inline unsigned long ly_length (SCM x) { 
+  return scm_num2ulong (scm_length (x), 0, "ly_length");
+}
+inline unsigned long ly_vector_length (SCM x) { return SCM_VECTOR_LENGTH (x); }
+
+inline SCM ly_bool2scm (bool x) { return SCM_BOOL (x); }
+
+inline SCM ly_append2 (SCM x1, SCM x2) { 
+  return scm_append (scm_listify (x1, x2, SCM_UNDEFINED)); 
+}
+inline SCM ly_append3 (SCM x1, SCM x2, SCM x3) { 
+  return scm_append (scm_listify (x1, x2, x3, SCM_UNDEFINED)); 
+}
+inline SCM ly_append4 (SCM x1, SCM x2, SCM x3, SCM x4) { 
+  return scm_append (scm_listify (x1, x2, x3, x4, SCM_UNDEFINED)); 
+}
 
 /*
   display and print newline.
@@ -284,8 +299,9 @@ SCM TYPE :: FUNC ## _proc;\
 void                                                           \
 TYPE ## _ ## FUNC ## _init_functions ()                                        \
 {                                                              \
-  TYPE :: FUNC ## _proc = gh_new_procedure ## ARGCOUNT  ## _0 (#TYPE "::" #FUNC, \
- ((Scheme_function_ ## ARGCOUNT)TYPE :: FUNC));                                \
+  TYPE :: FUNC ## _proc = scm_c_define_gsubr (#TYPE "::" #FUNC, \
+                                             (ARGCOUNT), 0, 0, \
+                         (Scheme_function_unknown)TYPE :: FUNC); \
   scm_c_export (#TYPE "::" #FUNC, NULL);\
 }                                                              \
                                                                \
index 7e93c837f3638902448296c88229e3daddec0735..7a2f6e7ec2fe77189ceee160f8b8e7923af26f55 100644 (file)
@@ -68,7 +68,7 @@ SCM CL::smobbed_copy () const                                 \
 {                                                              \
   CL * ptr  = new CL (*this);\
   SCM s;                                                       \
-  s = gh_cons (SCM_PACK (CL::smob_tag_), SCM_PACK (ptr));      \
+  s = scm_cons (SCM_PACK (CL::smob_tag_), SCM_PACK (ptr));     \
   scm_gc_register_collectable_memory ((CL*)this, sizeof (CL), #CL " smob"); \
                                                                \
   return s;                                                    \
index 0da68c899dffddd3672fcc5d8f4353d34728d92d..500cd4386d354b35dbeb569fe20868ad44059204 100644 (file)
@@ -54,13 +54,13 @@ LY_DEFINE (ly_set_point_and_click, "ly:set-point-and-click", 1, 0, 0,
    */
   SCM val = SCM_BOOL_F;
   if (ly_symbol2scm ("line-column") == what)
-    val = gh_eval_str ("line-column-location");
+    val = scm_c_eval_string ("line-column-location");
   else if (what == ly_symbol2scm ("line"))
-    val = gh_eval_str ("line-location");
+    val = scm_c_eval_string ("line-location");
 
   scm_module_define (global_lily_module, ly_symbol2scm ("point-and-click"), val);
 
-  store_locations_global_b =gh_procedure_p (val);
+  store_locations_global_b =ly_procedure_p (val);
   return SCM_UNSPECIFIED;
 }
 
index 4ca03d940aaae7da83760f97304206062f0849fb..02ff235935b931d698980901f5913cca64db916c 100644 (file)
@@ -85,7 +85,7 @@ LY_DEFINE (ly_input_message, "ly:input-message", 2, 0, 0, (SCM sip, SCM msg),
 {
   Input *ip = unsmob_input (sip);
   SCM_ASSERT_TYPE (ip, sip, SCM_ARG1, __FUNCTION__, "input location");
-  SCM_ASSERT_TYPE (gh_string_p (msg), msg, SCM_ARG2, __FUNCTION__, "string");
+  SCM_ASSERT_TYPE (ly_string_p (msg), msg, SCM_ARG2, __FUNCTION__, "string");
 
   String m = ly_scm2string (msg);
   ip->message (m);
index 9793e8dae3f1a31c8540b5666d334bed65349246..1f432bcd7a032e8c7aaeca6dc66cca1f6e7eac3a 100644 (file)
@@ -108,7 +108,7 @@ Instrument_name_engraver::acknowledge_grob (Grob_info i)
           && Axis_group_interface::has_axis (i.grob_, Y_AXIS)))
       && !Align_interface::has_interface (i.grob_))
     {
-      SCM nl = gh_cons (i.grob_->self_scm (),
+      SCM nl = scm_cons (i.grob_->self_scm (),
                        get_property ("instrumentSupport"));
 
       daddy_context_->set_property ("instrumentSupport", nl);
@@ -122,7 +122,7 @@ Instrument_name_engraver::process_music ()
     Also create text if barlines in other groups. This allows
     a name to be attached to lyrics or chords. 
    */
-  if (gh_string_p (get_property ("whichBar")))
+  if (ly_string_p (get_property ("whichBar")))
     create_text ();
 }
 
index 635ea2f1f52304446b660276b3d76490f5f49e51..df6e7068b0d2b0024b6376cd92a9549a769b8e3e 100644 (file)
@@ -153,12 +153,12 @@ Item::handle_prebroken_dependencies ()
     more complicated things.
   */
   SCM vis = get_property ("break-visibility");
-  if (gh_procedure_p (vis))
+  if (ly_procedure_p (vis))
     {
-      SCM args = scm_list_n (gh_int2scm (break_status_dir ()), SCM_UNDEFINED);
-      SCM result = gh_apply (vis, args);
-      bool trans = gh_scm2bool (ly_car (result));
-      bool empty = gh_scm2bool (ly_cdr (result));
+      SCM args = scm_list_n (scm_int2num (break_status_dir ()), SCM_UNDEFINED);
+      SCM result = scm_apply_0 (vis, args);
+      bool trans = ly_scm2bool (ly_car (result));
+      bool empty = ly_scm2bool (ly_cdr (result));
       
       if (empty && trans)
        suicide ();
index a4e2dbe22022c396d25e36448dead2ccc5b61a68..ca5fc070f8a8bcb42211b3476ce5f965185740c3 100644 (file)
@@ -79,7 +79,7 @@ Key_engraver::create_key (bool def)
   if (!def)
     {
       SCM vis = get_property ("explicitKeySignatureVisibility"); 
-      if (gh_procedure_p (vis))
+      if (ly_procedure_p (vis))
        item_->set_property ("break-visibility",vis);
     }
 }      
@@ -117,7 +117,7 @@ Key_engraver::acknowledge_grob (Grob_info info)
        }
     }
   else if (Bar_line::has_interface (info.grob_)
-          && gh_pair_p (get_property ("keySignature")))
+          && ly_pair_p (get_property ("keySignature")))
     {
       create_key (true);
     }
@@ -148,24 +148,24 @@ void
 Key_engraver::read_ev (Music const * r)
 {
   SCM p = r->get_property ("pitch-alist");
-  if (!gh_pair_p (p))
+  if (!ly_pair_p (p))
     return;
 
   SCM n = scm_list_copy (p);
   SCM accs = SCM_EOL;
   for (SCM s = get_property ("keyAccidentalOrder");
-       gh_pair_p (s); s = ly_cdr (s))
+       ly_pair_p (s); s = ly_cdr (s))
     {
-      if (gh_pair_p (scm_member (ly_car (s), n)))
+      if (ly_pair_p (scm_member (ly_car (s), n)))
        {
-         accs = gh_cons (ly_car (s), accs);
+         accs = scm_cons (ly_car (s), accs);
          n = scm_delete_x (ly_car (s), n);
        }
     }
   
-  for (SCM s = n ; gh_pair_p (s); s = ly_cdr (s))
-    if (gh_scm2int (ly_cdar (s)))
-      accs = gh_cons (ly_car (s), accs);
+  for (SCM s = n ; ly_pair_p (s); s = ly_cdr (s))
+    if (ly_scm2int (ly_cdar (s)))
+      accs = scm_cons (ly_car (s), accs);
 
   daddy_context_->set_property ("keySignature", accs);
   daddy_context_->set_property ("tonic" ,
index c9ced39f6ab631d1d43891859a55ed880d1e1cf7..f217742603da17e4f9478289d10a14096a0ea60b 100644 (file)
@@ -47,11 +47,11 @@ Key_performer::create_audio_elements ()
       SCM pitchlist = key_req_->get_property ("pitch-alist");
       SCM proc = ly_scheme_function ("alterations-in-key");
       
-      SCM acc = gh_call1 (proc, pitchlist);
+      SCM acc = scm_call_1 (proc, pitchlist);
       
       Pitch key_do (0, 
-                   gh_scm2int (ly_caar (pitchlist)),
-                   gh_scm2int (ly_cdar (pitchlist)));
+                   ly_scm2int (ly_caar (pitchlist)),
+                   ly_scm2int (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 (gh_scm2int (acc),
+      audio_ = new Audio_key (ly_scm2int (acc),
                              SCM_BOOL_T != scm_equal_p (minor, c_pitchlist));
 
       Audio_element_info info (audio_, key_req_);
index 7ccd2179ed400d6028d748ea0201524bc77378ae..7e61027985688908e91823d61f61c92eb27d9d0b 100644 (file)
@@ -56,10 +56,10 @@ const int NATURAL_TOP_PITCH = 4;
 int
 alteration_pos  (SCM what, int alter, int c0p)
 {
-  if (gh_pair_p (what))
-    return gh_scm2int (ly_car (what)) * 7 + gh_scm2int (ly_cdr (what)) + c0p;
+  if (ly_pair_p (what))
+    return ly_scm2int (ly_car (what)) * 7 + ly_scm2int (ly_cdr (what)) + c0p;
 
-  int p = gh_scm2int (what);
+  int p = ly_scm2int (what);
 
   // Find the c in the range -4 through 2
   int from_bottom_pos = c0p + 4;
@@ -104,7 +104,7 @@ Key_signature_interface::print (SCM smob)
 
   SCM scm_style = me->get_property ("style");
   String style;
-  if (gh_symbol_p (scm_style))
+  if (ly_symbol_p (scm_style))
     {
       style = ly_symbol2string (scm_style);
     }
@@ -118,8 +118,8 @@ Key_signature_interface::print (SCM smob)
 
   SCM c0s = me->get_property ("c0-position");
   int c0p = 0;
-  if (gh_number_p (c0s))
-    c0p = gh_scm2int (c0s);
+  if (ly_number_p (c0s))
+    c0p = ly_scm2int (c0s);
 
   /*
     SCM lists are stacks, so we work from right to left, ending with
@@ -127,9 +127,9 @@ Key_signature_interface::print (SCM smob)
   */
 
   Font_metric *fm = Font_interface::get_default_font (me);
-  for (SCM s = newas; gh_pair_p (s); s = ly_cdr (s))
+  for (SCM s = newas; ly_pair_p (s); s = ly_cdr (s))
     {
-      int alteration = gh_scm2int (ly_cdar (s));
+      int alteration = ly_scm2int (ly_cdar (s));
       String font_char =
        Accidental_interface::get_fontcharname (style, alteration);
       Stencil acc (fm->find_by_name ("accidentals-" + font_char));
@@ -163,11 +163,11 @@ Key_signature_interface::print (SCM smob)
       mol.add_at_edge (X_AXIS, LEFT, Lookup::blank (Box (x,y)), 0, 0);
 
       Stencil natural;
-      if (gh_pair_p (old))
+      if (ly_pair_p (old))
        natural=Font_interface::get_default_font (me)->
            find_by_name (String ("accidentals-") + style + String ("0"));
       
-      for (; gh_pair_p (old); old = ly_cdr (old))
+      for (; ly_pair_p (old); old = ly_cdr (old))
         {
          SCM found = scm_assoc (ly_caar (old), newas);
          if (found == SCM_BOOL_F
index 444e5bef6bbd7dd92a8554e9d923f89a9f6a8bc3..bc64468e06573421cf21b574be4df2a37e08f738 100644 (file)
@@ -145,7 +145,7 @@ LY_DEFINE (ly_kpathsea_gulp_file, "ly:kpathsea-gulp-file",
           "Read the file @var{name}, and return its contents in a string.  "
           "The file is looked up using the search path and kpathsea.")
 {
-  SCM_ASSERT_TYPE (gh_string_p (name), name, SCM_ARG1, __FUNCTION__, "string");
+  SCM_ASSERT_TYPE (ly_string_p (name), name, SCM_ARG1, __FUNCTION__, "string");
   return scm_makfrom0str
     (kpathsea_gulp_file_to_string (ly_scm2string (name)).to_str0 ());
 }
index 2f7b7fd91d6dfeebe5a4fe803a1be0deb073f31c..f569ef4a7eb1b27807868431010244188f2f2c5b 100644 (file)
@@ -189,7 +189,7 @@ HYPHEN              --
        progress_indication ("\n");
        progress_indication (_f ("input renamed to: `%s'", s.to_str0 ()));
        progress_indication ("\n");
-       scm_module_define (gh_car (scopes_),
+       scm_module_define (ly_car (scopes_),
                     ly_symbol2scm ("input-file-name"),
                     scm_makfrom0str (s.to_str0()));
 
@@ -251,7 +251,7 @@ HYPHEN              --
          s = s.left_string (s.length () - 1);
 
        SCM sid = lookup_identifier (s);
-       if (gh_string_p (sid)) {
+       if (ly_string_p (sid)) {
                new_input (ly_scm2string (sid), &global_input_file->sources_);
                yy_pop_state ();
        } else { 
@@ -469,9 +469,9 @@ HYPHEN              --
                String str (YYText () + 1);
                SCM s = lookup_markup_command (str);
 
-               if (gh_pair_p (s) && gh_symbol_p (gh_cdr (s)) ) {
-                       yylval.scm = gh_car(s);
-                       SCM tag = gh_cdr(s);
+               if (ly_pair_p (s) && ly_symbol_p (ly_cdr (s)) ) {
+                       yylval.scm = ly_car(s);
+                       SCM tag = ly_cdr(s);
                        if (tag == ly_symbol2scm("markup0"))
                                return MARKUP_HEAD_MARKUP0;
                        if (tag == ly_symbol2scm("empty"))
@@ -538,7 +538,7 @@ HYPHEN              --
        int cnv=sscanf (YYText (), "%lf", &r);
        assert (cnv == 1);
 
-       yylval.scm = gh_double2scm (r);
+       yylval.scm = scm_make_real (r);
        return REAL;
 }
 
@@ -601,7 +601,7 @@ HYPHEN              --
 void
 My_lily_lexer::push_note_state (SCM tab)
 {
-       pitchname_tab_stack_ = gh_cons (tab, pitchname_tab_stack_);
+       pitchname_tab_stack_ = scm_cons (tab, pitchname_tab_stack_);
        yy_push_state (notes);
 }
 
@@ -613,7 +613,7 @@ My_lily_lexer::push_figuredbass_state()
 void
 My_lily_lexer::push_chord_state (SCM tab)
 {
-       pitchname_tab_stack_ = gh_cons (tab, pitchname_tab_stack_);
+       pitchname_tab_stack_ = scm_cons (tab, pitchname_tab_stack_);
        yy_push_state (chords);
 }
 
@@ -633,7 +633,7 @@ void
 My_lily_lexer::pop_state ()
 {
        if (YYSTATE == notes || YYSTATE == chords)
-               pitchname_tab_stack_ = gh_cdr (pitchname_tab_stack_);
+               pitchname_tab_stack_ = ly_cdr (pitchname_tab_stack_);
        yy_pop_state ();
 }
 
@@ -677,14 +677,14 @@ My_lily_lexer::scan_bare_word (String str)
        SCM sym = ly_symbol2scm (str.to_str0 ());
        if ((YYSTATE == notes) || (YYSTATE == chords)) {
                SCM handle = SCM_BOOL_F;
-               if (gh_pair_p (pitchname_tab_stack_))
-                       handle = scm_hashq_get_handle (gh_car (pitchname_tab_stack_), sym);
+               if (ly_pair_p (pitchname_tab_stack_))
+                       handle = scm_hashq_get_handle (ly_car (pitchname_tab_stack_), sym);
                
-               if (gh_pair_p (handle)) {
+               if (ly_pair_p (handle)) {
                        yylval.scm = ly_cdr (handle);
                        if (unsmob_pitch (yylval.scm)) 
                            return (YYSTATE == notes) ? NOTENAME_PITCH : TONICNAME_PITCH;
-                       else if (gh_symbol_p (yylval.scm))
+                       else if (ly_symbol_p (yylval.scm))
                            return DRUM_PITCH;
                }
                else if ((handle = scm_hashq_get_handle (chordmodifier_tab_, sym))!= SCM_BOOL_F)
@@ -809,7 +809,7 @@ scan_fraction (String frac)
 
        int n = String_convert::dec2int (left);
        int d = String_convert::dec2int (right);
-       return gh_cons (gh_int2scm (n), gh_int2scm (d));
+       return scm_cons (scm_int2num (n), scm_int2num (d));
 }
 
 // Breaks for flex 2.5.31
index d2b9eec3205c7fc803e8ed9c06e53a2634be21e5..84c2303c55bd02570db151dd7f49474593010bc4 100644 (file)
@@ -59,7 +59,7 @@ ly_write2scm (SCM s)
   SCM write = scm_primitive_eval (ly_symbol2scm ("write"));
   
   // scm_apply (write, port, SCM_EOL);
-  gh_call2 (write, s, port);
+  scm_call_2 (write, s, port);
   return scm_strport_to_string (port);
 }
 
@@ -73,7 +73,7 @@ ly_quote_scm (SCM s)
 String
 ly_symbol2string (SCM s)
 {
-  assert (gh_symbol_p (s));
+  assert (ly_symbol_p (s));
   return String ((Byte*)SCM_STRING_CHARS (s), (int) SCM_STRING_LENGTH (s));
 }
 
@@ -107,7 +107,7 @@ LY_DEFINE (ly_gulp_file, "ly:gulp-file",
           "Read the file @var{name}, and return its contents in a string.  "
           "The file is looked up using the search path.")
 {
-  SCM_ASSERT_TYPE (gh_string_p (name), name, SCM_ARG1, __FUNCTION__, "string");
+  SCM_ASSERT_TYPE (ly_string_p (name), name, SCM_ARG1, __FUNCTION__, "string");
   return scm_makfrom0str (gulp_file_to_string (ly_scm2string (name)).to_str0 ());
 }
 
@@ -117,21 +117,44 @@ extern "C" {
 void
 ly_display_scm (SCM s)
 {
-  gh_display (s);
-  gh_newline ();
+  scm_display (s, scm_current_output_port ());
+  scm_newline (scm_current_output_port ());
 }
 };
 
 String
 ly_scm2string (SCM s)
 {
-  assert (gh_string_p (s));
+  assert (ly_string_p (s));
 
   char *p = SCM_STRING_CHARS (s);
   String r (p);
   return r;
 }
 
+char *
+ly_scm2newstr (SCM str, size_t *lenp)
+{
+  char *new_str;
+  size_t len;
+
+  SCM_ASSERT_TYPE (ly_string_p (str), str, SCM_ARG1, __FUNCTION__, "string");
+
+  len = SCM_STRING_LENGTH (str);
+  new_str = (char *) malloc ((len + 1) * sizeof (char));
+  
+  if (new_str == NULL)
+    return NULL;
+
+  memcpy (new_str, SCM_STRING_CHARS (str), len);
+  new_str[len] = '\0';
+
+  if (lenp != NULL)
+      *lenp = len;
+
+  return new_str;
+}
+
 SCM
 index_get_cell (SCM s, Direction d)
 {
@@ -144,16 +167,16 @@ SCM
 index_set_cell (SCM s, Direction d, SCM v)
 {
   if (d == LEFT)
-    gh_set_car_x (s, v);
+    scm_set_car_x (s, v);
   else if (d == RIGHT)
-    gh_set_cdr_x (s, v);
+    scm_set_cdr_x (s, v);
   return s;
 }
   
 LY_DEFINE (ly_warning,"ly:warn", 1, 0, 0,
   (SCM str), "Scheme callable function to issue the warning @code{msg}.")
 {
-  SCM_ASSERT_TYPE (gh_string_p (str), str, SCM_ARG1, __FUNCTION__, "string");
+  SCM_ASSERT_TYPE (ly_string_p (str), str, SCM_ARG1, __FUNCTION__, "string");
   progress_indication ("\n");
   warning ("lily-guile: " + ly_scm2string (str));
   return SCM_BOOL_T;
@@ -164,9 +187,9 @@ LY_DEFINE (ly_dir_p,  "ly:dir?", 1,0, 0,  (SCM s),
           "@code{1}, where @code{-1} represents "
          "left or down and @code{1} represents right or up.")
 {
-  if (gh_number_p (s))
+  if (ly_number_p (s))
     {
-      int i = gh_scm2int (s);
+      int i = ly_scm2int (s);
       return (i>= -1 && i <= 1)  ? SCM_BOOL_T : SCM_BOOL_F; 
     }
   return SCM_BOOL_F;
@@ -175,7 +198,7 @@ LY_DEFINE (ly_dir_p,  "ly:dir?", 1,0, 0,  (SCM s),
 bool
 is_number_pair (SCM p)
 {
-  return gh_pair_p (p) && gh_number_p (ly_car (p)) && gh_number_p (ly_cdr (p));
+  return ly_pair_p (p) && ly_number_p (ly_car (p)) && ly_number_p (ly_cdr (p));
 }
 
 typedef void (*Void_fptr) ();
@@ -222,9 +245,9 @@ unsigned int ly_scm_hash (SCM s)
 bool
 is_direction (SCM s)
 {
-  if (gh_number_p (s))
+  if (ly_number_p (s))
     {
-      int i = gh_scm2int (s);
+      int i = ly_scm2int (s);
       return i>= -1 && i <= 1; 
     }
   return false;
@@ -234,9 +257,9 @@ is_direction (SCM s)
 bool
 is_axis (SCM s)
 {
-  if (gh_number_p (s))
+  if (ly_number_p (s))
     {
-      int i = gh_scm2int (s);
+      int i = ly_scm2int (s);
       return i== 0 || i == 1;
     }
   return false;
@@ -245,32 +268,32 @@ is_axis (SCM s)
 Direction
 to_dir (SCM s)
 {
-  return SCM_INUMP (s) ? (Direction) gh_scm2int (s) : CENTER;
+  return SCM_INUMP (s) ? (Direction) ly_scm2int (s) : CENTER;
 }
 
 Interval
 ly_scm2interval (SCM p)
 {
-  return Interval (gh_scm2double (ly_car (p)), gh_scm2double (ly_cdr (p)));
+  return Interval (ly_scm2double (ly_car (p)), ly_scm2double (ly_cdr (p)));
 }
 
 Drul_array<Real>
 ly_scm2realdrul (SCM p)
 {
-  return Drul_array<Real> (gh_scm2double (ly_car (p)),
-                          gh_scm2double (ly_cdr (p)));
+  return Drul_array<Real> (ly_scm2double (ly_car (p)),
+                          ly_scm2double (ly_cdr (p)));
 }
 
 SCM
 ly_interval2scm (Drul_array<Real> i)
 {
-  return gh_cons (gh_double2scm (i[LEFT]), gh_double2scm (i[RIGHT]));
+  return scm_cons (scm_make_real (i[LEFT]), scm_make_real (i[RIGHT]));
 }
 
 bool
 to_boolean (SCM s)
 {
-  return gh_boolean_p (s) && gh_scm2bool (s);
+  return ly_boolean_p (s) && ly_scm2bool (s);
 }
 
 /* Appendable list L: the cdr contains the list, the car the last cons
@@ -278,8 +301,8 @@ to_boolean (SCM s)
 SCM
 appendable_list ()
 {
-  SCM s = gh_cons (SCM_EOL, SCM_EOL);
-  gh_set_car_x (s, s);
+  SCM s = scm_cons (SCM_EOL, SCM_EOL);
+  scm_set_car_x (s, s);
   
   return s;
 }
@@ -287,24 +310,24 @@ appendable_list ()
 void
 appendable_list_append (SCM l, SCM elt)
 {
-  SCM newcons = gh_cons (elt, SCM_EOL);
+  SCM newcons = scm_cons (elt, SCM_EOL);
   
-  gh_set_cdr_x (ly_car (l), newcons);      
-  gh_set_car_x (l, newcons);
+  scm_set_cdr_x (ly_car (l), newcons);      
+  scm_set_car_x (l, newcons);
 }
 
 
 SCM
 ly_offset2scm (Offset o)
 {
-  return gh_cons (gh_double2scm (o[X_AXIS]), gh_double2scm (o[Y_AXIS]));
+  return scm_cons (scm_make_real (o[X_AXIS]), scm_make_real (o[Y_AXIS]));
 }
 
 Offset
 ly_scm2offset (SCM s)
 {
-  return Offset (gh_scm2double (ly_car (s)),
-                gh_scm2double (ly_cdr (s)));
+  return Offset (ly_scm2double (ly_car (s)),
+                ly_scm2double (ly_cdr (s)));
 }
 
    
@@ -312,13 +335,13 @@ LY_DEFINE (ly_number2string, "ly:number->string",
           1, 0, 0, (SCM s),
           "Convert @var{num} to a string without generating many decimals.")
 {
-  SCM_ASSERT_TYPE (gh_number_p (s), s, SCM_ARG1, __FUNCTION__, "number");
+  SCM_ASSERT_TYPE (ly_number_p (s), s, SCM_ARG1, __FUNCTION__, "number");
 
   char str[400];                       // ugh.
 
   if (scm_exact_p (s) == SCM_BOOL_F)
     {
-      Real r (gh_scm2double (s));
+      Real r (ly_scm2double (s));
 
       if (my_isinf (r) || my_isnan (r))
        {
@@ -329,7 +352,7 @@ LY_DEFINE (ly_number2string, "ly:number->string",
       sprintf (str, "%08.4f", r);
     }
   else
-    sprintf (str, "%d", gh_scm2int (s));
+    sprintf (str, "%d", ly_scm2int (s));
 
   return scm_makfrom0str (str);
 }
@@ -362,7 +385,7 @@ LY_DEFINE (ly_version,  "ly:version", 0, 0, 0, (),
 {
   char const* vs = "\'(" MAJOR_VERSION " " MINOR_VERSION " "  PATCH_LEVEL " " MY_PATCH_LEVEL ")" ;
   
-  return gh_eval_str ((char*)vs);
+  return scm_c_eval_string ((char*)vs);
 }
 
 LY_DEFINE (ly_unit,  "ly:unit", 0, 0, 0, (),
@@ -394,15 +417,15 @@ ADD_SCM_INIT_FUNC (funcs, init_functions);
 SCM
 ly_deep_copy (SCM src)
 {
-  if (gh_pair_p (src))
-    return gh_cons (ly_deep_copy (ly_car (src)), ly_deep_copy (ly_cdr (src)));
-  else if (gh_vector_p (src))
+  if (ly_pair_p (src))
+    return scm_cons (ly_deep_copy (ly_car (src)), ly_deep_copy (ly_cdr (src)));
+  else if (ly_vector_p (src))
     {
       int len = SCM_VECTOR_LENGTH (src);
       SCM nv = scm_c_make_vector (len, SCM_UNDEFINED);
       for (int i  =0 ; i < len ; i++)
        {
-         SCM si = gh_int2scm (i);
+         SCM si = scm_int2num (i);
          scm_vector_set_x (nv, si, ly_deep_copy (scm_vector_ref (src, si))); 
        }
     }
@@ -415,10 +438,10 @@ ly_deep_copy (SCM src)
 SCM
 ly_assoc_chain (SCM key, SCM achain)
 {
-  if (gh_pair_p (achain))
+  if (ly_pair_p (achain))
     {
       SCM handle = scm_assoc (key, ly_car (achain));
-      if (gh_pair_p (handle))
+      if (ly_pair_p (handle))
        return handle;
       else
        return ly_assoc_chain (key, ly_cdr (achain));
@@ -449,14 +472,14 @@ corresponds to call
 SCM
 ly_assoc_cdr (SCM key, SCM alist)
 {
-  if (gh_pair_p (alist))
-  {
-    SCM trykey = ly_caar (alist);
-    if (gh_pair_p (trykey) && to_boolean (scm_equal_p (key, ly_cdr (trykey))))
-    return ly_car (alist);
-    else
-    return ly_assoc_cdr (key, ly_cdr (alist));
-  }
+  if (ly_pair_p (alist))
+    {
+      SCM trykey = ly_caar (alist);
+      if (ly_pair_p (trykey) && to_boolean (scm_equal_p (key, ly_cdr (trykey))))
+       return ly_car (alist);
+      else
+       return ly_assoc_cdr (key, ly_cdr (alist));
+    }
   return SCM_BOOL_F;
 }
 
@@ -486,7 +509,7 @@ parse_symbol_list (char const *lst)
       if (next)
        *next++ = 0;
 
-      create_list = gh_cons (ly_symbol2scm (s), create_list);
+      create_list = scm_cons (ly_symbol2scm (s), create_list);
       s = next;
     }
 
@@ -503,11 +526,11 @@ ly_truncate_list (int k, SCM lst)
     {
       SCM s = lst;
       k--;
-      for (; gh_pair_p (s) && k--; s = ly_cdr (s))
+      for (; ly_pair_p (s) && k--; s = ly_cdr (s))
        ;
 
-      if (gh_pair_p (s))
-       gh_set_cdr_x (s, SCM_EOL);
+      if (ly_pair_p (s))
+       scm_set_cdr_x (s, SCM_EOL);
     }
   return lst;
 }
@@ -537,7 +560,7 @@ type_check_assignment (SCM sym, SCM val,  SCM type_symbol)
   if (val == SCM_EOL || val == SCM_BOOL_F)
     return ok;
 
-  if (!gh_symbol_p (sym))
+  if (!ly_symbol_p (sym))
 #if 0
     return false;
 #else
@@ -554,7 +577,7 @@ type_check_assignment (SCM sym, SCM val,  SCM type_symbol)
   
   SCM type = scm_object_property (sym, type_symbol);
 
-  if (type != SCM_EOL && !gh_procedure_p (type))
+  if (type != SCM_EOL && !ly_procedure_p (type))
       {
        warning (_f ("Can't find property type-check for `%s' (%s).",
                     ly_symbol2string (sym).to_str0 (),
@@ -570,13 +593,13 @@ type_check_assignment (SCM sym, SCM val,  SCM type_symbol)
   else
     {
       if (val != SCM_EOL
-         && gh_procedure_p (type)
-         && gh_call1 (type, val) == SCM_BOOL_F)
+         && ly_procedure_p (type)
+         && scm_call_1 (type, val) == SCM_BOOL_F)
        {
          SCM errport = scm_current_error_port ();
          ok = false;
          SCM typefunc = ly_scheme_function ("type-name");
-         SCM type_name = gh_call1 (typefunc, type);
+         SCM type_name = scm_call_1 (typefunc, type);
 
         
          scm_puts (_f ("Type check for `%s' failed; value `%s' must be of type `%s'",
@@ -602,11 +625,11 @@ SCM
 ly_unique (SCM list)
 {
   SCM unique = SCM_EOL;
-  for (SCM i = list; gh_pair_p (i); i = ly_cdr (i))
+  for (SCM i = list; ly_pair_p (i); i = ly_cdr (i))
     {
-      if (!gh_pair_p (ly_cdr (i))
-         || !gh_equal_p (ly_car (i), ly_cadr (i)))
-       unique = gh_cons (ly_car (i), unique);
+      if (!ly_pair_p (ly_cdr (i))
+         || !ly_equal_p (ly_car (i), ly_cadr (i)))
+       unique = scm_cons (ly_car (i), unique);
     }
   return scm_reverse_x (unique, SCM_EOL);
 }
@@ -615,7 +638,7 @@ ly_unique (SCM list)
 SCM
 ly_snoc (SCM s, SCM list)
 {
-  return gh_append2 (list, scm_list_n (s, SCM_UNDEFINED));
+  return ly_append2 (list, scm_list_n (s, SCM_UNDEFINED));
 }
 
 /* Split list at member s, removing s.
@@ -625,15 +648,15 @@ ly_split_list (SCM s, SCM list)
 {
   SCM before = SCM_EOL;
   SCM after = list;
-  for (; gh_pair_p (after);)
+  for (; ly_pair_p (after);)
     {
       SCM i = ly_car (after);
       after = ly_cdr (after);
-      if (gh_equal_p (i, s))
+      if (ly_equal_p (i, s))
        break;
-      before = gh_cons (i, before);
+      before = scm_cons (i, before);
     }
-  return gh_cons ( scm_reverse_x (before, SCM_EOL),  after);
+  return scm_cons ( scm_reverse_x (before, SCM_EOL),  after);
   
 }
 
@@ -655,9 +678,9 @@ display_list (SCM s)
   SCM p = scm_current_output_port ();
 
   scm_puts ("(", p);
-  for (; gh_pair_p (s); s =gh_cdr (s))
+  for (; ly_pair_p (s); s =ly_cdr (s))
     {
-      scm_display (gh_car (s), p);
+      scm_display (ly_car (s), p);
       scm_puts (" ", p);      
     }
   scm_puts (")", p);
@@ -669,9 +692,9 @@ int_list_to_slice (SCM l)
 {
   Slice s;
   s.set_empty ();
-  for (; gh_pair_p (l); l = gh_cdr (l))
-    if (gh_number_p (gh_car (l)))
-      s.add_point (gh_scm2int (gh_car (l))); 
+  for (; ly_pair_p (l); l = ly_cdr (l))
+    if (ly_number_p (ly_car (l)))
+      s.add_point (ly_scm2int (ly_car (l))); 
   return s;
 }
 
@@ -682,16 +705,16 @@ int_list_to_slice (SCM l)
 SCM
 robust_list_ref (int i, SCM l)
 {
-  while (i-- > 0 && gh_pair_p (gh_cdr (l)))
-    l = gh_cdr (l);
-  return gh_car (l);
+  while (i-- > 0 && ly_pair_p (ly_cdr (l)))
+    l = ly_cdr (l);
+  return ly_car (l);
 }
 
 Real
 robust_scm2double (SCM k, double x)
 {
-  if (gh_number_p (k))
-    x = gh_scm2double (k);
+  if (ly_number_p (k))
+    x = ly_scm2double (k);
   return x;
 }
 
@@ -726,7 +749,7 @@ int
 robust_scm2int (SCM k, int o)
 {
   if (scm_integer_p (k) == SCM_BOOL_T)
-    o = gh_scm2int (k);
+    o = ly_scm2int (k);
   return o;
 }
 
@@ -735,10 +758,10 @@ alist_to_hashq (SCM alist)
 {
   int i = scm_ilength (alist);
   if (i < 0)
-    return scm_make_vector (gh_int2scm (0), SCM_EOL);
+    return scm_make_vector (scm_int2num (0), SCM_EOL);
          
-  SCM tab = scm_make_vector (gh_int2scm (i), SCM_EOL);
-  for (SCM s = alist; gh_pair_p (s); s = ly_cdr (s))
+  SCM tab = scm_make_vector (scm_int2num (i), SCM_EOL);
+  for (SCM s = alist; ly_pair_p (s); s = ly_cdr (s))
     {
       SCM pt = ly_cdar (s);
       scm_hashq_set_x (tab, ly_caar (s), pt);
index eb5f8e975626707ed17ca8814e5cf0aae42080e0..fe05630ed16ce1f9bb87c18756b1089260a8cb15 100644 (file)
@@ -24,11 +24,11 @@ Line_interface::make_dashed_line (Real thick, Offset from, Offset to,
   Real off = dash_period - on;
   
   SCM at = scm_list_n (ly_symbol2scm ("dashed-line"),
-                       gh_double2scm (thick), 
-                       gh_double2scm (on),
-                       gh_double2scm (off),
-                       gh_double2scm (to[X_AXIS] - from[X_AXIS]),
-                       gh_double2scm (to[Y_AXIS] - from[Y_AXIS]),
+                       scm_make_real (thick), 
+                       scm_make_real (on),
+                       scm_make_real (off),
+                       scm_make_real (to[X_AXIS] - from[X_AXIS]),
+                       scm_make_real (to[Y_AXIS] - from[Y_AXIS]),
                        SCM_UNDEFINED);
   
   Box box;
@@ -47,11 +47,11 @@ Stencil
 Line_interface::make_line (Real th, Offset from, Offset to)
 {
   SCM at = scm_list_n (ly_symbol2scm ("draw-line"),
-                       gh_double2scm (th), 
-                       gh_double2scm (from[X_AXIS]),
-                       gh_double2scm (from[Y_AXIS]),
-                       gh_double2scm (to[X_AXIS]),
-                       gh_double2scm (to[Y_AXIS]),
+                       scm_make_real (th), 
+                       scm_make_real (from[X_AXIS]),
+                       scm_make_real (from[Y_AXIS]),
+                       scm_make_real (to[X_AXIS]),
+                       scm_make_real (to[Y_AXIS]),
                        SCM_UNDEFINED);
 
   Box box;
@@ -73,7 +73,7 @@ Line_interface::line (Grob *me, Offset from, Offset to)
   SCM type = me->get_property ("style");
 
   SCM dash_fraction = me->get_property ("dash-fraction");
-  if (gh_number_p (dash_fraction) || type == ly_symbol2scm ("dotted-line"))
+  if (ly_number_p (dash_fraction) || type == ly_symbol2scm ("dotted-line"))
     {
       
       Real fraction
index f0d9c1dbd11f24af6eb970bc0fc2daa33c49b3d7..4c62a01e0d72dc7bf5bb30f71da3dddd55b8d3a7 100644 (file)
@@ -40,12 +40,12 @@ zigzag_stencil (Grob *me,
   double h = l>w/2 ? sqrt (l*l-w*w/4) : 0;
   
   SCM list = scm_list_n (ly_symbol2scm ("zigzag-line"),
-                     gh_bool2scm (true),
-                     gh_double2scm (w),
-                     gh_double2scm (h),
-                     gh_double2scm (thick),
-                     gh_double2scm (dx),
-                     gh_double2scm (dy),
+                     ly_bool2scm (true),
+                     scm_make_real (w),
+                     scm_make_real (h),
+                     scm_make_real (thick),
+                     scm_make_real (dx),
+                     scm_make_real (dy),
                      SCM_UNDEFINED);
   Box b;
   b.add_point (Offset (0,0));
@@ -98,7 +98,7 @@ Line_spanner::line_stencil (Grob *me,
 {
   Offset dz = to -from ; 
   SCM type = me->get_property ("style");
-  if (gh_symbol_p (type)
+  if (ly_symbol_p (type)
       && (type == ly_symbol2scm ("line")
          || type == ly_symbol2scm ("dashed-line")
          || type == ly_symbol2scm ("dotted-line")
@@ -109,16 +109,16 @@ Line_spanner::line_stencil (Grob *me,
        ? zigzag_stencil (me, from, to)
        : Line_interface::line (me, from, to);
     }
-  else if (gh_symbol_p (type)
+  else if (ly_symbol_p (type)
           && type == ly_symbol2scm ("trill"))
     {
       SCM alist_chain = Font_interface::text_font_alist_chain (me);
-      SCM style_alist = scm_list_n (gh_cons (ly_symbol2scm ("font-encoding"),
+      SCM style_alist = scm_list_n (scm_cons (ly_symbol2scm ("font-encoding"),
                                             ly_symbol2scm ("music")),
                                    SCM_UNDEFINED);
       
       Font_metric *fm = select_font (me->get_paper (),
-                                    gh_cons (style_alist,
+                                    scm_cons (style_alist,
                                              alist_chain));
       Stencil m = fm->find_by_name ("scripts-trill-element");
       Stencil mol;
index 3d395f137c60bb18521cb1424232a6178411176e..37a3da0b10a2f958143a2cbc91964458a7d94e01 100644 (file)
@@ -27,9 +27,9 @@ Stencil
 Lookup::dot (Offset p, Real radius)
 {
   SCM at = (scm_list_n (ly_symbol2scm ("dot"),
-                       gh_double2scm (p[X_AXIS]),
-                       gh_double2scm (p[Y_AXIS]),
-                       gh_double2scm (radius),
+                       scm_make_real (p[X_AXIS]),
+                       scm_make_real (p[Y_AXIS]),
+                       scm_make_real (radius),
                        SCM_UNDEFINED));
   Box box;
   box.add_point (p - Offset (radius, radius));
@@ -67,10 +67,10 @@ Lookup::beam (Real slope, Real width, Real thick, Real blot)
         Interval (min_y, max_y));
   
   SCM at = scm_list_n (ly_symbol2scm ("beam"),
-                   gh_double2scm (width),
-                   gh_double2scm (slope),
-                   gh_double2scm (thick),
-                   gh_double2scm (blot),
+                   scm_make_real (width),
+                   scm_make_real (slope),
+                   scm_make_real (thick),
+                   scm_make_real (blot),
                    SCM_UNDEFINED);
   return Stencil (b, at);
 }
@@ -82,12 +82,12 @@ Lookup::dashed_slur (Bezier b, Real thick, Real dash)
 
   for (int i= 4; i -- ;)
     {
-      l = gh_cons (ly_offset2scm (b.control_[i]), l);
+      l = scm_cons (ly_offset2scm (b.control_[i]), l);
     }
 
   SCM at = (scm_list_n (ly_symbol2scm ("dashed-slur"),
-                              gh_double2scm (thick), 
-                              gh_double2scm (dash),
+                              scm_make_real (thick), 
+                              scm_make_real (dash),
                               ly_quote_scm (l),
                               SCM_UNDEFINED));
 
@@ -101,9 +101,9 @@ Stencil
 Lookup::horizontal_line (Interval w, Real th)
 {
   SCM at = scm_list_n (ly_symbol2scm ("horizontal-line"),
-                      gh_double2scm (w[LEFT]), 
-                      gh_double2scm (w[RIGHT]),
-                      gh_double2scm (th),
+                      scm_make_real (w[LEFT]), 
+                      scm_make_real (w[RIGHT]),
+                      scm_make_real (th),
                       SCM_UNDEFINED);
 
 
@@ -125,10 +125,10 @@ Stencil
 Lookup::filled_box (Box b) 
 {
   SCM  at  = (scm_list_n (ly_symbol2scm ("filledbox"),
-                    gh_double2scm (-b[X_AXIS][LEFT]),
-                    gh_double2scm (b[X_AXIS][RIGHT]),                 
-                    gh_double2scm (-b[Y_AXIS][DOWN]),
-                    gh_double2scm (b[Y_AXIS][UP]),                    
+                    scm_make_real (-b[X_AXIS][LEFT]),
+                    scm_make_real (b[X_AXIS][RIGHT]),                 
+                    scm_make_real (-b[Y_AXIS][DOWN]),
+                    scm_make_real (b[Y_AXIS][UP]),                    
                     SCM_UNDEFINED));
 
   return Stencil (b,at);
@@ -176,11 +176,11 @@ Lookup::round_filled_box (Box b, Real blotdiameter)
     }
 
   SCM at = (scm_list_n (ly_symbol2scm ("round-filled-box"),
-                       gh_double2scm (-b[X_AXIS][LEFT]),
-                       gh_double2scm (b[X_AXIS][RIGHT]),
-                       gh_double2scm (-b[Y_AXIS][DOWN]),
-                       gh_double2scm (b[Y_AXIS][UP]),
-                       gh_double2scm (blotdiameter),
+                       scm_make_real (-b[X_AXIS][LEFT]),
+                       scm_make_real (b[X_AXIS][RIGHT]),
+                       scm_make_real (-b[Y_AXIS][DOWN]),
+                       scm_make_real (b[Y_AXIS][UP]),
+                       scm_make_real (blotdiameter),
                        SCM_UNDEFINED));
 
   return Stencil (b,at);
@@ -306,14 +306,14 @@ Lookup::round_filled_polygon (Array<Offset> points, Real blotdiameter)
   Box box;
   for (int i = 0; i < shrinked_points.size (); i++)
     {
-      SCM x = gh_double2scm (shrinked_points[i][X_AXIS]);
-      SCM y = gh_double2scm (shrinked_points[i][Y_AXIS]);
-      shrinked_points_scm = gh_cons (x, gh_cons (y, shrinked_points_scm));
+      SCM x = scm_make_real (shrinked_points[i][X_AXIS]);
+      SCM y = scm_make_real (shrinked_points[i][Y_AXIS]);
+      shrinked_points_scm = scm_cons (x, scm_cons (y, shrinked_points_scm));
       box.add_point (points[i]);
     }
   SCM polygon_scm = scm_list_n (ly_symbol2scm ("polygon"),
                                ly_quote_scm (shrinked_points_scm),
-                               gh_double2scm (blotdiameter),
+                               scm_make_real (blotdiameter),
                                SCM_UNDEFINED);
 
   Stencil polygon = Stencil (box, polygon_scm);
@@ -377,13 +377,13 @@ Lookup::slur (Bezier curve, Real curvethick, Real linethick)
   SCM list = SCM_EOL;
   for (int i= 8; i--;)
     {
-      list = gh_cons (scontrols[indices[i]], list);
+      list = scm_cons (scontrols[indices[i]], list);
     }
   
   
   SCM at = (scm_list_n (ly_symbol2scm ("bezier-sandwich"),
                     ly_quote_scm (list),
-                    gh_double2scm (linethick),
+                    scm_make_real (linethick),
                     SCM_UNDEFINED));
   Box b (curve.extent (X_AXIS),
        curve.extent (Y_AXIS));
@@ -424,18 +424,18 @@ Lookup::bezier_sandwich (Bezier top_curve, Bezier bottom_curve)
     Need the weird order b.o. the way PS want its arguments  
    */
   SCM list = SCM_EOL;
-  list = gh_cons (ly_offset2scm (bottom_curve.control_[3]), list);
-  list = gh_cons (ly_offset2scm (bottom_curve.control_[0]), list);
-  list = gh_cons (ly_offset2scm (bottom_curve.control_[1]), list);
-  list = gh_cons (ly_offset2scm (bottom_curve.control_[2]), list);
-  list = gh_cons (ly_offset2scm (top_curve.control_[0]), list);
-  list = gh_cons (ly_offset2scm (top_curve.control_[3]), list);
-  list = gh_cons (ly_offset2scm (top_curve.control_[2]), list);
-  list = gh_cons (ly_offset2scm (top_curve.control_[1]), list);
+  list = scm_cons (ly_offset2scm (bottom_curve.control_[3]), list);
+  list = scm_cons (ly_offset2scm (bottom_curve.control_[0]), list);
+  list = scm_cons (ly_offset2scm (bottom_curve.control_[1]), list);
+  list = scm_cons (ly_offset2scm (bottom_curve.control_[2]), list);
+  list = scm_cons (ly_offset2scm (top_curve.control_[0]), list);
+  list = scm_cons (ly_offset2scm (top_curve.control_[3]), list);
+  list = scm_cons (ly_offset2scm (top_curve.control_[2]), list);
+  list = scm_cons (ly_offset2scm (top_curve.control_[1]), list);
 
   SCM horizontal_bend = scm_list_n (ly_symbol2scm ("bezier-sandwich"),
                                    ly_quote_scm (list),
-                                   gh_double2scm (0.0),
+                                   scm_make_real (0.0),
                                    SCM_UNDEFINED);
 
   Interval x_extent = top_curve.extent (X_AXIS);
@@ -651,9 +651,9 @@ Lookup::accordion (SCM s, Real staff_space, Font_metric *fm)
 Stencil
 Lookup::repeat_slash (Real w, Real s, Real t)
 {
-  SCM wid = gh_double2scm (w);
-  SCM sl = gh_double2scm (s);
-  SCM thick = gh_double2scm (t);
+  SCM wid = scm_make_real (w);
+  SCM sl = scm_make_real (s);
+  SCM thick = scm_make_real (t);
   SCM slashnodot = scm_list_n (ly_symbol2scm ("repeat-slash"),
                            wid, sl, thick, SCM_UNDEFINED);
 
@@ -693,9 +693,9 @@ Lookup::triangle (Interval iv, Real thick, Real protude)
   b[Y_AXIS] = Interval (0 <? protude , 0 >? protude);
 
   SCM s = scm_list_n (ly_symbol2scm ("symmetric-x-triangle"),
-                     gh_double2scm (thick),
-                     gh_double2scm (iv.length ()), 
-                     gh_double2scm (protude), SCM_UNDEFINED);
+                     scm_make_real (thick),
+                     scm_make_real (iv.length ()), 
+                     scm_make_real (protude), SCM_UNDEFINED);
 
   return Stencil (b, s);
 }
@@ -710,14 +710,14 @@ LY_DEFINE (ly_bracket ,"ly:bracket",
 {
   SCM_ASSERT_TYPE (is_axis (a), a, SCM_ARG1, __FUNCTION__, "axis") ;
   SCM_ASSERT_TYPE (is_number_pair (iv), iv, SCM_ARG2, __FUNCTION__, "number pair") ;
-  SCM_ASSERT_TYPE (gh_number_p (t), a, SCM_ARG3, __FUNCTION__, "number") ;
-  SCM_ASSERT_TYPE (gh_number_p (p), a, SCM_ARG4, __FUNCTION__, "number") ;
+  SCM_ASSERT_TYPE (ly_number_p (t), a, SCM_ARG3, __FUNCTION__, "number") ;
+  SCM_ASSERT_TYPE (ly_number_p (p), a, SCM_ARG4, __FUNCTION__, "number") ;
 
 
-  return Lookup::bracket ((Axis)gh_scm2int (a), ly_scm2interval (iv),
-                         gh_scm2double (t),
-                         gh_scm2double (p),
-                         0.95 * gh_scm2double (t)).smobbed_copy ();
+  return Lookup::bracket ((Axis)ly_scm2int (a), ly_scm2interval (iv),
+                         ly_scm2double (t),
+                         ly_scm2double (p),
+                         0.95 * ly_scm2double (t)).smobbed_copy ();
 }
 
 
@@ -732,9 +732,9 @@ LY_DEFINE (ly_filled_box ,"ly:round-filled-box",
 {
   SCM_ASSERT_TYPE (is_number_pair (xext), xext, SCM_ARG1, __FUNCTION__, "number pair") ;
   SCM_ASSERT_TYPE (is_number_pair (yext), yext, SCM_ARG2, __FUNCTION__, "number pair") ;
-  SCM_ASSERT_TYPE (gh_number_p (blot), blot, SCM_ARG3, __FUNCTION__, "number") ;
+  SCM_ASSERT_TYPE (ly_number_p (blot), blot, SCM_ARG3, __FUNCTION__, "number") ;
 
   return Lookup::round_filled_box (Box (ly_scm2interval (xext), ly_scm2interval (yext)),
-                                  gh_scm2double (blot)).smobbed_copy ();
+                                  ly_scm2double (blot)).smobbed_copy ();
 }
 
index ea0e7c67f899625ee4345baf2b42dfb3c5d38b81..7e22dcf202d720ce87dfc729a85df3d063e96932 100644 (file)
@@ -40,11 +40,11 @@ ly_clear_anonymous_modules ()
   SCM s = anon_modules;
   anon_modules = SCM_EOL;
   
-  for (; gh_pair_p (s) ; s = gh_cdr (s))
+  for (; ly_pair_p (s) ; s = ly_cdr (s))
     {
       SCM tab= scm_c_make_hash_table (2);
       /* UGH. */
-      SCM_STRUCT_DATA (gh_car (s))[scm_module_index_obarray]
+      SCM_STRUCT_DATA (ly_car (s))[scm_module_index_obarray]
        = (long unsigned int) tab;
     }
 }
@@ -121,7 +121,7 @@ ly_module_lookup (SCM module, SCM sym)
 SCM
 ly_modules_lookup (SCM modules, SCM sym)
 {
-  for (SCM s = gh_car (modules); SCM_MODULEP (s); s = ly_cdr (s))
+  for (SCM s = ly_car (modules); SCM_MODULEP (s); s = ly_cdr (s))
     {
       SCM v = scm_sym2var (sym, scm_module_lookup_closure (s), SCM_UNDEFINED);
       if (v != SCM_UNDEFINED)
index 74c076670bdc9282660bd40edf7554fde6fce306..b459aac1cc06a84407503582528e0912ea52ad0c 100644 (file)
@@ -45,9 +45,9 @@ melisma_busy (Context* tr)
   SCM melisma_properties = tr->get_property ("melismaBusyProperties");
   bool busy = false;
 
-  for (; gh_pair_p (melisma_properties);
-       melisma_properties = gh_cdr (melisma_properties))
-    busy = busy || to_boolean (tr->internal_get_property (gh_car (melisma_properties)));
+  for (; ly_pair_p (melisma_properties);
+       melisma_properties = ly_cdr (melisma_properties))
+    busy = busy || to_boolean (tr->internal_get_property (ly_car (melisma_properties)));
 
   return busy;
 }
@@ -128,10 +128,10 @@ Lyric_combine_music_iterator::get_busy_status () const
 
   SCM grobs = tr->get_property ("busyGrobs");
   Moment now = tr->now_mom ();
-  for (; gh_pair_p (grobs); grobs = gh_cdr (grobs))
+  for (; ly_pair_p (grobs); grobs = ly_cdr (grobs))
     {
-      SCM grob = gh_cdar (grobs);
-      Moment end  =*unsmob_moment (gh_caar (grobs));
+      SCM grob = ly_cdar (grobs);
+      Moment end  =*unsmob_moment (ly_caar (grobs));
 
       
       /*
index 916510732b4cc9425ba9fdefda8754c672cff732..420677d9047f49b35d1fd098e261d8b47088c13a 100644 (file)
@@ -25,9 +25,9 @@ Music*
 Lyric_combine_music::get_music () const
 {
   SCM l = get_property ("elements");
-  if (!gh_pair_p (l))
+  if (!ly_pair_p (l))
     return 0;
-  return unsmob_music (gh_car (l));
+  return unsmob_music (ly_car (l));
 }
 
 
@@ -35,12 +35,12 @@ Music*
 Lyric_combine_music::get_lyrics () const
 {
   SCM l = get_property ("elements");
-  if (!gh_pair_p (l))
+  if (!ly_pair_p (l))
     return 0;
-  l = gh_cdr (l);
-  if (!gh_pair_p (l))
+  l = ly_cdr (l);
+  if (!ly_pair_p (l))
     return 0;
-  return unsmob_music (gh_car (l));
+  return unsmob_music (ly_car (l));
 }
 
 
index dbb159b8afa7bf07bcd61f3875b3d275adb5dfc5..361d73a9aecbc9c01298d699d65fffa82769219d 100644 (file)
@@ -76,7 +76,7 @@ get_voice_to_lyrics (Context *lyrics)
   SCM voice = lyrics->get_property ("associatedVoice");
   String nm = lyrics->id_string_;
 
-  if (gh_string_p (voice))
+  if (ly_string_p (voice))
     nm = ly_scm2string (voice);
   else
     {
@@ -97,9 +97,9 @@ Grob *
 get_current_note_head (Context * voice)
 {
   for (SCM s = voice->get_property ("busyGrobs");
-       gh_pair_p (s); s = gh_cdr (s))
+       ly_pair_p (s); s = ly_cdr (s))
     {
-      Item*g = dynamic_cast<Item*> (unsmob_grob (gh_cdar (s)));
+      Item*g = dynamic_cast<Item*> (unsmob_grob (ly_cdar (s)));
          
       if (g && !g->get_column ()
          && Note_head::has_interface (g))
@@ -124,7 +124,7 @@ Lyric_engraver::stop_translation_timestep ()
            {
              text_->set_parent (head, X_AXIS);
              if (melisma_busy (voice))
-               text_->set_property ("self-alignment-X", gh_int2scm (LEFT)); 
+               text_->set_property ("self-alignment-X", scm_int2num (LEFT)); 
            }
        }
       
index 2cc834ef9f5c4eb9194374a2cff0d0e47a43cb75..331c07ca404b7e15d55ef7cddc5ae53df20a0107 100644 (file)
@@ -40,7 +40,7 @@ Lyric_performer::create_audio_elements ()
 {
   // FIXME: won't work with fancy lyrics
   if (lreqs_.size ()
-      && gh_string_p (lreqs_[0]->get_property ("text"))
+      && ly_string_p (lreqs_[0]->get_property ("text"))
       && ly_scm2string (lreqs_[0]->get_property ("text")).length ())
     {
       audio_ = new Audio_text (Audio_text::LYRIC,
index 50a46a148835f56d42a67eb773ba494c63fb9ced..6748d944db110f0411cfd18e2a015a2f35f0c2c0 100644 (file)
@@ -276,7 +276,7 @@ main_with_guile (void *, int, char **)
   all_fonts_global = new All_font_metrics (global_path.to_string ());
 
   init_scheme_code_string += ")";
-  gh_eval_str ((char*) init_scheme_code_string.to_str0 ());
+  scm_c_eval_string ((char*) init_scheme_code_string.to_str0 ());
 
   /* We accept multiple independent music files on the command line to
      reduce compile time when processing lots of small files.
index 026e817645e77aac736e8c4a2416a854025fa8f9..bf537dfbdf56259ee6a7163e90e1890169d48160 100644 (file)
@@ -113,21 +113,21 @@ Mark_engraver::process_music ()
       SCM m = mark_ev_->get_property ("label");
       SCM proc = get_property ("markFormatter");
       if (!Text_item::markup_p (m) &&
-         gh_procedure_p (proc))
+         ly_procedure_p (proc))
        {
-         if (!gh_number_p (m)) 
+         if (!ly_number_p (m)) 
            m =  get_property ("rehearsalMark");
 
          if (scm_integer_p (m) == SCM_BOOL_T
              && scm_exact_p (m) == SCM_BOOL_T)
            {
-             int mark_count = gh_scm2int (m);
+             int mark_count = ly_scm2int (m);
              mark_count ++;
              daddy_context_->set_property ("rehearsalMark",
-                                           gh_int2scm (mark_count));
+                                           scm_int2num (mark_count));
            }
 
-         if (gh_number_p (m))
+         if (ly_number_p (m))
            m = scm_call_2 (proc, m, daddy_context_->self_scm ());
          else
            warning ("rehearsalMark does not have integer value.");
index 67720943c835e5636b7a189b5005dc5a2555adfc..966fa908b6e3757bcc822cdaf1d9a66bc5b29211 100644 (file)
@@ -64,7 +64,7 @@ Measure_grouping_engraver::process_music ()
     return; 
   
   SCM grouping = get_property ("beatGrouping");
-  if (gh_pair_p (grouping))
+  if (ly_pair_p (grouping))
     {
       Moment *measpos = unsmob_moment (get_property ("measurePosition"));
       Rational mp = measpos->main_part_;
@@ -73,12 +73,12 @@ Measure_grouping_engraver::process_music ()
       Rational bl = beatlen->main_part_;
        
       Rational where (0);
-      for (SCM s = grouping; gh_pair_p (s);
-          where += Rational (gh_scm2int (gh_car (s))) * bl,
-          s = gh_cdr (s)
+      for (SCM s = grouping; ly_pair_p (s);
+          where += Rational (ly_scm2int (ly_car (s))) * bl,
+          s = ly_cdr (s)
           )
        {
-         int grouplen = gh_scm2int (gh_car (s));
+         int grouplen = ly_scm2int (ly_car (s));
          if (where == mp)
            {
              if (grouping_)
index 0cc041843b9a0e46029b1c6b144b97d8e8727c2e..867fc73d89b9f32d2a02a892cae7ea6b2c23deb7 100644 (file)
@@ -211,7 +211,7 @@ Mensural_ligature_engraver::apply_transition (Array<Grob_info> primitives,
            programming_error ("last_primitive undefined");
            break;
          }
-       last_primitive->set_property ("primitive", gh_int2scm (output));
+       last_primitive->set_property ("primitive", scm_int2num (output));
        break;
       case MLP_BB:
       case MLP_LB:
@@ -226,8 +226,8 @@ Mensural_ligature_engraver::apply_transition (Array<Grob_info> primitives,
            programming_error ("primitive undefined");
            break;
          }
-       last_primitive->set_property ("primitive", gh_int2scm (output));
-       primitive->set_property ("primitive", gh_int2scm (MLP_NONE));
+       last_primitive->set_property ("primitive", scm_int2num (output));
+       primitive->set_property ("primitive", scm_int2num (MLP_NONE));
        break;
       case MLP_SS:
        // delayed primitive with two note heads
@@ -241,8 +241,8 @@ Mensural_ligature_engraver::apply_transition (Array<Grob_info> primitives,
            programming_error ("last_primitive undefined");
            break;
          }
-       last_last_primitive->set_property ("primitive", gh_int2scm (output));
-       last_primitive->set_property ("primitive", gh_int2scm (MLP_NONE));
+       last_last_primitive->set_property ("primitive", scm_int2num (output));
+       last_primitive->set_property ("primitive", scm_int2num (MLP_NONE));
        break;
       default:
        programming_error (_f ("unexpected case fall-through"));
@@ -357,27 +357,27 @@ 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 = gh_scm2int (primitive->get_property ("primitive"));
+      int output = ly_scm2int (primitive->get_property ("primitive"));
       primitive->set_property ("thickness",
-                                   gh_double2scm (thickness));
+                                   scm_make_real (thickness));
       switch (output) {
        case MLP_NONE:
          primitive->set_property ("head-width",
-                                       gh_double2scm (half_flexa_width));
+                                       scm_make_real (half_flexa_width));
          break;
        case MLP_sc:
        case MLP_ss:
        case MLP_cs:
          primitive->set_property ("head-width",
-                                       gh_double2scm (head_width));
+                                       scm_make_real (head_width));
          break;
        case MLP_BB:
        case MLP_LB:
        case MLP_SS:
          primitive->set_property ("head-width",
-                                       gh_double2scm (half_flexa_width));
+                                       scm_make_real (half_flexa_width));
          primitive->set_property ("flexa-width",
-                                       gh_double2scm (flexa_width));
+                                       scm_make_real (flexa_width));
          break;
        default:
          programming_error (_f ("unexpected case fall-through"));
@@ -407,8 +407,8 @@ Mensural_ligature_engraver::fold_up_primitives (Array<Grob_info> primitives)
        }
 
       distance +=
-       gh_scm2double (current->get_property ("head-width")) -
-       gh_scm2double (current->get_property ("thickness"));
+       ly_scm2double (current->get_property ("head-width")) -
+       ly_scm2double (current->get_property ("thickness"));
     }
 }
 
@@ -423,12 +423,12 @@ Mensural_ligature_engraver::join_primitives (Array<Grob_info> primitives)
       if (i > 0)
         {
          Item *primitive = dynamic_cast<Item*> (info.grob_);
-         int output = gh_scm2int (primitive->get_property ("primitive"));
+         int output = ly_scm2int (primitive->get_property ("primitive"));
          if (output & MLP_ANY)
            {
              int delta_pitch = (pitch.steps () - last_pitch.steps ());
              primitive->set_property ("join-left-amount",
-                                           gh_int2scm (delta_pitch));
+                                           scm_int2num (delta_pitch));
            }
        }
       last_pitch = pitch;
index c0eb732a871365125bfa09f45aaecf3b68d64720..545018dc59a13c80a66196da6a6431475a296278 100644 (file)
@@ -136,7 +136,7 @@ internal_brew_primitive (Grob *me, bool ledger_take_space)
     }
 
   Stencil out;
-  int primitive = gh_scm2int (primitive_scm);
+  int primitive = ly_scm2int (primitive_scm);
   int delta_pitch = 0;
   Real thickness = 0.0;
   Real flexa_width = 0.0;
@@ -188,7 +188,7 @@ internal_brew_primitive (Grob *me, bool ledger_take_space)
   SCM join_left_scm = me->get_property ("join-left-amount");
   if (join_left_scm != SCM_EOL)
     {
-      int join_left = gh_scm2int (join_left_scm);
+      int join_left = ly_scm2int (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 1fd33773adf9123177d1eaa25bffb9186e8b3e53..ab66dc789328f89542cbc3ce470a802a8438f653 100644 (file)
@@ -145,10 +145,10 @@ Midi_instrument::to_string () const
     UGH. don't use eval.
    */
   SCM proc = ly_scheme_function ("midi-program");
-  SCM program = gh_call1 (proc, ly_symbol2scm (audio_->str_.to_str0 ()));
+  SCM program = scm_call_1 (proc, ly_symbol2scm (audio_->str_.to_str0 ()));
   found = (program != SCM_BOOL_F);
   if (found)
-    program_byte = gh_scm2int (program);
+    program_byte = ly_scm2int (program);
   else
       warning (_f ("no such MIDI instrument: `%s'", audio_->str_.to_str0 ()));
 
index a180bedd6cb26e02922a60c3312ac02a2225480a..edd24f8cd698b18128083d06e50b63c77afef365 100644 (file)
@@ -59,17 +59,17 @@ LY_DEFINE (make_moment,"ly:make-moment", 2,2,0, (SCM n, SCM d, SCM gn, SCM gd),
   if (gn != SCM_UNDEFINED)
     {
       SCM_ASSERT_TYPE (SCM_INUMP (gn), gn, SCM_ARG3, __FUNCTION__, "integer");
-      grace_num = gh_scm2int (gn);
+      grace_num = ly_scm2int (gn);
     }
 
   int grace_den = 1;
   if (gd != SCM_UNDEFINED)
     {
       SCM_ASSERT_TYPE (SCM_INUMP (gd), gd, SCM_ARG4, __FUNCTION__, "integer");
-      grace_den = gh_scm2int (gd);
+      grace_den = ly_scm2int (gd);
     }
 
-  return Moment (Rational (gh_scm2int (n), gh_scm2int (d)),
+  return Moment (Rational (ly_scm2int (n), ly_scm2int (d)),
                 Rational (grace_num, grace_den)).smobbed_copy ();
 }
 
@@ -120,7 +120,7 @@ LY_DEFINE (ly_moment_less_p,"ly:moment<?", 2,0,0, (SCM a, SCM b),
   SCM_ASSERT_TYPE (ma, a, SCM_ARG1, __FUNCTION__, "moment");
   SCM_ASSERT_TYPE (mb, b, SCM_ARG2, __FUNCTION__, "moment");
 
-  return gh_bool2scm (*ma <  *mb);
+  return ly_bool2scm (*ma <  *mb);
 }
 
 
index 598477b5f421a32e0f9ae6cb3cbbb78c7fda0e6f..f4a1202e82577721e50b22bddf7c5d23a175f93b 100644 (file)
@@ -108,7 +108,7 @@ Multi_measure_rest_engraver::process_music ()
            Grob *last =0;
            for (int i=0; i <numbers_.size (); i++)
              {
-               if (gh_int2scm (d) == numbers_[i]->get_property ("direction"))
+               if (scm_int2num (d) == numbers_[i]->get_property ("direction"))
                  {
                    if (last)
                      Side_position_interface::add_support (numbers_[i], last);
@@ -133,10 +133,10 @@ Multi_measure_rest_engraver::process_music ()
       
       announce_grob (mmrest_, rest_ev_->self_scm ());
       start_measure_
-       = gh_scm2int (get_property ("currentBarNumber"));
+       = ly_scm2int (get_property ("currentBarNumber"));
     }
 
-  bar_seen_ = gh_string_p (get_property ("whichBar"));
+  bar_seen_ = ly_string_p (get_property ("whichBar"));
 }
 
 void
@@ -239,14 +239,14 @@ Multi_measure_rest_engraver::start_translation_timestep ()
       last_rest_ = mmrest_;
       last_numbers_ = numbers_;
       
-      int cur = gh_scm2int (get_property ("currentBarNumber"));
+      int cur = ly_scm2int (get_property ("currentBarNumber"));
       int num = cur - start_measure_;
 
       /*
        We can't plug a markup directly into the grob, since the
        measure-count determines the formatting of the mmrest.
       */
-      last_rest_->set_property ("measure-count", gh_int2scm (num));
+      last_rest_->set_property ("measure-count", scm_int2num (num));
 
       SCM sml = get_property ("measureLength");
       Rational ml = (unsmob_moment (sml)) ? unsmob_moment (sml)->main_part_ : Rational (1);
@@ -263,15 +263,15 @@ Multi_measure_rest_engraver::start_translation_timestep ()
        {
          SCM thres = get_property ("restNumberThreshold");
          int t = 1;
-         if (gh_number_p (thres))
-           t = gh_scm2int (thres);
+         if (ly_number_p (thres))
+           t = ly_scm2int (thres);
       
          if (num <= t)
            last->suicide ();
          else 
            {
              SCM text
-               = scm_number_to_string (gh_int2scm (num), SCM_MAKINUM (10));
+               = scm_number_to_string (scm_int2num (num), SCM_MAKINUM (10));
              last->set_property ("text", text);
            }
        }
index 1a11fbde6bfc874ea17d35e58e1b12a96ec7a0f6..a7625e3c1964295495e292dd0932c6d304ab6db3 100644 (file)
@@ -102,9 +102,9 @@ Multi_measure_rest::print (SCM smob)
 
   int measures = 0;
   SCM m (me->get_property ("measure-count"));
-  if (gh_number_p (m))
+  if (ly_number_p (m))
     {
-      measures = gh_scm2int (m);
+      measures = ly_scm2int (m);
     }
 
   mol.translate_axis (x_off, X_AXIS);
@@ -118,16 +118,16 @@ Multi_measure_rest::symbol_stencil (Grob *me, Real space)
 {
   int measures = 0;
   SCM m (me->get_property ("measure-count"));
-  if (gh_number_p (m))
+  if (ly_number_p (m))
     {
-      measures = gh_scm2int (m);
+      measures = ly_scm2int (m);
     }
   if (measures <= 0)
     return Stencil ();
   
 
   SCM limit = me->get_property ("expand-limit");
-  if (measures > gh_scm2int (limit))
+  if (measures > ly_scm2int (limit))
     {
       Real padding = 0.15;  
       Stencil s =  big_rest (me, (1.0 - 2*padding) * space);
@@ -239,7 +239,7 @@ Multi_measure_rest::church_rest (Grob*me, Font_metric *musfont, int measures,
 
          Stencil r (musfont->find_by_name ("rests-" + to_string (k)));
          symbols_width += r.extent (X_AXIS).length ();
-         mols = gh_cons (r.smobbed_copy (), mols);
+         mols = scm_cons (r.smobbed_copy (), mols);
        }
        else
        {
@@ -267,7 +267,7 @@ Multi_measure_rest::church_rest (Grob*me, Font_metric *musfont, int measures,
              r.translate_axis (staff_space, Y_AXIS);
            }
          symbols_width += r.extent (X_AXIS).length ();
-         mols = gh_cons (r.smobbed_copy (), mols);
+         mols = scm_cons (r.smobbed_copy (), mols);
        }
       count ++;
     }
@@ -282,9 +282,9 @@ Multi_measure_rest::church_rest (Grob*me, Font_metric *musfont, int measures,
     }
   
   Stencil mol; 
-  for (SCM  s = mols; gh_pair_p (s); s = gh_cdr (s))
+  for (SCM  s = mols; ly_pair_p (s); s = ly_cdr (s))
     {
-      mol.add_at_edge (X_AXIS, LEFT, *unsmob_stencil (gh_car (s)), inner_padding, 0);
+      mol.add_at_edge (X_AXIS, LEFT, *unsmob_stencil (ly_car (s)), inner_padding, 0);
     }
   mol.align_to (X_AXIS, LEFT);
   mol.translate_axis (outer_padding_factor *  inner_padding, X_AXIS);
index 14bbebebd9da988d5d048aaf1efa1c3b997b6ce6..ea8e73434931215bbe4ccb83c4d2dd4886642cef 100644 (file)
@@ -78,9 +78,9 @@ Music_iterator::get_static_get_iterator (Music *m)
 
   SCM ctor = m->get_property ("iterator-ctor") ;
   SCM iter = SCM_EOL;
-  if (gh_procedure_p (ctor))
+  if (ly_procedure_p (ctor))
     {
-      iter = gh_call0 (ctor);
+      iter = scm_call_0 (ctor);
       p = unsmob_iterator (iter);
     }
   else
index 3801ee954ec0fb7f0ca1ed323bc1fda9121c0b2e..ae3a0be07fdf2049e5b5fbfbd0700391c97dc764 100644 (file)
@@ -133,7 +133,7 @@ LY_DEFINE (ly_paper_lookup, "ly:paper-lookup",
 {
   Music_output_def *op = unsmob_music_output_def (pap);
   SCM_ASSERT_TYPE (op, pap, SCM_ARG1, __FUNCTION__, "Paper");
-  SCM_ASSERT_TYPE (gh_symbol_p (sym), sym, SCM_ARG2, __FUNCTION__, "symbol");
+  SCM_ASSERT_TYPE (ly_symbol_p (sym), sym, SCM_ARG2, __FUNCTION__, "symbol");
 
   SCM var = ly_module_lookup (op->scope_, sym);
   if (SCM_VARIABLEP (var))
index ad7333c104712b490c5305ce6a8fbaf727b1f5e3..d56014ab631ebf8350b7bf2552267cb965fbba96 100644 (file)
@@ -24,7 +24,7 @@ void
 Music_sequence::append_music (Music *m)
 {
   set_property ("elements",
-                   gh_append2 (music_list (), gh_cons (m->self_scm (), SCM_EOL)));
+                   ly_append2 (music_list (), scm_cons (m->self_scm (), SCM_EOL)));
   scm_gc_unprotect_object (m->self_scm ());
 }
 
@@ -36,7 +36,7 @@ Music_sequence::Music_sequence ( )
 void
 transpose_music_list (SCM l,  Pitch rq)
 {
-  for (SCM s = l; gh_pair_p (s);  s = ly_cdr (s))
+  for (SCM s = l; ly_pair_p (s);  s = ly_cdr (s))
     unsmob_music (ly_car (s))->transpose (rq);    
 }
 
@@ -46,7 +46,7 @@ Music_sequence::cumulative_length (SCM l)
   Moment cumulative;
   Moment last_len; 
 
-  for (SCM s = l; gh_pair_p (s);  s = ly_cdr (s))
+  for (SCM s = l; ly_pair_p (s);  s = ly_cdr (s))
     {
       Moment l = unsmob_music (ly_car (s))->get_length ();
       if (last_len.grace_part_ && l.main_part_)
@@ -67,7 +67,7 @@ Moment
 Music_sequence::maximum_length (SCM l)
 {
   Moment dur = 0;
-  for (SCM s = l; gh_pair_p (s);  s = ly_cdr (s))
+  for (SCM s = l; ly_pair_p (s);  s = ly_cdr (s))
     {
       Music * m = unsmob_music (ly_car (s));
       Moment l = m->get_length ();
@@ -84,7 +84,7 @@ music_list_to_relative (SCM l,Pitch p, bool ret_first)
   int count=0;
 
   Pitch last = p;
-  for (SCM s = l; gh_pair_p (s);  s = ly_cdr (s))
+  for (SCM s = l; ly_pair_p (s);  s = ly_cdr (s))
     {
       if (Music *m = unsmob_music (ly_car (s)))
        {
@@ -101,7 +101,7 @@ music_list_to_relative (SCM l,Pitch p, bool ret_first)
 void
 compress_music_list (SCM l, Moment m)
 {
-  for (SCM s = l; gh_pair_p (s);  s = ly_cdr (s))
+  for (SCM s = l; ly_pair_p (s);  s = ly_cdr (s))
     unsmob_music (ly_car (s))->compress (m);
 }
 
@@ -112,7 +112,7 @@ Music_sequence::minimum_start (SCM l)
 {
   Moment m;
   
-  for (SCM s = l; gh_pair_p (s);  s = ly_cdr (s))
+  for (SCM s = l; ly_pair_p (s);  s = ly_cdr (s))
     {
       m = m <? unsmob_music (ly_car (s))->start_mom ();
     }
@@ -124,7 +124,7 @@ Music_sequence::first_start (SCM l)
 {
   Moment m;
   
-  for (SCM s = l; gh_pair_p (s);  s = ly_cdr (s))
+  for (SCM s = l; ly_pair_p (s);  s = ly_cdr (s))
     {
       Music * mus = unsmob_music (ly_car (s));
       Moment l = mus->get_length ();
index cfe947119575bc388f557a6335c7101ac7fa3799..c760862a6fe85285367a29a617f289c66eafaca8 100644 (file)
@@ -28,7 +28,7 @@ String
 Music::name () const
 {
   SCM nm = get_property ("name");
-  if (gh_symbol_p (nm))
+  if (ly_symbol_p (nm))
     {
       return ly_symbol2string (nm);
     }
@@ -87,9 +87,9 @@ Music::get_length () const
   SCM lst = get_property ("length");
   if (unsmob_moment (lst))
     return *unsmob_moment (lst);
-  else if (gh_procedure_p (lst))
+  else if (ly_procedure_p (lst))
     {
-      SCM res = gh_call1 (lst, self_scm ());
+      SCM res = scm_call_1 (lst, self_scm ());
       return *unsmob_moment (res);
     }
 
@@ -100,9 +100,9 @@ Moment
 Music::start_mom () const
 {
   SCM lst = get_property ("start-moment-function");
-  if (gh_procedure_p (lst))
+  if (ly_procedure_p (lst))
     {
-      SCM res = gh_call1 (lst, self_scm ());
+      SCM res = scm_call_1 (lst, self_scm ());
       return *unsmob_moment (res);
     }
 
@@ -114,7 +114,7 @@ void
 print_alist (SCM a, SCM port)
 {
   /* SCM_EOL  -> catch malformed lists.  */
-  for (SCM s = a; gh_pair_p (s); s = ly_cdr (s))
+  for (SCM s = a; ly_pair_p (s); s = ly_cdr (s))
     {
       scm_display (ly_caar (s), port);
       scm_puts (" = ", port);
@@ -130,7 +130,7 @@ Music::print_smob (SCM s, SCM p, scm_print_state*)
   Music* m = unsmob_music (s);
 
   SCM nm = m->get_property ("name");
-  if (gh_symbol_p (nm) || gh_string_p (nm))
+  if (ly_symbol_p (nm) || ly_string_p (nm))
     scm_display (nm, p);
   else
     scm_puts (classname (m),p);
@@ -231,7 +231,7 @@ LY_DEFINE (ly_music_property,
 {
   Music * sc = unsmob_music (mus);
   SCM_ASSERT_TYPE (sc, mus, SCM_ARG1, __FUNCTION__, "music");
-  SCM_ASSERT_TYPE (gh_symbol_p (sym), sym, SCM_ARG2, __FUNCTION__, "symbol");
+  SCM_ASSERT_TYPE (ly_symbol_p (sym), sym, SCM_ARG2, __FUNCTION__, "symbol");
 
   return sc->internal_get_property (sym);
 }
@@ -242,7 +242,7 @@ LY_DEFINE (ly_music_set_property, "ly:music-set-property!",
 {
   Music * sc = unsmob_music (mus);
   SCM_ASSERT_TYPE (sc, mus, SCM_ARG1, __FUNCTION__, "music");
-  SCM_ASSERT_TYPE (gh_symbol_p (sym), sym, SCM_ARG2, __FUNCTION__, "symbol");
+  SCM_ASSERT_TYPE (ly_symbol_p (sym), sym, SCM_ARG2, __FUNCTION__, "symbol");
 
   bool ok = type_check_assignment (sym, val, ly_symbol2scm ("music-type?"));
   if (ok)
@@ -275,7 +275,7 @@ LY_DEFINE (ly_extended_make_music, "ly:make-bare-music",
          "for creating music objects. "
          )
 {
-  SCM_ASSERT_TYPE (gh_string_p (type), type, SCM_ARG1, __FUNCTION__, "string");
+  SCM_ASSERT_TYPE (ly_string_p (type), type, SCM_ARG1, __FUNCTION__, "string");
   SCM s = make_music (ly_scm2string (type))->self_scm ();
   unsmob_music (s)->immutable_property_alist_ = props;
   scm_gc_unprotect_object (s);
@@ -301,11 +301,11 @@ LY_DEFINE (ly_music_list_p,"ly:music-list?",
           "of music objects.")
 {
   if (scm_list_p (lst) == SCM_BOOL_T)
-    while (gh_pair_p (lst))
+    while (ly_pair_p (lst))
       {
-       if (!unsmob_music (gh_car (lst)))
+       if (!unsmob_music (ly_car (lst)))
          return SCM_BOOL_F;
-       lst = gh_cdr (lst);
+       lst = ly_cdr (lst);
       }
 
   return SCM_BOOL_T;
@@ -321,8 +321,8 @@ LY_DEFINE (ly_deep_mus_copy, "ly:music-deep-copy",
       copy = unsmob_music (m)->clone ()->self_scm ();
       scm_gc_unprotect_object (copy);
     }
-  else if (gh_pair_p (m))
-    copy = gh_cons (ly_deep_mus_copy (ly_car (m)),
+  else if (ly_pair_p (m))
+    copy = scm_cons (ly_deep_mus_copy (ly_car (m)),
                    ly_deep_mus_copy (ly_cdr (m)));
   return copy;
 }
index 39ac514f058e6d6e6c99e273efd61aae33233415..c1934df8de16791ec3a54e96176996f662282540 100644 (file)
@@ -96,7 +96,7 @@ My_lily_lexer::My_lily_lexer ()
 {
   keytable_ = new Keyword_table (the_key_tab);
 
-  chordmodifier_tab_ = scm_make_vector (gh_int2scm (1), SCM_EOL);
+  chordmodifier_tab_ = scm_make_vector (scm_int2num (1), SCM_EOL);
   pitchname_tab_stack_ = SCM_EOL; 
   
   scopes_ = SCM_EOL;
@@ -112,14 +112,14 @@ My_lily_lexer::add_scope (SCM module)
 {
   ly_reexport_module (scm_current_module ());
   scm_set_current_module (module);
-  for (SCM s = scopes_; gh_pair_p (s); s = gh_cdr (s))
+  for (SCM s = scopes_; ly_pair_p (s); s = ly_cdr (s))
     {
       /* UGH. how to do this more neatly? */      
       SCM expr
        = scm_list_3 (ly_symbol2scm ("module-use!"),
                      module,
                      scm_list_2 (ly_symbol2scm ("module-public-interface"),
-                                 gh_car (s)));
+                                 ly_car (s)));
       scm_primitive_eval (expr);
     }
   scopes_ = scm_cons (module, scopes_);
@@ -128,9 +128,9 @@ My_lily_lexer::add_scope (SCM module)
 SCM
 My_lily_lexer::remove_scope ()
 {
-  SCM sc = gh_car (scopes_);
-  scopes_ = gh_cdr (scopes_);
-  scm_set_current_module (gh_car (scopes_));
+  SCM sc = ly_car (scopes_);
+  scopes_ = ly_cdr (scopes_);
+  scm_set_current_module (ly_car (scopes_));
 
   return sc;
 }
@@ -146,9 +146,9 @@ SCM
 My_lily_lexer::lookup_identifier (String s)
 {
   SCM sym = ly_symbol2scm (s.to_str0());
-  for (SCM s = scopes_; gh_pair_p (s); s = gh_cdr (s))
+  for (SCM s = scopes_; ly_pair_p (s); s = ly_cdr (s))
     {
-      SCM var = ly_module_lookup (gh_car (s), sym);
+      SCM var = ly_module_lookup (ly_car (s), sym);
       if (var != SCM_BOOL_F)
        return scm_variable_ref (var);
     }
@@ -165,7 +165,7 @@ My_lily_lexer::start_main_input ()
   /* Do not allow \include in --safe-mode */
   allow_includes_b_ = allow_includes_b_ && ! safe_global_b;
 
-  scm_module_define (gh_car (scopes_),
+  scm_module_define (ly_car (scopes_),
                     ly_symbol2scm ("input-file-name"),
                     scm_makfrom0str (main_input_name_.to_str0 ()));
 }
index c87b1416ef3228f278a483d91ec62764120856e6..412778f801f541fe7847a4fd90640c6486f4dbef 100644 (file)
@@ -132,10 +132,10 @@ My_lily_parser::paper_description ()
 
   SCM al = p->translator_tab_->to_alist ();
   SCM l = SCM_EOL;
-  for (SCM s = al ; gh_pair_p (s); s = ly_cdr (s))
+  for (SCM s = al ; ly_pair_p (s); s = ly_cdr (s))
     {
       Context_def * td = unsmob_context_def (ly_cdar (s));
-      l = gh_cons (gh_cons (ly_caar (s), td->to_alist ()),  l);
+      l = scm_cons (scm_cons (ly_caar (s), td->to_alist ()),  l);
     }
   return l;  
 }
index 7f21e6a954070900800d3e433c7ecadbfd2ef617..54ec772291b8ca48b7dd380dc1a2e258993cdc76 100644 (file)
@@ -67,9 +67,9 @@ New_fingering_engraver::acknowledge_grob (Grob_info inf)
 
       SCM arts = note_ev->get_property ("articulations");
 
-      for (SCM s = arts; gh_pair_p (s); s = gh_cdr  (s))
+      for (SCM s = arts; ly_pair_p (s); s = ly_cdr  (s))
        {
-         Music * m = unsmob_music (gh_car (s));
+         Music * m = unsmob_music (ly_car (s));
 
          if (!m)
            continue;
@@ -138,7 +138,7 @@ New_fingering_engraver::add_fingering (Grob * head,
   
   Side_position_interface::add_support (ft.script_, head);
 
-  int d = gh_scm2int (event->get_property ("digit"));
+  int d = ly_scm2int (event->get_property ("digit"));
   
   /*
     TODO:
@@ -154,7 +154,7 @@ New_fingering_engraver::add_fingering (Grob * head,
        */
       event->origin ()->warning (_("music for the martians."));
     }
-  SCM sstr = scm_number_to_string (gh_int2scm (d), gh_int2scm (10)) ;
+  SCM sstr = scm_number_to_string (scm_int2num (d), scm_int2num (10)) ;
   ft.script_->set_property ("text", sstr);
        
   ft.finger_event_ = event;
@@ -179,7 +179,7 @@ New_fingering_engraver::position_scripts ()
   */
   for (int i = 0; i < fingerings_.size (); i++)
     {      
-      fingerings_[i].position_ = gh_scm2int (fingerings_[i].head_ -> get_property ( "staff-position"));
+      fingerings_[i].position_ = ly_scm2int (fingerings_[i].head_ -> get_property ( "staff-position"));
     }
 
   for (int i = fingerings_.size (); i--;)
@@ -247,7 +247,7 @@ New_fingering_engraver::position_scripts ()
       f->add_offset_callback (Self_alignment_interface::aligned_on_self_proc, Y_AXIS);
       f->add_offset_callback (Side_position_interface::aligned_side_proc, X_AXIS);
 
-      f->set_property ("direction", gh_int2scm (hordir));
+      f->set_property ("direction", scm_int2num (hordir));
       typeset_grob (f);
     }
 
@@ -258,12 +258,12 @@ New_fingering_engraver::position_scripts ()
       Grob* f = ft.script_;
       f->set_parent (ft.head_, X_AXIS);
       f->set_property ("script-priority",
-                           gh_int2scm (finger_prio + i));
+                           scm_int2num (finger_prio + i));
       f->add_offset_callback (Side_position_interface::aligned_side_proc, Y_AXIS);
       f->add_offset_callback (Self_alignment_interface::centered_on_parent_proc, X_AXIS);
       f->add_offset_callback (Self_alignment_interface::aligned_on_self_proc, X_AXIS);
       
-      f->set_property ("direction", gh_int2scm (UP));
+      f->set_property ("direction", scm_int2num (UP));
 
       typeset_grob (f);
     }
@@ -274,12 +274,12 @@ New_fingering_engraver::position_scripts ()
       Grob* f = ft.script_;
       f->set_parent (ft.head_, X_AXIS);
       f->set_property ("script-priority",
-                           gh_int2scm (finger_prio + down.size () - i));
+                           scm_int2num (finger_prio + down.size () - i));
 
       f->add_offset_callback (Self_alignment_interface::centered_on_parent_proc, X_AXIS);
       f->add_offset_callback (Self_alignment_interface::aligned_on_self_proc, X_AXIS);
       f->add_offset_callback (Side_position_interface::aligned_side_proc, Y_AXIS);
-      f->set_property ("direction", gh_int2scm (DOWN));
+      f->set_property ("direction", scm_int2num (DOWN));
       typeset_grob (f);
     }
 }
@@ -304,7 +304,7 @@ New_fingering_engraver::stop_translation_timestep ()
        sc->set_property ("direction-source", stem_->self_scm ());
       
       SCM follow = scm_assoc (ly_symbol2scm ("follow-into-staff"), articulations_[i].description_);
-      if (gh_pair_p (follow) && to_boolean (gh_cdr (follow)))
+      if (ly_pair_p (follow) && to_boolean (ly_cdr (follow)))
        {
          sc->add_offset_callback (Side_position_interface::quantised_position_proc, Y_AXIS);
          sc->set_property ("staff-padding" , SCM_EOL);
index fa3e340c6376b0251afa53f48ce71d0c3afed806..a1a68df85ee37f17181c858a19ebc35f2bb65816 100644 (file)
@@ -160,7 +160,7 @@ New_lyric_combine_music_iterator::find_voice ()
     {
       SCM voice_name = get_music ()->get_property ("associated-context");
   
-      if (gh_string_p (voice_name))
+      if (ly_string_p (voice_name))
        {
          Context *t = get_outlet ();
          while (t && t->daddy_context_)
index 3da3de58c95234d1ab52efb57a5d286b631558e2..c7d8886eb7dbaf895a813d3fefff8421fe6b4a71 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) gh_scm2int (axis);
+  Axis a = (Axis) ly_scm2int (axis);
   assert (a == X_AXIS);
   
    me = me->get_parent (a);
@@ -37,7 +37,7 @@ Note_collision_interface::force_shift_callback (SCM element_smob, SCM axis)
       do_shifts (me);
     }
   
-  return gh_double2scm (0.0);
+  return scm_make_real (0.0);
 }
 
 
@@ -74,7 +74,7 @@ check_meshing_chords (Grob *me,
 
 
   /* Do not merge notes typeset in different style. */
-  if ( !gh_equal_p (nu->get_property ("style"),
+  if ( !ly_equal_p (nu->get_property ("style"),
                     nd->get_property ("style") ) )
     merge_possible = false;
   
@@ -302,18 +302,18 @@ Note_collision_interface::do_shifts (Grob* me)
   while (flip (&d) != UP);
   
   Link_array<Grob> done;
-  for (; gh_pair_p (hand); hand =ly_cdr (hand))
+  for (; ly_pair_p (hand); hand =ly_cdr (hand))
     {
       Grob * s = unsmob_grob (ly_caar (hand));
-      Real amount = gh_scm2double (ly_cdar (hand));
+      Real amount = ly_scm2double (ly_cdar (hand));
       
       s->translate_axis (amount *wid, X_AXIS);
       done.push (s);
     }
-  for (; gh_pair_p (autos); autos =ly_cdr (autos))
+  for (; ly_pair_p (autos); autos =ly_cdr (autos))
     {
       Grob * s = unsmob_grob (ly_caar (autos));
-      Real amount = gh_scm2double (ly_cdar (autos));
+      Real amount = ly_scm2double (ly_cdar (autos));
       
       if (!done.find (s))
        s->translate_axis (amount * wid, X_AXIS);
@@ -326,7 +326,7 @@ Note_collision_interface::get_clash_groups (Grob *me)
   Drul_array<Link_array<Grob> > clash_groups;
  
   SCM s = me->get_property ("elements");
-  for (; gh_pair_p (s); s = ly_cdr (s))
+  for (; ly_pair_p (s); s = ly_cdr (s))
     {
       SCM car = ly_car (s);
 
@@ -371,8 +371,8 @@ Note_collision_interface::automatic_shift (Grob *me,
          SCM sh
            = clashes[i]->get_property ("horizontal-shift");
 
-         if (gh_number_p (sh))
-           shift.push (gh_scm2int (sh));
+         if (ly_number_p (sh))
+           shift.push (ly_scm2int (sh));
          else
            shift.push (0);
        }
@@ -437,8 +437,8 @@ Note_collision_interface::automatic_shift (Grob *me,
   do
     {
       for (int i=0; i < clash_groups[d].size (); i++)
-       tups = gh_cons (gh_cons (clash_groups[d][i]->self_scm (),
-                                gh_double2scm (offsets[d][i])),
+       tups = scm_cons (scm_cons (clash_groups[d][i]->self_scm (),
+                                scm_make_real (offsets[d][i])),
                        tups);
     }
   while (flip (&d) != UP);
@@ -452,14 +452,14 @@ Note_collision_interface::forced_shift (Grob *me)
   SCM tups = SCM_EOL;
   
   SCM s = me->get_property ("elements");
-  for (; gh_pair_p (s); s = ly_cdr (s))
+  for (; ly_pair_p (s); s = ly_cdr (s))
     {
       Grob * se = unsmob_grob (ly_car (s));
 
       SCM force =  se->get_property ("force-hshift");
-      if (gh_number_p (force))
+      if (ly_number_p (force))
        {
-         tups = gh_cons (gh_cons (se->self_scm (), force),
+         tups = scm_cons (scm_cons (se->self_scm (), force),
                          tups);
        }
     }
index d9a8ce307827d59bb63cb9a974abaeef157e6201..b4a0efa6d9d7ec54132d7edfd3b182d93da5e813 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 = (gh_number_p (s1))?  gh_scm2int (s1) :0;
-  int h2 = (gh_number_p (s2)) ? gh_scm2int (s2):0;
+  int h1 = (ly_number_p (s1))?  ly_scm2int (s1) :0;
+  int h2 = (ly_number_p (s2)) ? ly_scm2int (s2):0;
   return h1 - h2;
 }
 
@@ -55,7 +55,7 @@ Note_column::head_positions_interval (Grob *me)
   iv.set_empty ();
 
   SCM h = me->get_property ("note-heads");
-  for (; gh_pair_p (h); h = ly_cdr (h))
+  for (; ly_pair_p (h); h = ly_cdr (h))
     {
       Grob *se = unsmob_grob (ly_car (h));
       
@@ -71,7 +71,7 @@ Note_column::dir (Grob*  me)
   Grob *stem = unsmob_grob (me->get_property ("stem"));
   if (stem && Stem::has_interface (stem))
     return Stem::get_direction (stem);
-  else if (gh_pair_p (me->get_property ("note-heads")))
+  else if (ly_pair_p (me->get_property ("note-heads")))
     return (Direction)sign (head_positions_interval (me).center ());
 
   programming_error ("Note column without heads and stem!");
@@ -100,7 +100,7 @@ Note_column::add_head (Grob*me,Grob *h)
   bool both = false;
   if (Rest::has_interface (h))
     {
-      if (gh_pair_p (me->get_property ("note-heads")))
+      if (ly_pair_p (me->get_property ("note-heads")))
        both = true;
       else
        me->set_property ("rest", h->self_scm ());
@@ -126,7 +126,7 @@ void
 Note_column::translate_rests (Grob*me, int dy)
 {
   Grob * r = unsmob_grob (me->get_property ("rest"));
-  if (r && !gh_number_p (r->get_property ("staff-position")))
+  if (r && !ly_number_p (r->get_property ("staff-position")))
     {
       r->translate_axis (dy * Staff_symbol_referencer::staff_space (r)/2.0, Y_AXIS);
     }
@@ -158,9 +158,9 @@ Note_column::accidentals (Grob *me)
 {
   SCM heads = me->get_property ("note-heads");
   Grob * acc = 0;
-  for (;gh_pair_p (heads); heads =gh_cdr (heads))
+  for (;ly_pair_p (heads); heads =ly_cdr (heads))
     {
-      Grob * h = unsmob_grob (gh_car (heads));
+      Grob * h = unsmob_grob (ly_car (heads));
       acc = h ? unsmob_grob (h->get_property ("accidental-grob")) : 0;
       if (acc)
        break;
index 0ec06d5686e148f4bc18fac4e483afa32b48db5c..0a771b53d021af07021cf100ee023834212c4e55 100644 (file)
@@ -122,12 +122,12 @@ Stencil
 internal_print (Grob *me, bool with_ledgers)
 {
   SCM style  = me->get_property ("style");
-  if (!gh_symbol_p (style))
+  if (!ly_symbol_p (style))
     {
       return Stencil ();
     }
 
-  SCM log = gh_int2scm (Note_head::get_balltype (me));
+  SCM log = scm_int2num (Note_head::get_balltype (me));
   SCM proc = me->get_property ("glyph-name-procedure");
   SCM scm_font_char = scm_call_2 (proc, log, style);
   String font_char = "noteheads-" + ly_scm2string (scm_font_char);
@@ -232,7 +232,7 @@ Note_head::extent (SCM smob, SCM axis)
 {
   Grob *me = unsmob_grob (smob);
 
-  return ly_interval2scm (head_extent (me, (Axis) gh_scm2int (axis)));
+  return ly_interval2scm (head_extent (me, (Axis) ly_scm2int (axis)));
 }
 
 MAKE_SCHEME_CALLBACK (Note_head,brew_ez_stencil,1);
@@ -248,10 +248,10 @@ Note_head::brew_ez_stencil (SCM smob)
   SCM spitch = unsmob_music (cause)->get_property ("pitch");
   Pitch* pit =  unsmob_pitch (spitch);
 
-  SCM idx = gh_int2scm (pit->get_notename ());
+  SCM idx = scm_int2num (pit->get_notename ());
   SCM names = me->get_property ("note-names");
   SCM charstr = SCM_EOL;
-  if (gh_vector_p (names))
+  if (ly_vector_p (names))
     charstr = scm_vector_ref (names, idx);
   else
     {
@@ -263,8 +263,8 @@ Note_head::brew_ez_stencil (SCM smob)
   
   SCM at = scm_list_n (ly_symbol2scm ("ez-ball"),
                       charstr,
-                      gh_int2scm (b),
-                      gh_int2scm (1-b),
+                      scm_int2num (b),
+                      scm_int2num (1-b),
                       SCM_UNDEFINED);
   Box bx (Interval (0, 1.0), Interval (-0.5, 0.5));
   Stencil m (bx, at);
@@ -291,12 +291,12 @@ Note_head::stem_attachment_coordinate (Grob *me, Axis a)
   if (brewer == Note_head::print_proc)
     {
       SCM style  = me->get_property ("style");
-      if (!gh_symbol_p (style))
+      if (!ly_symbol_p (style))
        {
          return 0.0;
        }
       
-      SCM log = gh_int2scm (Note_head::get_balltype (me));
+      SCM log = scm_int2num (Note_head::get_balltype (me));
       SCM proc = me->get_property ("glyph-name-procedure");
       SCM scm_font_char = scm_call_2 (proc, log, style);
       String font_char = "noteheads-" + ly_scm2string (scm_font_char);
@@ -317,11 +317,11 @@ Note_head::stem_attachment_coordinate (Grob *me, Axis a)
     Fallback
    */
   SCM v = me->get_property ("stem-attachment-function");
-  if (!gh_procedure_p (v))
+  if (!ly_procedure_p (v))
     return 0.0;
   
-  SCM result = scm_call_2 (v, me->self_scm (), gh_int2scm (a));
-  if (!gh_pair_p (result))
+  SCM result = scm_call_2 (v, me->self_scm (), scm_int2num (a));
+  if (!ly_pair_p (result))
     return 0.0;
 
   result = (a == X_AXIS) ? ly_car (result) : ly_cdr (result);
@@ -333,7 +333,7 @@ int
 Note_head::get_balltype (Grob*me) 
 {
   SCM s = me->get_property ("duration-log");
-  return gh_number_p (s) ? gh_scm2int (s) <? 2 : 0;
+  return ly_number_p (s) ? ly_scm2int (s) <? 2 : 0;
 }
 
 ADD_INTERFACE (Note_head,"note-head-interface",
index e64dba8693b7a9ccfa35de2409ceda7d657f6df8..8c1460b567b718e43d923b5b2988181741f9b154 100644 (file)
@@ -63,7 +63,7 @@ Note_heads_engraver::process_music ()
       
       Duration dur = *unsmob_duration (req->get_property ("duration"));
 
-      note->set_property ("duration-log", gh_int2scm (dur.duration_log ()));
+      note->set_property ("duration-log", scm_int2num (dur.duration_log ()));
       if (dur.dot_count ())
        {
          Item * d = make_item ("Dots");
@@ -71,7 +71,7 @@ Note_heads_engraver::process_music ()
          
          if (dur.dot_count ()
              != robust_scm2int (d->get_property ("dot-count"), 0))
-           d->set_property ("dot-count", gh_int2scm (dur.dot_count ()));
+           d->set_property ("dot-count", scm_int2num (dur.dot_count ()));
 
          d->set_parent (note, Y_AXIS);
          announce_grob (d, SCM_EOL);
@@ -82,10 +82,10 @@ Note_heads_engraver::process_music ()
 
       int pos = pit ? pit->steps () : 0;
       SCM c0 = get_property ("middleCPosition");
-      if (gh_number_p (c0))
-       pos += gh_scm2int (c0);
+      if (ly_number_p (c0))
+       pos += ly_scm2int (c0);
 
-      note->set_property ("staff-position",   gh_int2scm (pos));
+      note->set_property ("staff-position",   scm_int2num (pos));
       announce_grob (note,req->self_scm ());
       notes_.push (note);
     }
index 9f767ab54c0501c3b5b0fd9483f6e78c089ccefd..6df5ab17c301ff8630c577c14fca4fecde254863 100644 (file)
@@ -42,9 +42,9 @@ Note_spacing::get_spacing (Grob *me, Item* right_col,
   Interval left_head_wid; 
   do
     {
-      for (SCM  s = props[d]; gh_pair_p (s); s = gh_cdr (s))
+      for (SCM  s = props[d]; ly_pair_p (s); s = ly_cdr (s))
        {
-         Item * it= dynamic_cast<Item*> (unsmob_grob (gh_car (s)));
+         Item * it= dynamic_cast<Item*> (unsmob_grob (ly_car (s)));
          
          if (d == RIGHT && it->break_status_dir () != col_dir)
            {
@@ -188,9 +188,9 @@ Note_spacing::right_column (Grob*me)
   Item *mincol = 0;
   int min_rank = INT_MAX;
   bool prune = false;
-  for (SCM s = right ; gh_pair_p (s) ; s = gh_cdr (s))
+  for (SCM s = right ; ly_pair_p (s) ; s = ly_cdr (s))
     {
-      Item * ri = unsmob_item (gh_car (s));
+      Item * ri = unsmob_item (ly_car (s));
 
       Item * col = ri->get_column ();
       int rank = Paper_column::get_rank (col);
@@ -209,10 +209,10 @@ Note_spacing::right_column (Grob*me)
     {
       // I'm a lazy bum. We could do this in-place.
       SCM newright  = SCM_EOL;
-      for (SCM s = right ; gh_pair_p (s) ; s =gh_cdr (s))
+      for (SCM s = right ; ly_pair_p (s) ; s =ly_cdr (s))
        {
-         if (unsmob_item (gh_car (s))->get_column () == mincol)
-           newright = gh_cons (gh_car (s), newright);
+         if (unsmob_item (ly_car (s))->get_column () == mincol)
+           newright = scm_cons (ly_car (s), newright);
        }
 
       me->set_property ("right-items", newright);
@@ -264,9 +264,9 @@ Note_spacing::stem_dir_correction (Grob*me, Item * rcolumn,
   
   do
     {
-      for (SCM  s = props[d]; gh_pair_p (s); s = gh_cdr (s))
+      for (SCM  s = props[d]; ly_pair_p (s); s = ly_cdr (s))
        {
-         Item * it= dynamic_cast<Item*> (unsmob_grob (gh_car (s)));
+         Item * it= dynamic_cast<Item*> (unsmob_grob (ly_car (s)));
 
          if (d == RIGHT)
            acc_right = acc_right || Note_column::accidentals (it);
index e1e033a9d315b9862ef13a9a8bb5fe7d2ec820b5..30c122da5da44d113c18c40d8901150ff369d158 100644 (file)
@@ -88,8 +88,8 @@ Ottava_bracket::print (SCM smob)
       Interval ext;
       if (Note_column::has_interface (b))
        {
-         for (SCM s = b->get_property ("note-heads"); gh_pair_p (s); s =gh_cdr (s))
-           ext.unite (unsmob_grob (gh_car (s))->extent (common, X_AXIS));
+         for (SCM s = b->get_property ("note-heads"); ly_pair_p (s); s =ly_cdr (s))
+           ext.unite (unsmob_grob (ly_car (s))->extent (common, X_AXIS));
        }
 
       if (ext.is_empty ())
index cd207cc872da052aeca3c8553c441a0a4cb83766..562599d5f2b6fe012be2d3b04c45e0e39252993a 100644 (file)
@@ -46,7 +46,7 @@ Ottava_spanner_engraver::process_music ()
     {
       finished_= span_;
       span_ = 0;
-      if (gh_string_p (ott))
+      if (ly_string_p (ott))
        {
          span_  = make_spanner ("OttavaBracket");
          span_->set_property ("text", ott);
@@ -55,7 +55,7 @@ Ottava_spanner_engraver::process_music ()
          SCM c0 (get_property ("middleCPosition"));
          SCM oc0 (get_property ("originalCentralCPosition"));
          if (scm_less_p (oc0, c0) == SCM_BOOL_T)
-           span_->set_property ("direction", gh_int2scm (DOWN));
+           span_->set_property ("direction", scm_int2num (DOWN));
        }
     }
   last_ottavation_ = ott;
index ebe2c477717f7f52fab76883d38dd14f45998571..04a842421425aea78c2802e52f690cad3384b9c5 100644 (file)
@@ -45,7 +45,7 @@ Output_property_engraver::acknowledge_grob (Grob_info inf)
 
 
 
-      if (gh_procedure_p (pred))
+      if (ly_procedure_p (pred))
        {
          /*
            should typecheck pred. 
index af4eaf1d613035cbfeb26b31c8faefcb8ed5ebdf..d605b3a7b1b0ab7cce07cec64d424d7f06e7ed13 100644 (file)
@@ -167,7 +167,7 @@ Page::output (Paper_outputter *out, bool is_last)
   if (get_footer ())
     out->output_line (stencil2line (get_footer ()), &o, is_last);
   out->output_scheme (scm_list_2 (ly_symbol2scm ("stop-page"),
-                                 gh_bool2scm (is_last && !get_footer ())));
+                                 ly_bool2scm (is_last && !get_footer ())));
   progress_indication ("]");
 }
 
@@ -406,10 +406,10 @@ Paper_book::pages ()
 
   SCM all = lines ();
   SCM proc = paper->get_scmvar ("page-breaking");
-  SCM breaks = scm_apply_0 (proc, scm_list_n (all, gh_double2scm (height_),
-                                           gh_double2scm (text_height),
-                                           gh_double2scm (-copy_height),
-                                           gh_double2scm (-tag_height),
+  SCM breaks = scm_apply_0 (proc, scm_list_n (all, scm_make_real (height_),
+                                           scm_make_real (text_height),
+                                           scm_make_real (-copy_height),
+                                           scm_make_real (-tag_height),
                                            SCM_UNDEFINED));
 
   /* Copyright on first page.  */
@@ -424,7 +424,7 @@ Paper_book::pages ()
       if (i)
        page = new Page (paper, i+1);
       int next = i + 1 < page_count
-       ? gh_scm2int (scm_vector_ref (breaks, gh_int2scm (i))) : 0;
+       ? ly_scm2int (scm_vector_ref (breaks, scm_int2num (i))) : 0;
       while ((!next && all != SCM_EOL) || line <= next)
        {
          SCM s = ly_car (all);
@@ -462,13 +462,13 @@ c_ragged_page_breaks (SCM lines, Real book_height, Real text_height,
       h += pl->dim ()[Y_AXIS];
       if (!pl->is_title () && h > page_height)
        {
-         breaks = ly_snoc (gh_int2scm (number), breaks);
+         breaks = ly_snoc (scm_int2num (number), breaks);
          page_number++;
          page_height = text_height + (page_number == page_count) * last;
          h = 0;
        }
       if (ly_cdr (s) == SCM_EOL)
-       breaks = ly_snoc (gh_int2scm (pl->number_), breaks);
+       breaks = ly_snoc (scm_int2num (pl->number_), breaks);
     }
 
   return scm_vector (breaks);
@@ -479,12 +479,12 @@ LY_DEFINE (ly_ragged_page_breaks, "ly:ragged-page-breaks",
           "Return a vector with line numbers of page breaks.")
 {
   SCM_ASSERT_TYPE (scm_pair_p (lines), lines, SCM_ARG1, __FUNCTION__, "list");
-  SCM_ASSERT_TYPE (gh_number_p (book), book, SCM_ARG2, __FUNCTION__, "real");
-  SCM_ASSERT_TYPE (gh_number_p (text), text, SCM_ARG2, __FUNCTION__, "real");
-  SCM_ASSERT_TYPE (gh_number_p (first), first, SCM_ARG2, __FUNCTION__, "real");
-  SCM_ASSERT_TYPE (gh_number_p (last), last, SCM_ARG2, __FUNCTION__, "real");
+  SCM_ASSERT_TYPE (ly_number_p (book), book, SCM_ARG2, __FUNCTION__, "real");
+  SCM_ASSERT_TYPE (ly_number_p (text), text, SCM_ARG2, __FUNCTION__, "real");
+  SCM_ASSERT_TYPE (ly_number_p (first), first, SCM_ARG2, __FUNCTION__, "real");
+  SCM_ASSERT_TYPE (ly_number_p (last), last, SCM_ARG2, __FUNCTION__, "real");
 
   return c_ragged_page_breaks (lines,
-                              gh_scm2double (book), gh_scm2double (text),
-                              gh_scm2double (first), gh_scm2double (last));
+                              ly_scm2double (book), ly_scm2double (text),
+                              ly_scm2double (first), ly_scm2double (last));
 }
index 21ec714301b4751bfe9cb62db593dc4b5470fc1d..fcbb2d3f78e8af65631d43aec462d1131a740a23 100644 (file)
@@ -99,8 +99,8 @@ Paper_column::is_musical (Grob *me)
 bool
 Paper_column::is_used (Grob*me)
 {
-  return gh_pair_p (me->get_property ("elements")) ||  Item::is_breakable (me)
-    || gh_pair_p (me->get_property ("bounded-by-me"))
+  return ly_pair_p (me->get_property ("elements")) ||  Item::is_breakable (me)
+    || ly_pair_p (me->get_property ("bounded-by-me"))
     ;
 }
 
@@ -147,13 +147,13 @@ Paper_column::before_line_breaking (SCM grob)
   SCM c = me->get_property ("bounded-by-me");
   SCM *ptrptr = &c;
 
-  while (gh_pair_p (*ptrptr))
+  while (ly_pair_p (*ptrptr))
     {
-      Grob * g = unsmob_grob (gh_car (*ptrptr));
+      Grob * g = unsmob_grob (ly_car (*ptrptr));
 
       if (!g || !g->live ())
        {
-         *ptrptr = gh_cdr (*ptrptr);
+         *ptrptr = ly_cdr (*ptrptr);
        }
       else
        {
index d1c513ebc7fa25aedf9426fae0f691a41e729057..64dfe31de245c54e0c3daa880275d4dd83038612 100644 (file)
@@ -63,8 +63,8 @@ Paper_def::get_dimension (SCM s) const
   SCM val = lookup_variable (s);
   SCM scale = lookup_variable (ly_symbol2scm ("outputscale"));
   
-  Real sc = gh_scm2double (scale);
-  return gh_scm2double (val) / sc;
+  Real sc = ly_scm2double (scale);
+  return ly_scm2double (val) / sc;
 }
 
 /*
@@ -106,8 +106,8 @@ Paper_def::find_scaled_font (Font_metric *f, Real m)
   SCM sizes = scm_hashq_ref (scaled_fonts_, f->self_scm (), SCM_BOOL_F);
   if (sizes != SCM_BOOL_F)
     {
-      SCM met = scm_assoc (gh_double2scm (m), sizes);
-      if (gh_pair_p (met))
+      SCM met = scm_assoc (scm_make_real (m), sizes);
+      if (ly_pair_p (met))
        return unsmob_metrics (ly_cdr (met));
     }
   else
@@ -136,10 +136,10 @@ Paper_def::find_scaled_font (Font_metric *f, Real m)
        */
       SCM l = SCM_EOL;
       SCM *t =  &l;
-      for (SCM s = vf->get_font_list (); gh_pair_p (s); s = gh_cdr (s))
+      for (SCM s = vf->get_font_list (); ly_pair_p (s); s = ly_cdr (s))
        {
          Font_metric*scaled
-           = find_scaled_font (unsmob_metrics (gh_car (s)), m);
+           = find_scaled_font (unsmob_metrics (ly_car (s)), m);
          *t = scm_cons (scaled->self_scm (), SCM_EOL);
          t = SCM_CDRLOC(*t);
        }
@@ -152,12 +152,12 @@ Paper_def::find_scaled_font (Font_metric *f, Real m)
       SCM scale_var = ly_module_lookup (scope_, ly_symbol2scm ("outputscale"));
       SCM coding_var = ly_module_lookup (scope_, ly_symbol2scm ("inputcoding"));
 
-      m /= gh_scm2double (scm_variable_ref (scale_var));
+      m /= ly_scm2double (scm_variable_ref (scale_var));
       val = Modified_font_metric::make_scaled_font_metric (scm_variable_ref (coding_var),
                                                           f, m);
     }
 
-  sizes = scm_acons (gh_double2scm (m), val, sizes);
+  sizes = scm_acons (scm_make_real (m), val, sizes);
   scm_gc_unprotect_object (val);
 
   scm_hashq_set_x (scaled_fonts_, f->self_scm (), sizes);
@@ -176,15 +176,15 @@ Paper_def::font_descriptions () const
   SCM func = ly_scheme_function ("hash-table->alist");
 
   SCM l = SCM_EOL;
-  for (SCM s = scm_call_1 (func, scaled_fonts_); gh_pair_p (s); s = ly_cdr (s))
+  for (SCM s = scm_call_1 (func, scaled_fonts_); ly_pair_p (s); s = ly_cdr (s))
     {
-      SCM entry = gh_car (s);
-      for (SCM t = gh_cdr (entry); gh_pair_p (t); t  = gh_cdr (t))
+      SCM entry = ly_car (s);
+      for (SCM t = ly_cdr (entry); ly_pair_p (t); t  = ly_cdr (t))
        {
-         Font_metric *fm= unsmob_metrics (gh_cdar (t));
+         Font_metric *fm= unsmob_metrics (ly_cdar (t));
 
          if (dynamic_cast<Modified_font_metric*> (fm))
-           l = gh_cons (fm->self_scm (), l);
+           l = scm_cons (fm->self_scm (), l);
        }
     }
   return l;
@@ -204,5 +204,5 @@ LY_DEFINE (ly_paper_def_p, "ly:paper-def?",
   Paper_def *op = dynamic_cast<Paper_def*> (unsmob_music_output_def (def));
 
   bool pap = op;
-  return gh_bool2scm (pap);
+  return ly_bool2scm (pap);
 }
index 94a35cce26e3ea47c5ae0754eac9ee7c7fa556c0..0b9b26ce65bfacbfabbeabc9c528f179bfd04fda 100644 (file)
@@ -71,7 +71,7 @@ LY_DEFINE (ly_paper_line_height, "ly:paper-line-height",
 {
   Paper_line *pl = unsmob_paper_line (line);
   SCM_ASSERT_TYPE (pl, line, SCM_ARG1, __FUNCTION__, "paper-line");
-  return gh_double2scm (pl->dim ()[Y_AXIS]);
+  return scm_make_real (pl->dim ()[Y_AXIS]);
 }
 
 LY_DEFINE (ly_paper_line_number, "ly:paper-line-number",
@@ -80,7 +80,7 @@ LY_DEFINE (ly_paper_line_number, "ly:paper-line-number",
 {
   Paper_line *pl = unsmob_paper_line (line);
   SCM_ASSERT_TYPE (pl, line, SCM_ARG1, __FUNCTION__, "paper-line");
-  return gh_int2scm (pl->number_);
+  return scm_int2num (pl->number_);
 }
 
 LY_DEFINE (ly_paper_line_break_score, "ly:paper-line-break-score",
@@ -89,5 +89,5 @@ LY_DEFINE (ly_paper_line_break_score, "ly:paper-line-break-score",
 {
   Paper_line *pl = unsmob_paper_line (line);
   SCM_ASSERT_TYPE (pl, line, SCM_ARG1, __FUNCTION__, "paper-line");
-  return gh_int2scm (int (pl->is_title ()) * TITLE_PENALTY);
+  return scm_int2num (int (pl->is_title ()) * TITLE_PENALTY);
 }
index a4332703229cb10a05c286521394189cc8ce611f..2db6aaa9cc18a23ba025b19a33018015123ab34d 100644 (file)
@@ -118,7 +118,7 @@ Paper_outputter::output_scheme (SCM scm)
   if (output_format_global == PAGE_LAYOUT)
     scm_display (scm_eval (scm, output_module_), file_);
   else
-    gh_call2 (output_func_, scm, file_);
+    scm_call_2 (output_func_, scm, file_);
 }
 
 void
@@ -127,7 +127,7 @@ Paper_outputter::output_metadata (Paper_def *paper, SCM scopes)
   SCM fields = SCM_EOL;
   for (int i = dump_header_fieldnames_global.size (); i--; )
     fields
-      = gh_cons (ly_symbol2scm (dump_header_fieldnames_global[i].to_str0 ()),
+      = scm_cons (ly_symbol2scm (dump_header_fieldnames_global[i].to_str0 ()),
                 fields);
   output_scheme (scm_list_n (ly_symbol2scm ("output-scopes"),
                             paper->self_scm (),
@@ -180,8 +180,8 @@ Paper_outputter::output_line (SCM line, Offset *origin, bool is_last)
 
   if (output_format_global != PAGE_LAYOUT)
     output_scheme (scm_list_3 (ly_symbol2scm ("start-system"),
-                              gh_double2scm (dim[X_AXIS]),
-                              gh_double2scm (dim[Y_AXIS])));
+                              scm_make_real (dim[X_AXIS]),
+                              scm_make_real (dim[Y_AXIS])));
   else
     {
       output_scheme (scm_list_3 (ly_symbol2scm ("new-start-system"),
@@ -191,7 +191,7 @@ Paper_outputter::output_line (SCM line, Offset *origin, bool is_last)
     }
 
   SCM between = SCM_EOL;
-  for (SCM s = pl->stencils (); gh_pair_p (s); s = ly_cdr (s))
+  for (SCM s = pl->stencils (); ly_pair_p (s); s = ly_cdr (s))
     {
       Stencil *stil = unsmob_stencil (ly_car (s));
       if (stil)
@@ -224,7 +224,7 @@ Paper_outputter::output_expr (SCM expr, Offset o)
 {
   while (1)
     {
-      if (!gh_pair_p (expr))
+      if (!ly_pair_p (expr))
        return;
   
       SCM head =ly_car (expr);
@@ -234,8 +234,8 @@ Paper_outputter::output_expr (SCM expr, Offset o)
       
          output_scheme (scm_list_n (ly_symbol2scm ("define-origin"),
                                     scm_makfrom0str (ip->file_string ().to_str0 ()),
-                                    gh_int2scm (ip->line_number ()),
-                                    gh_int2scm (ip->column_number ()),
+                                    scm_int2num (ip->line_number ()),
+                                    scm_int2num (ip->column_number ()),
                                     SCM_UNDEFINED));
          expr = ly_cadr (expr);
        }
@@ -257,8 +257,8 @@ Paper_outputter::output_expr (SCM expr, Offset o)
       else
        {
          output_scheme (scm_list_n (ly_symbol2scm ("placebox"),
-                                    gh_double2scm (o[X_AXIS]),
-                                    gh_double2scm (o[Y_AXIS]),
+                                    scm_make_real (o[X_AXIS]),
+                                    scm_make_real (o[Y_AXIS]),
                                     expr,
                                     SCM_UNDEFINED));
          return;
index 1eab7f80f6bc4b54db8cdb55d60f47f415ff191b..3c7311b816f77b26fbe11ccd98bc882bfc6f3bd6 100644 (file)
@@ -45,7 +45,7 @@ Paper_score::typeset_line (System *system)
   if (!system_)
     system_ = system;
 
-  systems_ = gh_cons (system->self_scm (), systems_);
+  systems_ = scm_cons (system->self_scm (), systems_);
   system->pscore_ = this;
 
   scm_gc_unprotect_object (system->self_scm ());
index c30547f71f92fcdd90421df9461331d8411c602c..fa6098a9dc19bbac415a3cb1d3874188068d4e73 100644 (file)
@@ -48,7 +48,7 @@ internal_ly_parse_scm (Parse_start * ps, bool safe)
      Shouldn't scm_read () do this for us?  */
   scm_fill_input (port);
   SCM to = scm_ftell (port);
-  ps->nchars = gh_scm2int (to) - gh_scm2int (from);
+  ps->nchars = ly_scm2int (to) - ly_scm2int (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.
@@ -82,7 +82,7 @@ parse_handler (void * data, SCM tag, SCM args)
   ps->start_location_.error (_("GUILE signaled an error for the expression beginning here"));
 
   if (scm_ilength (args) > 2)
-    scm_display_error_message (gh_cadr (args), gh_caddr (args), scm_current_error_port ());
+    scm_display_error_message (ly_cadr (args), ly_caddr (args), scm_current_error_port ());
 
   /*
     The following is a kludge; we should probably search for
index f0e96c87b098d61aee15d576c2ab6c00457c57b7..0a32cc0322576676dcd14fd039514bd6c3fbf8a9 100644 (file)
@@ -58,7 +58,6 @@ SCM get_next_unique_context ();
 
 #define YYERROR_VERBOSE 1
 
-My_lily_parser* my_lily_parser;
 #define YYPARSE_PARAM my_lily_parser
 #define YYLEX_PARAM my_lily_parser
 #define THIS\
@@ -72,10 +71,10 @@ void
 tag_music (Music *m, SCM tag, Input ip)
 {
        SCM tags = m->get_property ("tags");
-       if (gh_symbol_p (tag))
+       if (ly_symbol_p (tag))
                tags = scm_cons (tag, tags);
-       else if (gh_list_p (tag))
-               tags = gh_append2 (tag, tags);
+       else if (ly_list_p (tag))
+               tags = ly_append2 (tag, tags);
        else
                ip.warning (_ ("Tag must be symbol or list of symbols."));
 
@@ -128,7 +127,7 @@ is_is_duration (int t)
 void
 set_music_properties (Music *p, SCM a)
 {
-  for (SCM k = a; gh_pair_p (k); k = ly_cdr (k))
+  for (SCM k = a; ly_pair_p (k); k = ly_cdr (k))
        p->internal_set_property (ly_caar (k), ly_cdar (k));
 }
 
@@ -158,8 +157,8 @@ make_chord (SCM pitch, SCM dur, SCM modification_list)
 bool
 ly_input_procedure_p (SCM x)
 {
-       return gh_procedure_p (x)
-               || (gh_pair_p (x) && gh_procedure_p (gh_car (x)));
+       return ly_procedure_p (x)
+               || (ly_pair_p (x) && ly_procedure_p (ly_car (x)));
 }
 
 Music*
@@ -239,7 +238,6 @@ or
 
 %pure_parser
 
-
 %token ACCEPTS
 %token ADDLYRICS
 %token ADDQUOTE
@@ -582,12 +580,12 @@ context_def_spec_body:
        | context_def_spec_body GROBDESCRIPTIONS embedded_scm {
                Context_def*td = unsmob_context_def ($$);
 
-               for (SCM p = $3; gh_pair_p (p); p = ly_cdr (p)) {
-                       SCM tag = gh_caar (p);
+               for (SCM p = $3; ly_pair_p (p); p = ly_cdr (p)) {
+                       SCM tag = ly_caar (p);
 
                        /* TODO: should make new tag "grob-definition" ? */
                        td->add_context_mod (scm_list_3 (ly_symbol2scm ("assign"),
-                                                       tag, gh_cons (ly_cdar (p), SCM_EOL)));
+                                                       tag, scm_cons (ly_cdar (p), SCM_EOL)));
                }
        }
        | context_def_spec_body context_mod {
@@ -621,8 +619,8 @@ score_body:
                        guh.
                */
                SCM check_funcs = ly_scheme_function ("toplevel-music-functions");
-               for (; gh_pair_p (check_funcs); check_funcs = gh_cdr (check_funcs))
-                       m = gh_call1 (gh_car (check_funcs), m);
+               for (; ly_pair_p (check_funcs); check_funcs = ly_cdr (check_funcs))
+                       m = scm_call_1 (ly_car (check_funcs), m);
                $$->music_ = m;
 
        }
@@ -706,7 +704,7 @@ music_output_def_body:
                        junk this ? there already is tempo stuff in
                        music.
                */
-               int m = gh_scm2int ( $2->get_property ("metronome-count"));
+               int m = ly_scm2int ( $2->get_property ("metronome-count"));
                Duration *d = unsmob_duration ($2->get_property ("tempo-unit"));
                Midi_def *md = dynamic_cast<Midi_def*> ($$);
                if (md)
@@ -722,7 +720,7 @@ tempo_event:
        TEMPO steno_duration '=' bare_unsigned  {
                $$ = MY_MAKE_MUSIC ("MetronomeChangeEvent");
                $$->set_property ("tempo-unit", $2);
-               $$->set_property ("metronome-count", gh_int2scm ( $4));
+               $$->set_property ("metronome-count", scm_int2num ( $4));
        }
        ;
 
@@ -741,11 +739,11 @@ Music_list:
                SCM s = $$;
                SCM c = scm_cons ($2->self_scm (), SCM_EOL);
                scm_gc_unprotect_object ($2->self_scm ()); /* UGH */
-               if (gh_pair_p (ly_cdr (s)))
-                       gh_set_cdr_x (ly_cdr (s), c); /* append */
+               if (ly_pair_p (ly_cdr (s)))
+                       scm_set_cdr_x (ly_cdr (s), c); /* append */
                else
-                       gh_set_car_x (s, c); /* set first cons */
-               gh_set_cdr_x (s, c);  /* remember last cell */
+                       scm_set_car_x (s, c); /* set first cons */
+               scm_set_cdr_x (s, c);  /* remember last cell */
        }
        | Music_list error {
        }
@@ -771,9 +769,9 @@ Repeated_music:
        {
                Music *beg = $4;
                int times = $3;
-               SCM alts = gh_pair_p ($5) ? gh_car ($5) : SCM_EOL;
+               SCM alts = ly_pair_p ($5) ? ly_car ($5) : SCM_EOL;
                if (times < scm_ilength (alts)) {
-                 unsmob_music (gh_car (alts))
+                 unsmob_music (ly_car (alts))
                    ->origin ()->warning (
                    _ ("More alternatives than repeats.  Junking excess alternatives."));
                  alts = ly_truncate_list (times, alts);
@@ -790,10 +788,10 @@ Repeated_music:
                        r-> set_property ("element", beg->self_scm ());
                        scm_gc_unprotect_object (beg->self_scm ());
                        }
-               r->set_property ("repeat-count", gh_int2scm (times >? 1));
+               r->set_property ("repeat-count", scm_int2num (times >? 1));
 
                r-> set_property ("elements",alts);
-               if (gh_equal_p ($2, scm_makfrom0str ("tremolo"))) {
+               if (ly_equal_p ($2, scm_makfrom0str ("tremolo"))) {
                        /*
                        TODO: move this code to Scheme.
                        */
@@ -816,7 +814,7 @@ Repeated_music:
                                shift -= 1;
                                r->compress (Moment (Rational (1, list_len)));
                                }
-                       gh_call3 (func, r->self_scm (), gh_int2scm (shift),gh_int2scm (dots));
+                       scm_call_3 (func, r->self_scm (), scm_int2num (shift),scm_int2num (dots));
 
                }
                r->set_spot (*$4->origin ());
@@ -890,7 +888,7 @@ grace_head:
 context_mod_list:
        /* */  { $$ = SCM_EOL; }
        | context_mod_list context_mod  {
-                $$ = gh_cons ($2, $1);
+                $$ = scm_cons ($2, $1);
        }
        ;
 
@@ -907,7 +905,7 @@ Composite_music:
        | PARTCOMBINE Music Music {
                SCM proc = ly_scheme_function ("make-part-combine-music");
 
-               SCM res = scm_call_1 (proc, gh_list ($2->self_scm (),
+               SCM res = scm_call_1 (proc, scm_listify ($2->self_scm (),
                        $3->self_scm (), SCM_UNDEFINED));
                scm_gc_unprotect_object ($3->self_scm ());
                scm_gc_unprotect_object ($2->self_scm ());
@@ -984,7 +982,7 @@ basic music objects too, since the meaning is different.
                fraction Music  
 
        {
-               int n = gh_scm2int (ly_car ($3)); int d = gh_scm2int (ly_cdr ($3));
+               int n = ly_scm2int (ly_car ($3)); int d = ly_scm2int (ly_cdr ($3));
                Music *mp = $4;
 
                $$= MY_MAKE_MUSIC ("TimeScaledMusic");
@@ -992,8 +990,8 @@ basic music objects too, since the meaning is different.
 
                $$->set_property ("element", mp->self_scm ());
                scm_gc_unprotect_object (mp->self_scm ());
-               $$->set_property ("numerator", gh_int2scm (n));
-               $$->set_property ("denominator", gh_int2scm (d));
+               $$->set_property ("numerator", scm_int2num (n));
+               $$->set_property ("denominator", scm_int2num (d));
                $$->compress (Moment (Rational (n,d)));
 
        }
@@ -1018,7 +1016,7 @@ basic music objects too, since the meaning is different.
                        }
                else
                        {
-                       SCM ret = gh_call1 ($2, $3->self_scm ());
+                       SCM ret = scm_call_1 ($2, $3->self_scm ());
                        Music *m = unsmob_music (ret);
                        if (!m) {
                                THIS->parser_error ("\\apply must return a Music");
@@ -1104,7 +1102,7 @@ relative_music:
 re_rhythmed_music:
        ADDLYRICS Music Music {
        Music *l = MY_MAKE_MUSIC ("LyricCombineMusic");
-         l->set_property ("elements", gh_list ($2->self_scm (), $3->self_scm (), SCM_UNDEFINED));
+         l->set_property ("elements", scm_listify ($2->self_scm (), $3->self_scm (), SCM_UNDEFINED));
          scm_gc_unprotect_object ($3->self_scm ());
          scm_gc_unprotect_object ($2->self_scm ());
          $$ = l;
@@ -1182,30 +1180,30 @@ music_property_def:
        OVERRIDE context_prop_spec embedded_scm '=' scalar {
                $$ = property_op_to_music (scm_list_4 (
                        ly_symbol2scm ("poppush"),
-                       gh_cadr ($2),
+                       ly_cadr ($2),
                        $3, $5));
-               $$= context_spec_music (gh_car ($2), SCM_UNDEFINED, $$, SCM_EOL);
+               $$= context_spec_music (ly_car ($2), SCM_UNDEFINED, $$, SCM_EOL);
        }
        | REVERT context_prop_spec embedded_scm {
                $$ = property_op_to_music (scm_list_3 (
                        ly_symbol2scm ("pop"),
-                       gh_cadr ($2),
+                       ly_cadr ($2),
                        $3));
 
-               $$= context_spec_music (gh_car ($2), SCM_UNDEFINED, $$, SCM_EOL);
+               $$= context_spec_music (ly_car ($2), SCM_UNDEFINED, $$, SCM_EOL);
        }
        | SET context_prop_spec '=' scalar {
                $$ = property_op_to_music (scm_list_3 (
                        ly_symbol2scm ("assign"),
-                       gh_cadr ($2),
+                       ly_cadr ($2),
                        $4));
-               $$= context_spec_music (gh_car ($2), SCM_UNDEFINED, $$, SCM_EOL);
+               $$= context_spec_music (ly_car ($2), SCM_UNDEFINED, $$, SCM_EOL);
        }
        | UNSET context_prop_spec {
                $$ = property_op_to_music (scm_list_2 (
                        ly_symbol2scm ("unset"),
-                       gh_cadr ($2)));
-               $$= context_spec_music (gh_car ($2), SCM_UNDEFINED, $$, SCM_EOL);
+                       ly_cadr ($2)));
+               $$= context_spec_music (ly_car ($2), SCM_UNDEFINED, $$, SCM_EOL);
        }
        | ONCE music_property_def {
                SCM e = $2->get_property ("element");
@@ -1219,10 +1217,10 @@ music_property_def:
 
 scalar:
         string          { $$ = $1; }
-        | bare_int      { $$ = gh_int2scm ($1); }
+        | bare_int      { $$ = scm_int2num ($1); }
         | embedded_scm  { $$ = $1; }
        | full_markup {  $$ = $1; }
-       | DIGIT { $$ = gh_int2scm ($1); }
+       | DIGIT { $$ = scm_int2num ($1); }
        ;
 
 /*
@@ -1252,7 +1250,7 @@ event_chord:
        pre_events simple_element post_events   {
                SCM elts = $2-> get_property ("elements");
 
-               elts = gh_append2 (elts, scm_reverse_x ($3, SCM_EOL));
+               elts = ly_append2 (elts, scm_reverse_x ($3, SCM_EOL));
 
                $2->set_property ("elements", elts);
                $$ = $2;
@@ -1269,9 +1267,9 @@ note_chord_element:
                SCM es = $1->get_property ("elements");
                SCM postevs = scm_reverse_x ($3, SCM_EOL);
 
-               for (SCM s = es; gh_pair_p (s); s = gh_cdr (s))
-                 unsmob_music (gh_car (s))->set_property ("duration", dur);
-               es = gh_append2 (es, postevs);
+               for (SCM s = es; ly_pair_p (s); s = ly_cdr (s))
+                 unsmob_music (ly_car (s))->set_property ("duration", dur);
+               es = ly_append2 (es, postevs);
 
                $1-> set_property ("elements", es);
                $$ = $1;
@@ -1302,7 +1300,7 @@ chord_body:
 chord_body_elements:
        /* empty */             { $$ = SCM_EOL; }
        | chord_body_elements chord_body_element {
-               $$ = gh_cons ($2->self_scm (), $1);
+               $$ = scm_cons ($2->self_scm (), $1);
                scm_gc_unprotect_object ($2->self_scm ());
        }
        ;
@@ -1317,7 +1315,7 @@ chord_body_element:
                if ($2 % 2 || $3 % 2)
                        n->set_property ("force-accidental", SCM_BOOL_T);
 
-               if (gh_pair_p ($4)) {
+               if (ly_pair_p ($4)) {
                        SCM arts = scm_reverse_x ($4, SCM_EOL);
                        n->set_property ("articulations", arts);
                }
@@ -1329,7 +1327,7 @@ chord_body_element:
                n->set_property ("drum-type", $1);
                n->set_spot (THIS->here_input ());
 
-               if (gh_pair_p ($2)) {
+               if (ly_pair_p ($2)) {
                        SCM arts = scm_reverse_x ($2, SCM_EOL);
                        n->set_property ("articulations", arts);
                }
@@ -1370,7 +1368,7 @@ command_element:
                        evs = scm_hash_ref (tab, key, SCM_BOOL_F);
                }
                Music *quote = 0;
-               if (gh_vector_p (evs))
+               if (ly_vector_p (evs))
                {
                        quote = MY_MAKE_MUSIC ("QuoteMusic");
                        quote->set_property ("duration", $3);
@@ -1391,7 +1389,7 @@ command_element:
        }
        | E_LEFTSQUARE {
                Music *l = MY_MAKE_MUSIC ("LigatureEvent");
-               l->set_property ("span-direction", gh_int2scm (START));
+               l->set_property ("span-direction", scm_int2num (START));
                l->set_spot (THIS->here_input ());
 
                $$ = MY_MAKE_MUSIC ("EventChord");
@@ -1401,7 +1399,7 @@ command_element:
        }
        | E_RIGHTSQUARE {
                Music *l = MY_MAKE_MUSIC ("LigatureEvent");
-               l->set_property ("span-direction", gh_int2scm (STOP));
+               l->set_property ("span-direction", scm_int2num (STOP));
                l->set_spot (THIS->here_input ());
 
                $$ = MY_MAKE_MUSIC ("EventChord");
@@ -1459,7 +1457,7 @@ command_element:
        | TIME_T fraction  {
                SCM proc= ly_scheme_function ("make-time-signature-set");
 
-               SCM result = scm_apply_2   (proc, gh_car ($2), gh_cdr ($2), SCM_EOL);
+               SCM result = scm_apply_2   (proc, ly_car ($2), ly_cdr ($2), SCM_EOL);
                scm_gc_protect_object (result);
                $$ = unsmob_music (result);
        }
@@ -1512,7 +1510,7 @@ post_events:
        }
        | post_events post_event {
                $2->set_spot (THIS->here_input ());
-               $$ = gh_cons ($2->self_scm (), $$);
+               $$ = scm_cons ($2->self_scm (), $$);
                scm_gc_unprotect_object ($2->self_scm ());
        }
        | post_events tagged_post_event {
@@ -1546,12 +1544,12 @@ post_event:
        }
        | script_dir direction_reqd_event {
                if ($1)
-                       $2->set_property ("direction", gh_int2scm ($1));
+                       $2->set_property ("direction", scm_int2num ($1));
                $$ = $2;
        }
        | script_dir direction_less_event {
                if ($1)
-                       $2->set_property ("direction", gh_int2scm ($1));
+                       $2->set_property ("direction", scm_int2num ($1));
                $$ = $2;
        }
        | string_number_event
@@ -1560,7 +1558,7 @@ post_event:
 string_number_event:
        E_UNSIGNED {
                Music *s = MY_MAKE_MUSIC ("StringNumberEvent");
-               s->set_property ("string-number", gh_int2scm ($1));
+               s->set_property ("string-number", scm_int2num ($1));
                s->set_spot (THIS->here_input ());
                $$ = s;
        }
@@ -1582,13 +1580,13 @@ configurable, i.e.
 */
                Music *m = MY_MAKE_MUSIC ("BeamEvent");
                m->set_spot (THIS->here_input ());
-               m->set_property ("span-direction", gh_int2scm (START));
+               m->set_property ("span-direction", scm_int2num (START));
                $$ = m;
        }
        | ']'  {
                Music *m = MY_MAKE_MUSIC ("BeamEvent");
                m->set_spot (THIS->here_input ());
-               m->set_property ("span-direction", gh_int2scm (STOP));
+               m->set_property ("span-direction", scm_int2num (STOP));
                $$ = m;
        }
        | '~' {
@@ -1599,12 +1597,12 @@ configurable, i.e.
        | close_event {
                $$ = $1;
                dynamic_cast<Music *> ($$)->set_property ("span-direction",
-                       gh_int2scm (START));
+                       scm_int2num (START));
        }
        | open_event {
                $$ = $1;
                dynamic_cast<Music *> ($$)->set_property ("span-direction",
-                       gh_int2scm (STOP));
+                       scm_int2num (STOP));
        }
        | EVENT_IDENTIFIER      {
                $$ = unsmob_music ($1);
@@ -1612,7 +1610,7 @@ configurable, i.e.
        | tremolo_type  {
                Music *a = MY_MAKE_MUSIC ("TremoloEvent");
                a->set_spot (THIS->here_input ());
-               a->set_property ("tremolo-type", gh_int2scm ($1));
+               a->set_property ("tremolo-type", scm_int2num ($1));
                $$ = a;
         }
        ;       
@@ -1624,7 +1622,7 @@ direction_reqd_event:
        | script_abbreviation {
                SCM s = THIS->lexer_->lookup_identifier ("dash" + ly_scm2string ($1));
                Music *a = MY_MAKE_MUSIC ("ArticulationEvent");
-               if (gh_string_p (s))
+               if (ly_string_p (s))
                        a->set_property ("articulation-type", s);
                else THIS->parser_error (_ ("Expecting string as script definition"));
                $$ = a;
@@ -1633,9 +1631,9 @@ direction_reqd_event:
 
 oct_check:
        /**/ { $$ = SCM_EOL; }
-       | '='  { $$ = gh_int2scm (0); }
-       | '=' sub_quotes { $$ = gh_int2scm ($2); }
-       | '=' sup_quotes { $$ = gh_int2scm ($2); }
+       | '='  { $$ = scm_int2num (0); }
+       | '=' sub_quotes { $$ = scm_int2num ($2); }
+       | '=' sup_quotes { $$ = scm_int2num ($2); }
        ;
 
 sup_quotes:
@@ -1765,7 +1763,7 @@ gen_text_def:
        }
        | DIGIT {
                Music *t = MY_MAKE_MUSIC ("FingerEvent");
-               t->set_property ("digit", gh_int2scm ($1));
+               t->set_property ("digit", scm_int2num ($1));
                t->set_spot (THIS->here_input ());
                $$ = t;
        }
@@ -1858,7 +1856,7 @@ multiplied_duration:
                $$ = unsmob_duration ($$)->compressed ( $3) .smobbed_copy ();
        }
        | multiplied_duration '*' FRACTION {
-               Rational  m (gh_scm2int (ly_car ($3)), gh_scm2int (ly_cdr ($3)));
+               Rational  m (ly_scm2int (ly_car ($3)), ly_scm2int (ly_cdr ($3)));
 
                $$ = unsmob_duration ($$)->compressed (m).smobbed_copy ();
        }
@@ -1867,7 +1865,7 @@ multiplied_duration:
 fraction:
        FRACTION { $$ = $1; }
        | UNSIGNED '/' UNSIGNED {
-               $$ = scm_cons (gh_int2scm ($1), gh_int2scm ($3));
+               $$ = scm_cons (scm_int2num ($1), scm_int2num ($3));
        }
        ;
 
@@ -1899,10 +1897,10 @@ tremolo_type:
 *****************************************************************/
 bass_number:
        DIGIT   {
-               $$ = scm_number_to_string (gh_int2scm ($1), gh_int2scm (10));
+               $$ = scm_number_to_string (scm_int2num ($1), scm_int2num (10));
        }
        | UNSIGNED {
-               $$ = scm_number_to_string (gh_int2scm ($1), gh_int2scm (10));
+               $$ = scm_number_to_string (scm_int2num ($1), scm_int2num (10));
        }
        | STRING { $$ = $1; }
        ;
@@ -1931,11 +1929,11 @@ bass_figure:
                Music *m = unsmob_music ($1);
                if ($2) {
                        SCM salter = m->get_property ("alteration");
-                       int alter = gh_number_p (salter) ? gh_scm2int (salter) : 0;
+                       int alter = ly_number_p (salter) ? ly_scm2int (salter) : 0;
                        m->set_property ("alteration",
-                               gh_int2scm (alter + $2));
+                               scm_int2num (alter + $2));
                } else {
-                       m->set_property ("alteration", gh_int2scm (0));
+                       m->set_property ("alteration", scm_int2num (0));
                }
        }
        ;
@@ -1994,10 +1992,10 @@ simple_element:
                n->set_property ("pitch", $1);
                n->set_property ("duration", $5);
 
-               if (gh_number_p ($4))
+               if (ly_number_p ($4))
                {
-                       int q = gh_scm2int ($4);
-                       n->set_property ("absolute-octave", gh_int2scm (q-1));
+                       int q = ly_scm2int ($4);
+                       n->set_property ("absolute-octave", scm_int2num (q-1));
                }
 
                if ($3 % 2)
@@ -2032,7 +2030,7 @@ simple_element:
                Music *m = unsmob_music ($1);
                Input i = THIS->pop_spot ();
                m->set_spot (i);
-               for (SCM s = m->get_property ("elements"); gh_pair_p (s); s = ly_cdr (s))
+               for (SCM s = m->get_property ("elements"); ly_pair_p (s); s = ly_cdr (s))
                {
                        unsmob_music (ly_car (s))->set_property ("duration", $2);
                }
@@ -2104,7 +2102,7 @@ new_chord:
        }
        | steno_tonic_pitch optional_notemode_duration chord_separator chord_items {
                SCM its = scm_reverse_x ($4, SCM_EOL);
-               $$ = make_chord ($1, $2, gh_cons ($3, its));
+               $$ = make_chord ($1, $2, scm_cons ($3, its));
        }
        ;
 
@@ -2113,7 +2111,7 @@ chord_items:
                $$ = SCM_EOL;           
        }
        | chord_items chord_item {
-               $$ = gh_cons ($2, $$);
+               $$ = scm_cons ($2, $$);
        }
        ;
 
@@ -2145,9 +2143,9 @@ chord_item:
        ;
 
 step_numbers:
-       step_number { $$ = gh_cons ($1, SCM_EOL); }
+       step_number { $$ = scm_cons ($1, SCM_EOL); }
        | step_numbers '.' step_number {
-               $$ = gh_cons ($3, $$);
+               $$ = scm_cons ($3, $$);
        }
        ;
 
@@ -2201,7 +2199,7 @@ number_factor:
 
 bare_number:
        UNSIGNED        {
-               $$ = gh_int2scm ($1);
+               $$ = scm_int2num ($1);
        }
        | REAL          {
                $$ = $1;
@@ -2210,10 +2208,10 @@ bare_number:
                $$ = $1;
        }
        | REAL NUMBER_IDENTIFIER        {
-               $$ = gh_double2scm (gh_scm2double ($1) *gh_scm2double ($2));
+               $$ = scm_make_real (ly_scm2double ($1) *ly_scm2double ($2));
        }
        | UNSIGNED NUMBER_IDENTIFIER    {
-               $$ = gh_double2scm ($1 *gh_scm2double ($2));
+               $$ = scm_make_real ($1 *ly_scm2double ($2));
        }
        ;
 
@@ -2231,7 +2229,7 @@ bare_int:
        bare_number {
                if (scm_integer_p ($1) == SCM_BOOL_T)
                {
-                       int k = gh_scm2int ($1);
+                       int k = ly_scm2int ($1);
                        $$ = k;
                } else
                {
@@ -2343,7 +2341,7 @@ markup_line:
 markup_list_body:
        /**/ {  $$ = SCM_EOL; }
        | markup_list_body markup {
-               $$ = gh_cons ($2, $1);
+               $$ = scm_cons ($2, $1);
        }
        ;
 
@@ -2403,10 +2401,10 @@ otherwise, we have to import music classes into the lexer.
 int
 My_lily_lexer::try_special_identifiers (SCM *destination, SCM sid)
 {
-       if (gh_string_p (sid)) {
+       if (ly_string_p (sid)) {
                *destination = sid;
                return STRING_IDENTIFIER;
-       } else if (gh_number_p (sid)) {
+       } else if (ly_number_p (sid)) {
                *destination = sid;
                return NUMBER_IDENTIFIER;
        } else if (unsmob_context_def (sid)) {
@@ -2444,9 +2442,9 @@ Music *
 property_op_to_music (SCM op)
 {
        Music *m = 0;
-       SCM tag = gh_car (op);
-       SCM symbol = gh_cadr (op);
-       SCM args = gh_cddr (op);
+       SCM tag = ly_car (op);
+       SCM symbol = ly_cadr (op);
+       SCM args = ly_cddr (op);
        SCM grob_val = SCM_UNDEFINED;
        SCM grob_sym = SCM_UNDEFINED;
        SCM val = SCM_UNDEFINED;
@@ -2454,7 +2452,7 @@ property_op_to_music (SCM op)
        if (tag == ly_symbol2scm ("assign"))
                {
                m = MY_MAKE_MUSIC ("PropertySet");
-               val = gh_car (args);
+               val = ly_car (args);
                }
        else if (tag == ly_symbol2scm ("unset"))
                m = MY_MAKE_MUSIC ("PropertyUnset");
@@ -2462,12 +2460,12 @@ property_op_to_music (SCM op)
                 || tag == ly_symbol2scm ("push"))
                {
                m = MY_MAKE_MUSIC ("OverrideProperty");
-               grob_sym = gh_car (args);
-               grob_val = gh_cadr (args);
+               grob_sym = ly_car (args);
+               grob_val = ly_cadr (args);
                }
        else if (tag == ly_symbol2scm ("pop")) {
                m = MY_MAKE_MUSIC ("RevertProperty");
-               grob_sym = gh_car (args);
+               grob_sym = ly_car (args);
                }
 
        m->set_property ("symbol", symbol);
@@ -2482,7 +2480,7 @@ property_op_to_music (SCM op)
                bool itc = internal_type_checking_global_b;
                /* UGH.
                */
-               bool autobeam = gh_equal_p (symbol, ly_symbol2scm ("autoBeamSettings"));
+               bool autobeam = ly_equal_p (symbol, ly_symbol2scm ("autoBeamSettings"));
                if (autobeam)
                        internal_type_checking_global_b = false;
                m->set_property ("grob-property", grob_sym);
@@ -2506,10 +2504,10 @@ context_spec_music (SCM type, SCM id, Music *m, SCM ops)
        scm_gc_unprotect_object (m->self_scm ());
 
        csm->set_property ("context-type",
-               gh_symbol_p (type) ? type : scm_string_to_symbol (type));
+               ly_symbol_p (type) ? type : scm_string_to_symbol (type));
        csm->set_property ("property-operations", ops);
 
-       if (gh_string_p (id))
+       if (ly_string_p (id))
                csm->set_property ("context-id", id);
        return csm;
 }
index a25f6a1df43bb5cf9e4d9ce379931ead934ab258..1d7e103d8e7060e87def80d87f0fef38f7dc6ebb 100644 (file)
@@ -327,14 +327,14 @@ Part_combine_iterator::construct_children ()
   one_.set_translator (one);
 
   set_translator (one);
-  first_iter_ = unsmob_iterator (get_iterator (unsmob_music (gh_car (lst))));
+  first_iter_ = unsmob_iterator (get_iterator (unsmob_music (ly_car (lst))));
 
 
   Context *two = tr->find_create_context (ly_symbol2scm ("Voice"),
                                                      "two", props);
   two_.set_translator (two);
   set_translator (two);
-  second_iter_ = unsmob_iterator (get_iterator (unsmob_music (gh_cadr (lst))));
+  second_iter_ = unsmob_iterator (get_iterator (unsmob_music (ly_cadr (lst))));
 
 
   set_translator (tr);
@@ -356,10 +356,10 @@ Part_combine_iterator::construct_children ()
     {
       SCM sym = ly_symbol2scm (*p);
       execute_pushpop_property (one, sym,
-                                    ly_symbol2scm ("direction"), gh_int2scm (1));
+                                    ly_symbol2scm ("direction"), scm_int2num (1));
 
       execute_pushpop_property (two, sym,
-                               ly_symbol2scm ("direction"), gh_int2scm (-1));
+                               ly_symbol2scm ("direction"), scm_int2num (-1));
     }
 
 }
@@ -370,13 +370,13 @@ Part_combine_iterator::process (Moment m)
   Moment now = get_outlet ()->now_mom ();
   Moment *splitm = 0;
   
-  for (; gh_pair_p (split_list_); split_list_ = gh_cdr (split_list_))
+  for (; ly_pair_p (split_list_); split_list_ = ly_cdr (split_list_))
     {
-      splitm = unsmob_moment (gh_caar (split_list_));
+      splitm = unsmob_moment (ly_caar (split_list_));
       if (splitm && *splitm + start_moment_ > now)
        break ;
 
-      SCM tag = gh_cdar (split_list_);
+      SCM tag = ly_cdar (split_list_);
       
       if (tag == ly_symbol2scm ("chords"))
        chords_together ();
@@ -392,10 +392,10 @@ Part_combine_iterator::process (Moment m)
        solo1 ();
       else if (tag == ly_symbol2scm ("solo2"))
        solo2 ();
-      else if (gh_symbol_p (tag))
+      else if (ly_symbol_p (tag))
        {
          String s =  "Unknown split directive: "
-           + (gh_symbol_p (tag) ? ly_symbol2string (tag) : String ("not a symbol")); 
+           + (ly_symbol_p (tag) ? ly_symbol2string (tag) : String ("not a symbol")); 
          programming_error (s);
        }
     }
index bdf5e3ccb8e362e982e82b3504f5365307875c0f..acbe2744e71657bf3452ed734ceb160bc1c57707 100644 (file)
@@ -41,7 +41,7 @@ Performer_group_performer::acknowledge_audio_elements ()
     {
       Audio_element_info info = announce_infos_[j];
 
-      for (SCM p = get_simple_trans_list (); gh_pair_p (p); p = ly_cdr (p))
+      for (SCM p = get_simple_trans_list (); ly_pair_p (p); p = ly_cdr (p))
        {
          Translator * t = unsmob_translator (ly_car (p));
          Performer * eng = dynamic_cast<Performer*> (t);
@@ -76,7 +76,7 @@ Performer_group_performer::Performer_group_performer ()
 void
 performer_each (SCM list, Performer_method method)
 {
-  for (SCM p = list; gh_pair_p (p); p = ly_cdr (p))
+  for (SCM p = list; ly_pair_p (p); p = ly_cdr (p))
     {
       Performer * e = dynamic_cast<Performer*>(unsmob_translator (ly_car (p)));
       if (e)
index f6779595e28d6881cfd81065045e31a27cb48d54..eb4f883596e95da59a9d16a6a900c587cb420dc8 100644 (file)
@@ -138,7 +138,7 @@ Phrasing_slur_engraver::process_acknowledged_grobs ()
 
          if (Direction updown = to_dir (phrasing_slur_ev->get_property ("direction")))
            {
-             phrasing_slur->set_property ("direction", gh_int2scm (updown));
+             phrasing_slur->set_property ("direction", scm_int2num (updown));
            }
 
          start_phrasing_slurs.push (phrasing_slur);
index 4f15953c07be874a29ab49aca94277ba64352ff6..d92d9c631703299ef1f8ae76a1492e79f04375fa 100644 (file)
@@ -163,8 +163,8 @@ Piano_pedal_engraver::try_music (Music *m)
       for (Pedal_info*p = info_list_; p->name_; p ++)
        {
          String nm = p->name_ + String ("Event");
-         if (gh_equal_p (m->get_property ("name") ,
-                         scm_str2symbol (nm.to_str0())))
+         if (ly_equal_p (m->get_property ("name") ,
+                         scm_str2symbol(nm.to_str0())))
            {
              Direction d = to_dir (m->get_property ("span-direction"));
              p->event_drul_[d] = m;
@@ -291,7 +291,7 @@ Piano_pedal_engraver::create_text_grobs (Pedal_info *p, bool mixed)
        }
     }
       
-  if (gh_string_p (s))
+  if (ly_string_p (s))
     {
       String propname = String (p->name_) + "Pedal";
 
@@ -340,8 +340,8 @@ Piano_pedal_engraver::create_bracket_grobs (Pedal_info *p, bool mixed)
       if (!p->event_drul_[START])
        {
          SCM flare = p->bracket_->get_property ("bracket-flare");
-         p->bracket_->set_property ("bracket-flare", scm_cons (gh_car (flare),
-                                                               gh_double2scm (0)));
+         p->bracket_->set_property ("bracket-flare", scm_cons (ly_car (flare),
+                                                               scm_make_real (0)));
        }
 
       p->finished_bracket_ = p->bracket_;
@@ -364,7 +364,7 @@ Piano_pedal_engraver::create_bracket_grobs (Pedal_info *p, bool mixed)
       if (!p->finished_bracket_)
        {
          SCM flare = p->bracket_->get_property ("bracket-flare");
-         p->bracket_->set_property ("bracket-flare", scm_cons (gh_double2scm (0),gh_cdr (flare)));
+         p->bracket_->set_property ("bracket-flare", scm_cons (scm_make_real (0),ly_cdr (flare)));
        }
 
 
index e3a8d4119340e86d1cdbd523f666f1b2b9cbfa10..1223d3114e5c35a20e844e33a92efff4c1fee90a 100644 (file)
@@ -130,7 +130,7 @@ Piano_pedal_performer::try_music (Music* r)
       for (Pedal_info*p = info_alist_; p->name_; p ++)
        {
          String nm = p->name_ + String ("Event");
-         if (gh_equal_p (r->get_property ("name") ,
+         if (ly_equal_p (r->get_property ("name") ,
                          scm_str2symbol (nm.to_str0())))
            {
              Direction d = to_dir (r->get_property ("span-direction"));
index d2b8f8d3f22833e0a033c4e93619d59e32fc99aa..ae1cc13bc787b2a3e3b557b2ceb3100742053c0b 100644 (file)
@@ -22,7 +22,7 @@ void
 Pitch_squash_engraver::acknowledge_grob (Grob_info i)
 {
   SCM newpos = get_property ("squashedPosition");
-  if (gh_number_p (newpos)
+  if (ly_number_p (newpos)
       && Note_head::has_interface (i.grob_))
     {
       i.grob_->set_property ("staff-position", newpos);
index 1867a0b532b20514436e3f0622a82c85d4758326..58e2b0baa48892191113b148dd2cf40db99ed474 100644 (file)
@@ -303,7 +303,7 @@ LY_DEFINE (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 (gh_scm2int (octave), gh_scm2int (note), gh_scm2int (alter));
+  Pitch p (ly_scm2int (octave), ly_scm2int (note), ly_scm2int (alter));
   return p.smobbed_copy ();
 }
 
@@ -313,7 +313,7 @@ LY_DEFINE (pitch_steps, "ly:pitch-steps", 1, 0, 0,
 {
   Pitch *pp = unsmob_pitch (p);
   SCM_ASSERT_TYPE (pp, p, SCM_ARG1, __FUNCTION__, "Pitch");
-  return gh_int2scm (pp->steps ());
+  return scm_int2num (pp->steps ());
 }
 
 LY_DEFINE (pitch_octave, "ly:pitch-octave",
@@ -323,7 +323,7 @@ LY_DEFINE (pitch_octave, "ly:pitch-octave",
   Pitch *p = unsmob_pitch (pp);
   SCM_ASSERT_TYPE (p, pp, SCM_ARG1, __FUNCTION__, "Pitch");
   int q = p->get_octave ();
-  return gh_int2scm (q);
+  return scm_int2num (q);
 }
 
 LY_DEFINE (pitch_alteration, "ly:pitch-alteration",
@@ -334,7 +334,7 @@ LY_DEFINE (pitch_alteration, "ly:pitch-alteration",
   SCM_ASSERT_TYPE (p, pp, SCM_ARG1, __FUNCTION__, "Pitch");
   int q = p->get_alteration ();
 
-  return gh_int2scm (q);
+  return scm_int2num (q);
 }
 
 LY_DEFINE (pitch_notename, "ly:pitch-notename",
@@ -344,7 +344,7 @@ LY_DEFINE (pitch_notename, "ly:pitch-notename",
   Pitch *p = unsmob_pitch (pp);
   SCM_ASSERT_TYPE (p, pp, SCM_ARG1, __FUNCTION__, "Pitch");
   int q = p->get_notename ();
-  return gh_int2scm (q);
+  return scm_int2num (q);
 }
 
 LY_DEFINE (ly_pitch_quartertones,  "ly:pitch-quartertones",
@@ -354,7 +354,7 @@ LY_DEFINE (ly_pitch_quartertones,  "ly:pitch-quartertones",
   Pitch *p = unsmob_pitch (pp);
   SCM_ASSERT_TYPE (p, pp, SCM_ARG1, __FUNCTION__, "Pitch");
   int q = p->quartertone_pitch ();
-  return gh_int2scm (q);
+  return scm_int2num (q);
 }
 
 LY_DEFINE (ly_pitch_semitones,  "ly:pitch-semitones",
@@ -364,7 +364,7 @@ LY_DEFINE (ly_pitch_semitones,  "ly:pitch-semitones",
   Pitch *p = unsmob_pitch (pp);
   SCM_ASSERT_TYPE (p, pp, SCM_ARG1, __FUNCTION__, "Pitch");
   int q = p->semitone_pitch ();
-  return gh_int2scm (q);
+  return scm_int2num (q);
 }
 
 LY_DEFINE (pitch_less, "ly:pitch<?",
index d3007f84330b2b295db725e4d880ecbb7f44ce0f..18dbfeba72e60180b142be7e18b274316bf574f7 100644 (file)
@@ -21,7 +21,7 @@ void
 Property_iterator::process (Moment m)
 {
   SCM sym = get_music ()->get_property ("symbol");
-  if (gh_symbol_p (sym))
+  if (ly_symbol_p (sym))
     {
       SCM val = get_music ()->get_property ("value");
       bool ok= true;
@@ -82,7 +82,7 @@ check_grob (Music *mus, SCM sym)
 {
   if (!list_p)
     {
-      list_p = gh_eval_str ("list?");
+      list_p = scm_c_eval_string ("list?");
     }
   
   
index 0dc72104854192d25f9d84cf80fec49302307f0f..6ebbe296cd1814c91d8cb8313a9feda4aa56957d 100644 (file)
@@ -72,7 +72,7 @@ binsearch_scm_vector (SCM vec, SCM key, bool (*is_less)(SCM a,SCM b))
   {
     int cmp = (lo + hi) / 2;
 
-      SCM when = gh_caar (SCM_VECTOR_REF (vec, cmp));
+      SCM when = ly_caar (SCM_VECTOR_REF (vec, cmp));
       bool result =  (*is_less) (key, when);
       if (result)
           hi = cmp;
@@ -100,7 +100,7 @@ Quote_iterator::construct_children ()
   start_moment_ = now;
   event_vector_ = get_music ()->get_property ("quoted-events");
 
-  if (gh_vector_p (event_vector_))
+  if (ly_vector_p (event_vector_))
     {
       event_idx_ = binsearch_scm_vector (event_vector_, now.smobbed_copy (), &moment_less);
       end_idx_ = binsearch_scm_vector (event_vector_, stop.smobbed_copy (), &moment_less);
@@ -119,7 +119,7 @@ Moment
 Quote_iterator::pending_moment () const
 {
   SCM entry = SCM_VECTOR_REF (event_vector_, event_idx_);
-  return *unsmob_moment (gh_caar (entry)) - start_moment_;
+  return *unsmob_moment (ly_caar (entry)) - start_moment_;
 }
 
 
@@ -133,7 +133,7 @@ Quote_iterator::process (Moment m)
     {
       entry = SCM_VECTOR_REF (event_vector_, event_idx_);
 
-      Moment em = *unsmob_moment (gh_caar (entry));
+      Moment em = *unsmob_moment (ly_caar (entry));
 
       if (em > m)
        return ;
@@ -144,17 +144,17 @@ Quote_iterator::process (Moment m)
       event_idx_++;
     }
 
-  if (gh_pair_p (entry))
+  if (ly_pair_p (entry))
     {
-      Pitch * quote_pitch = unsmob_pitch (gh_cdar (entry));
+      Pitch * quote_pitch = unsmob_pitch (ly_cdar (entry));
       Pitch * me_pitch = unsmob_pitch (get_outlet ()->get_property ("instrumentTransposition"));
       
-      for (SCM s = gh_cdr (entry); gh_pair_p (s); s = gh_cdr (s))
+      for (SCM s = ly_cdr (entry); ly_pair_p (s); s = ly_cdr (s))
        {
-         SCM ev_acc = gh_car (s);
+         SCM ev_acc = ly_car (s);
 
 
-         Music * mus = unsmob_music (gh_car (ev_acc));
+         Music * mus = unsmob_music (ly_car (ev_acc));
          if (mus)
            {
              if (quote_pitch || me_pitch)
@@ -169,7 +169,7 @@ Quote_iterator::process (Moment m)
 
                  SCM copy = ly_deep_mus_copy (mus->self_scm ());
                  mus = unsmob_music (copy);
-                 transposed_musics_ = gh_cons (copy, transposed_musics_);
+                 transposed_musics_ = scm_cons (copy, transposed_musics_);
                  
                  mus->transpose (diff);
                }
index 16dce1646867eb259ca67fb9d1114ade84977d81..6ccd234e62635a3bd627cda799b6bd6853bf7bb1 100644 (file)
@@ -52,14 +52,14 @@ Recording_group_engraver::start_translation_timestep ()
 void
 Recording_group_engraver::start ()
 {
-  if (!gh_pair_p (accumulator_))
-    accumulator_ = gh_cons (SCM_EOL, SCM_EOL);
-  if (!gh_pair_p (gh_car (accumulator_)))
+  if (!ly_pair_p (accumulator_))
+    accumulator_ = scm_cons (SCM_EOL, SCM_EOL);
+  if (!ly_pair_p (ly_car (accumulator_)))
     {
       /*
        Need to store transposition for every moment; transposition changes during pieces.
        */
-      scm_set_car_x (accumulator_, gh_cons (gh_cons (now_mom ().smobbed_copy (),
+      scm_set_car_x (accumulator_, scm_cons (scm_cons (now_mom ().smobbed_copy (),
                                                     get_property ("instrumentTransposition")),
                                                     SCM_EOL));
     }
@@ -69,7 +69,7 @@ void
 Recording_group_engraver::stop_translation_timestep ()
 {
   Engraver_group_engraver::stop_translation_timestep ();
-  scm_set_cdr_x (accumulator_, gh_cons (gh_car (accumulator_), gh_cdr (accumulator_)));
+  scm_set_cdr_x (accumulator_, scm_cons (ly_car (accumulator_), ly_cdr (accumulator_)));
 
   scm_set_car_x (accumulator_, SCM_EOL);
 }
@@ -80,8 +80,8 @@ Recording_group_engraver::finalize ()
   Engraver_group_engraver::finalize ();
   SCM proc = get_property ("recordEventSequence");
 
-  if (gh_procedure_p (proc))
-    scm_call_2  (proc, daddy_context_->self_scm (), gh_cdr (accumulator_));
+  if (ly_procedure_p (proc))
+    scm_call_2  (proc, daddy_context_->self_scm (), ly_cdr (accumulator_));
 
   accumulator_ = SCM_EOL;
 }
@@ -91,11 +91,11 @@ Recording_group_engraver::try_music (Music  *m)
 {
   bool retval = Translator_group::try_music (m);
 
-  SCM seq = gh_cdar (accumulator_);
-  seq = gh_cons (gh_cons  (m->self_scm (), gh_bool2scm (retval)),
+  SCM seq = ly_cdar (accumulator_);
+  seq = scm_cons (scm_cons  (m->self_scm (), ly_bool2scm (retval)),
                 seq);
   
-  scm_set_cdr_x  (gh_car (accumulator_), seq);
+  scm_set_cdr_x  (ly_car (accumulator_), seq);
 
   return retval;
 }
index 0b3752eecdc79f7c278741303abb1f8ef689f966..134017428bddc4627a6241f18bab27d612263daf 100644 (file)
@@ -71,14 +71,14 @@ Repeat_acknowledge_engraver::process_music ()
   bool start = false;
   bool end = false;
   bool volta_found = false;
-  while (gh_pair_p (cs))
+  while (ly_pair_p (cs))
     {
       SCM command = ly_car (cs);
       if (command == ly_symbol2scm ("start-repeat"))
        start = true;
       else if (command == ly_symbol2scm ("end-repeat"))
        end = true;
-      else if (gh_pair_p (command) && ly_car (command) == ly_symbol2scm ("volta"))
+      else if (ly_pair_p (command) && ly_car (command) == ly_symbol2scm ("volta"))
        volta_found = true;
       cs = ly_cdr (cs);      
     }
@@ -100,9 +100,9 @@ Repeat_acknowledge_engraver::process_music ()
    */
   SCM wb = get_property ("whichBar");
   SCM db  = get_property ("defaultBarType");
-  if (!gh_string_p (wb) || gh_equal_p (db, wb))
+  if (!ly_string_p (wb) || ly_equal_p (db, wb))
     {
-      if (s != "" || (volta_found && !gh_string_p (wb)))
+      if (s != "" || (volta_found && !ly_string_p (wb)))
        {
          daddy_context_->set_property ("whichBar", scm_makfrom0str (s.to_str0 ()));
        }
index 37bcfd3de9e5861dbdb4d2c79e0b138ad20625d1..7aa77605fc1381195314e343f33d20d10d51c0d8 100644 (file)
@@ -42,7 +42,7 @@ Repeated_music::to_relative_octave (Pitch p)
        {
          lily_1_8_compatibility_used = true; 
 
-         for (SCM s = alternatives (); gh_pair_p (s);  s = ly_cdr (s))
+         for (SCM s = alternatives (); ly_pair_p (s);  s = ly_cdr (s))
            unsmob_music (ly_car (s))->to_relative_octave (p);
        }     
 
@@ -68,7 +68,7 @@ Repeated_music::alternatives_get_length (bool fold) const
   int done =0;
 
   SCM p = alternatives ();
-  while (gh_pair_p (p) && done < repeat_count ())
+  while (ly_pair_p (p) && done < repeat_count ())
     {
       m = m + unsmob_music (ly_car (p))->get_length ();
       done ++;
@@ -90,7 +90,7 @@ Repeated_music::alternatives_volta_get_length () const
 
   Moment m;
   SCM p = alternatives ();
-  while (gh_pair_p (p))
+  while (ly_pair_p (p))
     {
       m = m + unsmob_music (ly_car (p))->get_length ();
       p = ly_cdr (p);
@@ -116,7 +116,7 @@ Repeated_music::body_get_length () const
 int
 Repeated_music::repeat_count () const
 {
-  return gh_scm2int (get_property ("repeat-count"));
+  return ly_scm2int (get_property ("repeat-count"));
 }
 
 
index c815db634efbd875f3576f7969c4a969f54b4d76..37396176380f047ed6e8eeefdee77a037c75dbd1 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) gh_scm2int (axis);
+  Axis a = (Axis) ly_scm2int (axis);
   assert (a == Y_AXIS);
 
   Grob * rc = unsmob_grob (them->get_property ("rest-collision"));
@@ -37,7 +37,7 @@ Rest_collision::force_shift_callback (SCM element_smob, SCM axis)
       do_shift (rc);
     }
   
-  return gh_double2scm (0.0);
+  return scm_make_real (0.0);
 }
 
 
@@ -70,8 +70,8 @@ head_characteristic (Grob * col)
   if (!s)
     return SCM_BOOL_F;
   else
-    return gh_cons (s->get_property ("duration-log"),
-                   gh_int2scm (Rhythmic_head::dot_count (s)));
+    return scm_cons (s->get_property ("duration-log"),
+                   scm_int2num (Rhythmic_head::dot_count (s)));
 }
 
 /*
@@ -87,7 +87,7 @@ Rest_collision::do_shift (Grob *me)
   Link_array<Grob> rests;
   Link_array<Grob> notes;
 
-  for (SCM s = elts; gh_pair_p (s); s = ly_cdr (s))
+  for (SCM s = elts; ly_pair_p (s); s = ly_cdr (s))
     {
       Grob * e = unsmob_grob (ly_car (s));
       if (unsmob_grob (e->get_property ("rest")))
index 1e0782331c011e8f371a6d8dbd05945b2f35b8e4..83c56cccf4bad3fa87a40f3883615fa5fd7b375d 100644 (file)
@@ -70,7 +70,7 @@ Rest_engraver::process_music ()
       int durlog  = unsmob_duration (rest_req_->get_property ("duration"))-> duration_log ();
       
       rest_->set_property ("duration-log",
-                                 gh_int2scm (durlog));
+                                 scm_int2num (durlog));
 
       int dots =unsmob_duration (rest_req_->get_property ("duration"))->dot_count ();
       
@@ -80,7 +80,7 @@ Rest_engraver::process_music ()
 
          Rhythmic_head::set_dots (rest_, dot_);
          dot_->set_parent (rest_, Y_AXIS);
-         dot_->set_property ("dot-count", gh_int2scm (dots));
+         dot_->set_property ("dot-count", scm_int2num (dots));
          announce_grob (dot_, SCM_EOL);
        }
 
@@ -94,10 +94,10 @@ Rest_engraver::process_music ()
        {
          int pos= p->steps ();
          SCM c0 = get_property ("middleCPosition");
-         if (gh_number_p (c0))
-           pos += gh_scm2int (c0);
+         if (ly_number_p (c0))
+           pos += ly_scm2int (c0);
          
-         rest_->set_property ("staff-position", gh_int2scm (pos));
+         rest_->set_property ("staff-position", scm_int2num (pos));
        }
       
       announce_grob (rest_, rest_req_->self_scm ());
index 1bec02a6faca455f9210c3b195279be23cd72f52..1e57bd8092655c47aba90063a3c2d703394ad822 100644 (file)
@@ -21,7 +21,7 @@ SCM
 Rest::after_line_breaking (SCM smob)
 {
   Grob *me = unsmob_grob (smob);
-  int bt = gh_scm2int (me->get_property ("duration-log"));
+  int bt = ly_scm2int (me->get_property ("duration-log"));
   int lc = Staff_symbol_referencer::line_count (me);
   Real ss = Staff_symbol_referencer::staff_space (me);
   if (lc % 2)
@@ -40,12 +40,12 @@ Rest::after_line_breaking (SCM smob)
   if (d && bt > 4) // UGH.
     {
       d->set_property ("staff-position",
-                           gh_int2scm ((bt == 7) ? 4 : 3));
+                           scm_int2num ((bt == 7) ? 4 : 3));
     }
   if (d && bt >= -1 && bt <= 1) // UGH again.
     {
       d->set_property ("staff-position",
-                           gh_int2scm ((bt == 0) ? -1 : 1));
+                           scm_int2num ((bt == 0) ? -1 : 1));
     }
   return SCM_UNSPECIFIED;
 }
@@ -120,14 +120,14 @@ Rest::brew_internal_stencil (SCM smob)
   Grob* me = unsmob_grob (smob);
 
   SCM balltype_scm = me->get_property ("duration-log");
-  if (!gh_number_p (balltype_scm))
+  if (!ly_number_p (balltype_scm))
     return Stencil ().smobbed_copy ();
 
-  int balltype = gh_scm2int (balltype_scm);
+  int balltype = ly_scm2int (balltype_scm);
   
   String style; 
   SCM style_scm = me->get_property ("style");
-  if (gh_symbol_p (style_scm))
+  if (ly_symbol_p (style_scm))
     style = ly_scm2string (scm_symbol_to_string (style_scm));
 
   Font_metric *fm = Font_interface::get_default_font (me);
@@ -151,7 +151,7 @@ MAKE_SCHEME_CALLBACK (Rest,extent_callback,2);
 SCM
 Rest::extent_callback (SCM smob, SCM ax)
 {
-  Axis a = (Axis) gh_scm2int (ax);
+  Axis a = (Axis) ly_scm2int (ax);
   SCM m = brew_internal_stencil (smob);
   return ly_interval2scm (unsmob_stencil (m)->extent (a));
 }
@@ -161,14 +161,14 @@ SCM
 Rest::polyphonic_offset_callback (SCM smob, SCM)
 {
   Grob* me = unsmob_grob (smob);
-  if (gh_number_p (me->get_property ("staff-position")))
-    return gh_double2scm (0);
+  if (ly_number_p (me->get_property ("staff-position")))
+    return scm_make_real (0);
 
   Direction d = get_grob_direction (me);
   Real off = 2* d ;
   if (off)
     off *= Staff_symbol_referencer::staff_space (me);
-  return gh_double2scm (off);
+  return scm_make_real (off);
 }
 
 ADD_INTERFACE (Rest,"rest-interface",
index 5e4b5385b82e4612547a80673570db9824a3bb7a..282c567fa602cf767feced8ab6aad9e894af9831 100644 (file)
@@ -87,7 +87,7 @@ Rhythmic_column_engraver::process_acknowledged_grobs ()
          announce_grob (note_column_, rheads_[0]->self_scm ());
 
          spacing_ = make_item ("NoteSpacing");
-         spacing_->set_property ("left-items", gh_cons (note_column_->self_scm (), SCM_EOL));
+         spacing_->set_property ("left-items", scm_cons (note_column_->self_scm (), SCM_EOL));
 
 
          announce_grob (spacing_, SCM_EOL);
index 02ed3bd664bf15f27611cdd833aebf537d7f29a5..71f91ae36b9397ab35ef41ef5e848a5e4aaea415 100644 (file)
@@ -32,7 +32,7 @@ int
 Rhythmic_head::dot_count (Grob*me) 
 {
   return get_dots (me)
-    ? gh_scm2int (get_dots (me)->get_property ("dot-count")) : 0;
+    ? ly_scm2int (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 gh_number_p (s) ? gh_scm2int (s) : 0;
+  return ly_number_p (s) ? ly_scm2int (s) : 0;
 }
 
 ADD_INTERFACE (Rhythmic_head,"rhythmic-head-interface",
index f916996c4b4e183bdcd0015f1bb1254fa8660212..eee3027ec467f417f877641e32c1ce4f17985dd0 100644 (file)
@@ -26,10 +26,10 @@ Modified_font_metric::Modified_font_metric (String coding, Font_metric* m, Real
   
   SCM desc = m->description_;
 
-  Real total_mag = magn * gh_scm2double (ly_cdr (desc));
+  Real total_mag = magn * ly_scm2double (ly_cdr (desc));
   assert (total_mag);
   
-  description_ = gh_cons (ly_car (desc), gh_double2scm (total_mag));
+  description_ = scm_cons (ly_car (desc), scm_make_real (total_mag));
   orig_ = m;
 
   if (coding_scheme_ != "TeX"
@@ -39,7 +39,7 @@ Modified_font_metric::Modified_font_metric (String coding, Font_metric* m, Real
       coding_vector_ = scm_call_1 (ly_scheme_function ("get-coding-vector"),
                                   scm_makfrom0str (coding_scheme_.to_str0 ()));
 
-      if (!gh_vector_p (coding_vector_))
+      if (!ly_vector_p (coding_vector_))
        {
          programming_error ("get-coding-vector  should return vector");
          coding_vector_ = scm_c_make_vector (256, ly_symbol2scm (".notdef"));
index bc0874392ffa33ae531b014428e6ed623fcadc64..c98e87c81614143754d17f008379e35ebff9825f 100644 (file)
@@ -32,7 +32,7 @@ Scheme_hash_table::Scheme_hash_table ()
 {
   hash_tab_ = SCM_EOL;
   smobify_self ();
-  hash_tab_ = scm_make_vector (gh_int2scm (119), SCM_EOL);
+  hash_tab_ = scm_make_vector (scm_int2num (119), SCM_EOL);
   elt_count_ = 0;
 }
 
@@ -44,7 +44,7 @@ Scheme_hash_table::Scheme_hash_table (Scheme_hash_table const &src)
   elt_count_ = 0;
   smobify_self ();
 
-  hash_tab_ = scm_make_vector (gh_int2scm (src.elt_count_ >? 11 ), SCM_EOL);  
+  hash_tab_ = scm_make_vector (scm_int2num (src.elt_count_ >? 11 ), SCM_EOL);  
   elt_count_ = copy_scm_hashes (hash_tab_, src.hash_tab_);
 }
 
@@ -54,7 +54,7 @@ Scheme_hash_table::operator = (Scheme_hash_table const & src)
   if (&src == this)
     return;
   
-  hash_tab_ = scm_make_vector (gh_int2scm (src.elt_count_ >? 11), SCM_EOL);  
+  hash_tab_ = scm_make_vector (scm_int2num (src.elt_count_ >? 11), SCM_EOL);  
   elt_count_ = copy_scm_hashes (hash_tab_, src.hash_tab_);
 }
 
@@ -101,21 +101,21 @@ Scheme_hash_table::contains (SCM k) const
 void
 Scheme_hash_table::set (SCM k, SCM v)
 {
-  assert (gh_symbol_p (k));
+  assert (ly_symbol_p (k));
   SCM handle = scm_hashq_create_handle_x (hash_tab_, k, SCM_UNDEFINED);
   if (ly_cdr (handle) == SCM_UNDEFINED)
     {
       elt_count_++;
     }
   
-  gh_set_cdr_x (handle, v);
+  scm_set_cdr_x (handle, v);
 
   /*
     resize if getting too large.
   */
   if (elt_count_ > 2 * SCM_VECTOR_LENGTH (hash_tab_))
     {
-      SCM nh = scm_make_vector (gh_int2scm (3* elt_count_+1), SCM_EOL);
+      SCM nh = scm_make_vector (scm_int2num (3* elt_count_+1), SCM_EOL);
       elt_count_ = copy_scm_hashes (nh, hash_tab_);
       hash_tab_ = nh;
     }
@@ -150,7 +150,7 @@ Scheme_hash_table::to_alist () const
 {
   SCM l = SCM_EOL;
   for (int i = SCM_VECTOR_LENGTH (hash_tab_); i--;)
-    for (SCM s = scm_vector_ref (hash_tab_, gh_int2scm (i)); ly_pair_p (s); s = ly_cdr (s))
+    for (SCM s = scm_vector_ref (hash_tab_, scm_int2num (i)); ly_pair_p (s); s = ly_cdr (s))
       {
        l = scm_acons (ly_caar (s), ly_cdar (s), l);
       }
index aac158ba9202806c64a5bbe3bfb9a717cc8491e0..a3d87f7e7aa84d52773eb4387847eaeee53f438d 100644 (file)
@@ -114,7 +114,7 @@ LY_DEFINE (ly_set_option, "ly:set-option", 1, 1, 0, (SCM var, SCM val),
     }
   else if (var == ly_symbol2scm ("testing-level"))
     {
-     testing_level_global = gh_scm2int (val); 
+     testing_level_global = ly_scm2int (val); 
     }
   else if (var == ly_symbol2scm ("parse-protect" ))
     {
@@ -161,15 +161,15 @@ LY_DEFINE (ly_get_option, "ly:get-option", 1, 0, 0, (SCM var),
 {
   if (var == ly_symbol2scm ("old-relative-used"))
     {
-      return gh_bool2scm (lily_1_8_compatibility_used);
+      return ly_bool2scm (lily_1_8_compatibility_used);
     }
   if (var == ly_symbol2scm ("old-relative"))
     {
-      return gh_bool2scm (lily_1_8_relative);
+      return ly_bool2scm (lily_1_8_relative);
     }
   if (var == ly_symbol2scm ("verbose"))
     {
-      return gh_bool2scm (verbose_global_b);
+      return ly_bool2scm (verbose_global_b);
     }  
   else
     {
index 837fdf5f9e35371e9761a9bcdd0c007f0daac77e..14f7f45b65421dbcddb227299bc4dcf71c7d4668 100644 (file)
@@ -268,19 +268,19 @@ Score_engraver::try_music (Music*r)
       gotcha = true;
 
       SCM pen = command_column_->get_property ("penalty");
-      Real total_penalty = gh_number_p (pen)
-       ? gh_scm2double (pen)
+      Real total_penalty = ly_number_p (pen)
+       ? ly_scm2double (pen)
        : 0.0;
 
       SCM rpen = r->get_property ("penalty");
-      if (gh_number_p (rpen))
-       total_penalty +=  gh_scm2double (rpen);
+      if (ly_number_p (rpen))
+       total_penalty +=  ly_scm2double (rpen);
          
       if (total_penalty > 10000.0) //  ugh. arbitrary.
        forbid_breaks ();
 
       command_column_->set_property ("penalty",
-                                         gh_double2scm (total_penalty));
+                                         scm_make_real (total_penalty));
     }
   return gotcha;
 }
index c43822ac2fb9f458a235457e4827b8d3592a4ac6..622c2b8b151b6a73c517b403498ec716366624d6 100644 (file)
@@ -155,7 +155,7 @@ LY_DEFINE (ly_format_output, "ly:format-output",
 {
   Global_context *g = dynamic_cast<Global_context*> (unsmob_context (context));
   SCM_ASSERT_TYPE (g, context, SCM_ARG1, __FUNCTION__, "Global context");
-  SCM_ASSERT_TYPE (gh_string_p (outname), outname, SCM_ARG2, __FUNCTION__, "output filename");
+  SCM_ASSERT_TYPE (ly_string_p (outname), outname, SCM_ARG2, __FUNCTION__, "output filename");
 
   Music_output *output = g->get_output ();
   progress_indication ("\n");
index 5121d5e77fc380bd31c117c927e56035f5970282..5942577323ec14a97c6ce668adf7ac5f570697d9 100644 (file)
@@ -15,7 +15,7 @@ void
 Script_column::add_staff_sided (Grob *me, Item *i)
 {
   SCM p = i->get_property ("script-priority");
-  if (!gh_number_p (p))
+  if (!ly_number_p (p))
     return;
 
   Pointer_group_interface::add_grob (me, ly_symbol2scm ("scripts"),i);
@@ -33,7 +33,7 @@ LY_DEFINE (grob_script_priority_less, "ly:grob-script-priority-less",
   SCM p1 = i1->get_property ("script-priority");
   SCM p2 = i2->get_property ("script-priority");
 
-  return gh_scm2int (p1) < gh_scm2int (p2) ? SCM_BOOL_T : SCM_BOOL_F;
+  return ly_scm2int (p1) < ly_scm2int (p2) ? SCM_BOOL_T : SCM_BOOL_F;
 }
 
 MAKE_SCHEME_CALLBACK (Script_column, before_line_breaking, 1);
@@ -44,9 +44,9 @@ Script_column::before_line_breaking (SCM smob)
   Drul_array<SCM> scripts (SCM_EOL, SCM_EOL);
   Link_array<Grob> staff_sided;
   
-  for (SCM s = me->get_property ("scripts"); gh_pair_p (s); s = gh_cdr (s))
+  for (SCM s = me->get_property ("scripts"); ly_pair_p (s); s = ly_cdr (s))
     {
-      Grob *sc = unsmob_grob (gh_car (s));
+      Grob *sc = unsmob_grob (ly_car (s));
 
       if (!sc->has_offset_callback (Side_position_interface::aligned_side_proc,
                                    X_AXIS))
@@ -61,7 +61,7 @@ Script_column::before_line_breaking (SCM smob)
        {
          programming_error ( "No direction for script?");
          d = DOWN;
-         g->set_property ("direction", gh_int2scm (d));
+         g->set_property ("direction", scm_int2num (d));
        }
       
       scripts[d] = scm_cons (g->self_scm (), scripts[d]);
@@ -74,9 +74,9 @@ Script_column::before_line_breaking (SCM smob)
       ss = scm_stable_sort_x (ss, grob_script_priority_less_proc);
       
       Grob * last = 0;
-      for (SCM s = ss; gh_pair_p (s); s = gh_cdr (s))
+      for (SCM s = ss; ly_pair_p (s); s = ly_cdr (s))
        {
-         Grob *g = unsmob_grob (gh_car (s));
+         Grob *g = unsmob_grob (ly_car (s));
          if (last)
            Side_position_interface::add_support (g,last);
          
index 542f59fcc9e3d37875386275c5815258af83134c..918f4f89019d4d27c1cfd866960dee079796a60d 100644 (file)
@@ -50,7 +50,7 @@ Script_engraver::try_music (Music *r)
        This is necessary for part-combining.
        */
       for (int j = 0; j < scripts_.size (); j++)
-       if (gh_equal_p (scripts_[j]. event_->get_property ("articulation-type"),
+       if (ly_equal_p (scripts_[j]. event_->get_property ("articulation-type"),
                        r->get_property ("articulation-type")
                        ))
          return true;
@@ -70,9 +70,9 @@ copy_property (Grob * g , SCM sym, SCM alist)
   if (g->internal_get_property (sym) == SCM_EOL)
     {
       SCM entry = scm_assoc (sym,alist);
-      if (gh_pair_p (entry))
+      if (ly_pair_p (entry))
        {
-         g->internal_set_property (sym, gh_cdr (entry));
+         g->internal_set_property (sym, ly_cdr (entry));
        }
     }
 }
@@ -99,7 +99,7 @@ void make_script_from_event (Grob *p,
       return  ;
     }
 
-  art = gh_cdr (art);
+  art = ly_cdr (art);
   
   *descr = art;  
 
@@ -110,8 +110,8 @@ void make_script_from_event (Grob *p,
 
   int prio =0;
   SCM sprio = scm_assoc (ly_symbol2scm ("script-priority"), art);
-  if (gh_pair_p (sprio))
-    prio = gh_scm2int (gh_cdr (sprio));
+  if (ly_pair_p (sprio))
+    prio = ly_scm2int (ly_cdr (sprio));
 
 
   /*
@@ -122,7 +122,7 @@ void make_script_from_event (Grob *p,
   prio += index;
 
   Side_position_interface::set_axis (p, Y_AXIS);
-  p->set_property ("script-priority", gh_int2scm (prio));
+  p->set_property ("script-priority", scm_int2num (prio));
 }
 
 void
@@ -219,7 +219,7 @@ Script_engraver::stop_translation_timestep ()
       Grob * sc = scripts_[i].script_;
 
       SCM follow = scm_assoc (ly_symbol2scm ("follow-into-staff"), scripts_[i].description_);
-      if (gh_pair_p (follow) && to_boolean (gh_cdr (follow)))
+      if (ly_pair_p (follow) && to_boolean (ly_cdr (follow)))
        {
          sc->add_offset_callback (Side_position_interface::quantised_position_proc, Y_AXIS);
          sc->set_property ("staff-padding", SCM_EOL);
index a63c1d2011b5628f4e3f07e55cd91814bc5ed972..95af0e32dcb2fabf63092557a54e7a8025852980 100644 (file)
@@ -23,14 +23,14 @@ Stencil
 Script_interface::get_stencil (Grob * me, Direction d)
 {
   SCM s = me->get_property ("script-stencil");
-  assert (gh_pair_p (s));
+  assert (ly_pair_p (s));
 
   SCM key = ly_car (s);
   if (key == ly_symbol2scm ("feta"))
     {
       SCM name_entry = ly_cdr (s);
 
-      SCM str = (gh_pair_p (name_entry)) ? index_get_cell (name_entry, d) :  name_entry;
+      SCM str = (ly_pair_p (name_entry)) ? index_get_cell (name_entry, d) :  name_entry;
       return Font_interface::get_default_font (me)->find_by_name ("scripts-" +
                                                                  ly_scm2string (str));
     }
index 7ef7b6f52ab7ec7411e5a5a91c220107fbcfe821..386f5a662673dff5438aab6200501187fd5ec5f0 100644 (file)
@@ -9,11 +9,11 @@ SCM
 Self_alignment_interface::centered_on_parent (SCM element_smob, SCM axis)
 {
   Grob *me = unsmob_grob (element_smob);
-  Axis a = (Axis) gh_scm2int (axis);
+  Axis a = (Axis) ly_scm2int (axis);
   Grob *him = me->get_parent (a);
   Interval he = him->extent (him,a);
   
-  return  gh_double2scm (he.is_empty () ? 0.0 : he.center ());
+  return  scm_make_real (he.is_empty () ? 0.0 : he.center ());
 }
 
 MAKE_SCHEME_CALLBACK (Self_alignment_interface,aligned_on_parent,2);
@@ -21,19 +21,19 @@ SCM
 Self_alignment_interface::aligned_on_parent (SCM element_smob, SCM axis)
 {
   Grob *me = unsmob_grob (element_smob);
-  Axis a = (Axis) gh_scm2int (axis);
+  Axis a = (Axis) ly_scm2int (axis);
   Grob *him = me->get_parent (a);
   Interval he = him->extent (him,a);
   
   SCM sym= (a == X_AXIS) ? ly_symbol2scm ("self-alignment-X"): ly_symbol2scm ("self-alignment-Y");
   SCM align_prop (me->internal_get_property (sym));
 
-  if (!gh_number_p (align_prop))
-    return gh_int2scm (0);
+  if (!ly_number_p (align_prop))
+    return scm_int2num (0);
 
   Real x = 0.0;
 
-  Real align = gh_scm2double (align_prop);
+  Real align = ly_scm2double (align_prop);
       
   Interval ext (me->extent (me,a));
   if (ext.is_empty ())
@@ -49,7 +49,7 @@ Self_alignment_interface::aligned_on_parent (SCM element_smob, SCM axis)
       x += he.linear_combination (align);
     }
 
-  return gh_double2scm (x);
+  return scm_make_real (x);
 }
 
 /*
@@ -61,11 +61,11 @@ Self_alignment_interface::centered_on_other_axis_parent (SCM element_smob,
                                                         SCM axis)
 {
   Grob *me = unsmob_grob (element_smob);
-  Axis a = (Axis) gh_scm2int (axis);
+  Axis a = (Axis) ly_scm2int (axis);
   Grob *him = me->get_parent (other_axis (a));
   Interval he = him->extent (him,a);
   
-  return  gh_double2scm (he.is_empty () ? 0.0 : he.center ());
+  return  scm_make_real (he.is_empty () ? 0.0 : he.center ());
 }
 
 
@@ -81,26 +81,26 @@ SCM
 Self_alignment_interface::aligned_on_self (SCM element_smob, SCM axis)
 {
   Grob *me = unsmob_grob (element_smob);
-  Axis a = (Axis) gh_scm2int (axis);
+  Axis a = (Axis) ly_scm2int (axis);
 
   SCM sym= (a == X_AXIS) ? ly_symbol2scm ("self-alignment-X"): ly_symbol2scm ("self-alignment-Y");
   
   SCM align (me->internal_get_property (sym));
-  if (gh_number_p (align))
+  if (ly_number_p (align))
     {
       Interval ext (me->extent (me,a));
 
       if (ext.is_empty ())
        {
          programming_error ("I'm empty. Can't align on self");
-         return gh_double2scm (0.0);
+         return scm_make_real (0.0);
        }
       else
        {
-         return gh_double2scm (- ext.linear_combination (gh_scm2double (align)));
+         return scm_make_real (- ext.linear_combination (ly_scm2double (align)));
        }
     }
-  return gh_double2scm (0.0);
+  return scm_make_real (0.0);
 }
 
 
index a6100f17a1c51e66e6ebb8f527d17d5d125c6804..e9b27a1eb06ee70100edae28278cb50b09edca92 100644 (file)
@@ -28,7 +28,7 @@ Separating_group_spanner::find_rods (Item * r, SCM next, Real padding)
     return; 
 
 
-  for (; gh_pair_p (next); next = ly_cdr (next))
+  for (; ly_pair_p (next); next = ly_cdr (next))
     {
       Item *l = dynamic_cast<Item*> (unsmob_grob (ly_car ( next)));
       Item *lb = l->find_prebroken_piece (RIGHT);
@@ -83,7 +83,7 @@ Separating_group_spanner::set_spacing_rods (SCM smob)
    */
   Real padding = robust_scm2double (me->get_property ("padding"), 0.1);
   
-  for (SCM s = me->get_property ("elements"); gh_pair_p (s) && gh_pair_p (ly_cdr (s)); s = ly_cdr (s))
+  for (SCM s = me->get_property ("elements"); ly_pair_p (s) && ly_pair_p (ly_cdr (s)); s = ly_cdr (s))
     {
       /*
        Order of elements is reversed!
index a2665fad29db7ce8ad90e0627edee950ab747b39..ebeb9429ca2da4e20c237f8c14d50f49a5a84930 100644 (file)
@@ -149,7 +149,7 @@ Separating_line_group_engraver::acknowledge_grob (Grob_info i)
        {
          Item *it  = make_item ("StaffSpacing");
          current_spacings_.staff_spacing_ = it;
-         it->set_property ("left-items", gh_cons (break_item_->self_scm (), SCM_EOL));
+         it->set_property ("left-items", scm_cons (break_item_->self_scm (), SCM_EOL));
          
          announce_grob (it, SCM_EOL);
 
@@ -164,7 +164,7 @@ Separating_line_group_engraver::acknowledge_grob (Grob_info i)
          else if (last_spacings_.staff_spacing_)
            {
              last_spacings_.staff_spacing_->set_property ("right-items",
-                                                               gh_cons (break_item_->self_scm (), SCM_EOL));
+                                                               scm_cons (break_item_->self_scm (), SCM_EOL));
            }
        }
     }
index c66abca75c933be3764cd1f349bb13628ed5a0e1..ab879f067ef70e76f3b2fd14fb6b4344fcf8ca2c 100644 (file)
@@ -40,7 +40,7 @@ Separation_item::conditional_width (Grob * me, Grob * left)
   Paper_column * pc = item->get_column ();
   
   
-  for (SCM s =  me->get_property ("conditional-elements"); gh_pair_p (s); s = ly_cdr (s))
+  for (SCM s =  me->get_property ("conditional-elements"); ly_pair_p (s); s = ly_cdr (s))
     {
       SCM elt = ly_car (s);
       if (!unsmob_grob (elt))
@@ -84,7 +84,7 @@ Separation_item::width (Grob *me)
   Paper_column * pc = item->get_column ();
   Interval w;
   
-  for (SCM s =  me->get_property ("elements"); gh_pair_p (s); s = ly_cdr (s))
+  for (SCM s =  me->get_property ("elements"); ly_pair_p (s); s = ly_cdr (s))
     {
       SCM elt = ly_car (s);
       if (!unsmob_grob (elt))
@@ -140,11 +140,11 @@ Separation_item::extremal_break_aligned_grob (Grob *separation_item, Direction d
   last_ext->set_empty ();
   Grob *last_grob = 0;
   for (SCM s = separation_item->get_property ("elements");
-       gh_pair_p (s); s = gh_cdr (s))
+       ly_pair_p (s); s = ly_cdr (s))
     {
-      Grob * break_item = unsmob_grob (gh_car (s));
+      Grob * break_item = unsmob_grob (ly_car (s));
       
-      if (!gh_symbol_p (break_item->get_property ("break-align-symbol")))
+      if (!ly_symbol_p (break_item->get_property ("break-align-symbol")))
        continue;
 
       Interval ext = break_item->extent (col, X_AXIS);
index 9c88c4e88aa49e175da2763599e0aae5b4c2db27..2e7deb71d358f97ab7ddc6663df47befc397a6a6 100644 (file)
@@ -23,7 +23,7 @@
   Invariant for the data structure.
 
 
-  if (gh_pair_p (cursor_))
+  if (ly_pair_p (cursor_))
     iter_->music_ == unsmob_music (ly_car (cursor_))
   else
     iter_ == 0;
@@ -85,7 +85,7 @@ create_grace_fixup_list (SCM cursor)
   Grace_fixup *head = 0;
   Grace_fixup **tail = &head;
 
-  for (; gh_pair_p (cursor); cursor = ly_cdr (cursor))
+  for (; ly_pair_p (cursor); cursor = ly_cdr (cursor))
     {
       Music *mus = unsmob_music (ly_car (cursor));
       Moment s = mus->start_mom ();
@@ -123,7 +123,7 @@ Sequential_iterator::construct_children ()
   cursor_ = get_music_list ();
 
   iter_ = 0;
-  if (gh_pair_p (cursor_))
+  if (ly_pair_p (cursor_))
     {
       Music *m = unsmob_music (ly_car (cursor_));
       iter_ = unsmob_iterator (get_iterator (m));
@@ -188,7 +188,7 @@ Sequential_iterator::next_element (bool)
   cursor_ = ly_cdr (cursor_);
 
   iter_->quit ();
-  if (gh_pair_p (cursor_))
+  if (ly_pair_p (cursor_))
     iter_ = unsmob_iterator (get_iterator (unsmob_music (ly_car (cursor_))));
   else
     iter_ = 0;
index e4dfd913a1d373f07cadb15266aadeba75a2a6e9..c517492b84f0cc0901be81d3fbf598cd700dc061 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) gh_scm2int (axis);
+  Axis a = (Axis) ly_scm2int (axis);
 
   return general_side_position (me, a, true);
 }
@@ -73,7 +73,7 @@ Side_position_interface::general_side_position (Grob * me, Axis a, bool use_exte
   Grob * st = Staff_symbol_referencer::get_staff_symbol (me);
   bool include_staff = (st
                        && a == Y_AXIS
-                       && gh_number_p (me->get_property ("staff-padding")));
+                       && ly_number_p (me->get_property ("staff-padding")));
 
   Interval dim;
   if (include_staff)
@@ -121,7 +121,7 @@ Side_position_interface::general_side_position (Grob * me, Axis a, bool use_exte
 
   
   
-  return gh_double2scm (total_off);
+  return scm_make_real (total_off);
 }
 
 /*
@@ -132,7 +132,7 @@ SCM
 Side_position_interface::aligned_on_support_refpoints (SCM smob, SCM axis)
 {
   Grob *me = unsmob_grob (smob);
-  Axis a = (Axis) gh_scm2int (axis);
+  Axis a = (Axis) ly_scm2int (axis);
 
   return general_side_position (me, a, false); 
 }
@@ -184,9 +184,9 @@ Side_position_interface::quantised_position (SCM element_smob, SCM)
          rp += d;
        }
       
-      return gh_double2scm ((rp - p) * Staff_symbol_referencer::staff_space (me) / 2.0);
+      return scm_make_real ((rp - p) * Staff_symbol_referencer::staff_space (me) / 2.0);
     }
-  return gh_double2scm (0.0);
+  return scm_make_real (0.0);
 }
 
 /*
@@ -197,11 +197,11 @@ SCM
 Side_position_interface::aligned_side (SCM element_smob, SCM axis)
 {
   Grob *me = unsmob_grob (element_smob);
-  Axis a = (Axis) gh_scm2int (axis);
+  Axis a = (Axis) ly_scm2int (axis);
   
   Direction d = Side_position_interface::get_direction (me);
   
-  Real o = gh_scm2double (aligned_on_support_extents (element_smob,axis));
+  Real o = ly_scm2double (aligned_on_support_extents (element_smob,axis));
 
   Interval iv =  me->extent (me, a);
 
@@ -222,11 +222,11 @@ Side_position_interface::aligned_side (SCM element_smob, SCM axis)
  */
   Grob * st = Staff_symbol_referencer::get_staff_symbol (me);
   if (st && a == Y_AXIS
-      && gh_number_p (me->get_property ("staff-padding")))
+      && ly_number_p (me->get_property ("staff-padding")))
     {
       Real padding=
       Staff_symbol_referencer::staff_space (me)
-      * gh_scm2double (me->get_property ("staff-padding"));
+      * ly_scm2double (me->get_property ("staff-padding"));
   
       Grob *common = me->common_refpoint (st, Y_AXIS);
       
@@ -236,7 +236,7 @@ Side_position_interface::aligned_side (SCM element_smob, SCM axis)
       o += (d*  (diff >? 0));
     }
       
-  return gh_double2scm (o);
+  return scm_make_real (o);
 }
 
 
index b953c524d6dfe72d340f03ec9b0807fffb1ca26e..acd312dd37bec12df0d1fbe4f1752916a42ad28e 100644 (file)
@@ -215,7 +215,7 @@ Simple_spacer::add_columns (Link_array<Grob> const &icols)
   Link_array<Grob> cols (icols);
   
   for (int i =  cols.size (); i--;)
-    if (gh_pair_p (cols[i]->get_property ("between-cols")))
+    if (ly_pair_p (cols[i]->get_property ("between-cols")))
       {
        loose_cols_.push (cols[i]);
        cols.del (i);
@@ -227,7 +227,7 @@ Simple_spacer::add_columns (Link_array<Grob> const &icols)
       Spring_smob *spring = 0;
 
       for (SCM s = cols[i]->get_property ("ideal-distances");
-          !spring && gh_pair_p (s);
+          !spring && ly_pair_p (s);
           s = ly_cdr (s))
        {
          Spring_smob *sp = unsmob_spring (ly_car (s));
@@ -285,13 +285,13 @@ Simple_spacer::add_columns (Link_array<Grob> const &icols)
   for (int i=0; i < cols.size () - 1; i++)
     {
       for (SCM s = Spaceable_grob::get_minimum_distances (cols[i]);
-          gh_pair_p (s); s = ly_cdr (s))
+          ly_pair_p (s); s = ly_cdr (s))
        {
          Grob * other = unsmob_grob (ly_caar (s));
          int oi = cols.find_index (other);
          if (oi >= 0)
            {
-             add_rod (i, oi, gh_scm2double (ly_cdar (s)));
+             add_rod (i, oi, ly_scm2double (ly_cdar (s)));
            }
        }
     }
@@ -369,11 +369,11 @@ Simple_spacer::solve (Column_x_positions *positions, bool ragged)
   for (int i = sz; i--; )
     {
       SCM p = positions->cols_[i]->get_property ( "penalty");
-      if (gh_number_p (p))
+      if (ly_number_p (p))
        {
-         if (gh_scm2double (p) < -9999)
+         if (ly_scm2double (p) < -9999)
            break_satisfy = break_satisfy && (i == 0 || i == sz -1);
-         if (gh_scm2double (p) > 9999)
+         if (ly_scm2double (p) > 9999)
            break_satisfy = break_satisfy && !(i == 0 || i == sz -1);
        }
       
index 766efa44e750b6c0fffeed2e53a2e67ec11d6593..e1403a12cacecfcf82c861ee97d71e8dd6fd6d8b 100644 (file)
@@ -29,8 +29,8 @@ Simultaneous_music_iterator::derived_mark () const
 void
 Simultaneous_music_iterator::derived_substitute (Context *f,Context *t)
 {
-  for (SCM s = children_list_; gh_pair_p (s); s = gh_cdr (s))
-    unsmob_iterator (gh_car (s))-> substitute_outlet (f,t);
+  for (SCM s = children_list_; ly_pair_p (s); s = ly_cdr (s))
+    unsmob_iterator (ly_car (s))-> substitute_outlet (f,t);
 }
 
 void
@@ -42,7 +42,7 @@ Simultaneous_music_iterator::construct_children ()
 
   children_list_ = SCM_EOL;
   SCM * tail = &children_list_;
-  for (; gh_pair_p (i); i = ly_cdr (i), j++)
+  for (; ly_pair_p (i); i = ly_cdr (i), j++)
     {
       Music *mus = unsmob_music (ly_car (i));
 
@@ -77,9 +77,9 @@ void
 Simultaneous_music_iterator::process (Moment until)
 {
   SCM *proc = &children_list_; 
-  while (gh_pair_p (*proc))
+  while (ly_pair_p (*proc))
     {
-      Music_iterator * i = unsmob_iterator (gh_car (*proc));
+      Music_iterator * i = unsmob_iterator (ly_car (*proc));
       if (i->run_always ()
          || i->pending_moment () == until) 
        {
@@ -88,7 +88,7 @@ Simultaneous_music_iterator::process (Moment until)
       if (!i->ok ())
        {
          i->quit ();
-         *proc = gh_cdr (*proc);
+         *proc = ly_cdr (*proc);
        }
       else
        {
@@ -103,9 +103,9 @@ Simultaneous_music_iterator::pending_moment () const
   Moment next;
   next.set_infinite (1);
   
-  for (SCM s = children_list_; gh_pair_p (s); s = gh_cdr (s))
+  for (SCM s = children_list_; ly_pair_p (s); s = ly_cdr (s))
     {
-      Music_iterator * it = unsmob_iterator (gh_car (s));
+      Music_iterator * it = unsmob_iterator (ly_car (s));
       next = next <? it->pending_moment ();
     }
   
@@ -116,9 +116,9 @@ bool
 Simultaneous_music_iterator::ok () const
 {
   bool run_always_ok = false; 
-  for (SCM s = children_list_; gh_pair_p (s); s = gh_cdr (s))
+  for (SCM s = children_list_; ly_pair_p (s); s = ly_cdr (s))
     {
-      Music_iterator * it = unsmob_iterator (gh_car (s));
+      Music_iterator * it = unsmob_iterator (ly_car (s));
       if (!it->run_always ())
        return true;
       else
@@ -130,9 +130,9 @@ Simultaneous_music_iterator::ok () const
 bool
 Simultaneous_music_iterator::run_always () const
 {
-  for (SCM s = children_list_; gh_pair_p (s); s = gh_cdr (s))
+  for (SCM s = children_list_; ly_pair_p (s); s = ly_cdr (s))
     {
-      Music_iterator * it = unsmob_iterator (gh_car (s));
+      Music_iterator * it = unsmob_iterator (ly_car (s));
       if (it->run_always ())
        return true;
     }
@@ -143,16 +143,16 @@ Music_iterator*
 Simultaneous_music_iterator::try_music_in_children (Music *m) const
 {
   Music_iterator * b=0;
-  for (SCM s = children_list_; !b && gh_pair_p (s); s = gh_cdr (s))
-    b =unsmob_iterator (gh_car (s))->try_music (m);
+  for (SCM s = children_list_; !b && ly_pair_p (s); s = ly_cdr (s))
+    b =unsmob_iterator (ly_car (s))->try_music (m);
   return b;
 }
 
 void
 Simultaneous_music_iterator::do_quit ()
 {
-  for (SCM s = children_list_; gh_pair_p (s); s = gh_cdr (s))
-    unsmob_iterator (gh_car (s))->quit ();
+  for (SCM s = children_list_; ly_pair_p (s); s = ly_cdr (s))
+    unsmob_iterator (ly_car (s))->quit ();
 }
 
 IMPLEMENT_CTOR_CALLBACK (Simultaneous_music_iterator);
index f007d58dae10927ce8e65bb0e70c67f8eb388b0a..45d599399efa5d9c285d6cb2db532c16a340d5bf 100644 (file)
@@ -153,11 +153,11 @@ Slur_bezier_bow::minimise_enclosed_area (Real beauty,
   if (fit_factor () > 1.0)
     blow_fit ();
   
-  Real pct_c0 = gh_scm2double (ly_cdr (scm_assoc (ly_symbol2scm ("bezier-pct-c0"), bezier_props)));
-  Real pct_c3 = gh_scm2double (ly_cdr (scm_assoc (ly_symbol2scm ("bezier-pct-c3"), bezier_props)));
-  Real pct_in_max =  gh_scm2double (ly_cdr (scm_assoc (ly_symbol2scm ("bezier-pct-in-max"), bezier_props)));
-  Real pct_out_max = gh_scm2double (ly_cdr (scm_assoc (ly_symbol2scm ("bezier-pct-out-max"), bezier_props)));
-  Real steps =  gh_scm2double (ly_cdr (scm_assoc (ly_symbol2scm ("bezier-area-steps"),bezier_props)));
+  Real pct_c0 = ly_scm2double (ly_cdr (scm_assoc (ly_symbol2scm ("bezier-pct-c0"), bezier_props)));
+  Real pct_c3 = ly_scm2double (ly_cdr (scm_assoc (ly_symbol2scm ("bezier-pct-c3"), bezier_props)));
+  Real pct_in_max =  ly_scm2double (ly_cdr (scm_assoc (ly_symbol2scm ("bezier-pct-in-max"), bezier_props)));
+  Real pct_out_max = ly_scm2double (ly_cdr (scm_assoc (ly_symbol2scm ("bezier-pct-out-max"), bezier_props)));
+  Real steps =  ly_scm2double (ly_cdr (scm_assoc (ly_symbol2scm ("bezier-area-steps"),bezier_props)));
 
   for (int i=0; i < steps; i++)
     {
index 4a6a49305beb1a38c38d42a13e7053b10ad2b289..3fc82162276ebf9fd0b3ad20117563087675af8b 100644 (file)
@@ -155,7 +155,7 @@ Slur_engraver::process_music ()
 
          if (Direction updown = to_dir (slur_ev->get_property ("direction")))
            {
-             slur->set_property ("direction", gh_int2scm (updown));
+             slur->set_property ("direction", scm_int2num (updown));
            }
          
          start_slurs.push (slur);
index 5a34e272f46b92c64c590c463aa556e618b539db..4a1c9445522538218bd7fbd5624f4ba0bb922b9c 100644 (file)
@@ -69,9 +69,9 @@ Slur::de_uglyfy (Grob*me, Slur_bezier_bow* bb, Real default_height)
       Real f = default_height / length;
       SCM up = me->get_property ("de-uglify-parameters");
       
-      Real c1 = gh_scm2double (ly_car (up));
-      Real c2 = gh_scm2double (ly_cadr (up));
-      Real c3 = gh_scm2double (ly_caddr (up)); 
+      Real c1 = ly_scm2double (ly_car (up));
+      Real c2 = ly_scm2double (ly_cadr (up));
+      Real c3 = ly_scm2double (ly_caddr (up)); 
       
       if (h > c1 * f)
        {
@@ -120,7 +120,7 @@ Slur::after_line_breaking (SCM smob)
       return SCM_UNSPECIFIED;
     }
   set_extremities (me);
-  if (!gh_pair_p (me->get_property ("control-points")))
+  if (!ly_pair_p (me->get_property ("control-points")))
     set_control_points (me);
   return SCM_UNSPECIFIED;
 } 
@@ -133,7 +133,7 @@ Slur::check_slope (Grob *me)
     Avoid too steep slurs.
    */
   SCM s = me->get_property ("slope-limit");
-  if (gh_number_p (s))
+  if (ly_number_p (s))
     {
       Array<Offset> encompass = get_encompass_offsets (me);
       Drul_array<Offset> attachment;
@@ -147,12 +147,12 @@ Slur::check_slope (Grob *me)
       
       Real slope = slope = abs (dy / dx);
 
-      Real limit = gh_scm2double (s);
+      Real limit = ly_scm2double (s);
 
       if (slope > limit)
        {
          Real staff_space = Staff_symbol_referencer::staff_space ((Grob*)me);
-         Direction dir = (Direction)gh_scm2int (me->get_property ("direction"));
+         Direction dir = (Direction)ly_scm2int (me->get_property ("direction"));
          Direction d = (Direction) (- dir * (sign (dy)));
          SCM a = me->get_property ("attachment-offset");
          Drul_array<Offset> o;
@@ -163,7 +163,7 @@ Slur::check_slope (Grob *me)
          o[d][Y_AXIS] *= get_grob_direction (me);
 
          me->set_property ("attachment-offset",
-                               gh_cons (ly_offset2scm (o[LEFT]),
+                               scm_cons (ly_offset2scm (o[LEFT]),
                                         ly_offset2scm (o[RIGHT])));
        }
     }
@@ -182,10 +182,10 @@ Slur::set_extremities (Grob *me)
   SCM att = me->get_property ("attachment");
       /*
        */
-      if (!gh_pair_p (att))
+      if (!ly_pair_p (att))
        {
          programming_error ("attachment is not a cons?!");
-         att = gh_cons (SCM_EOL, SCM_EOL);
+         att = scm_cons (SCM_EOL, SCM_EOL);
          me->set_property ("attachment", att);
        }
       
@@ -193,15 +193,15 @@ Slur::set_extremities (Grob *me)
   do 
     {
     
-      if (!gh_symbol_p (index_get_cell (att, dir)))
+      if (!ly_symbol_p (index_get_cell (att, dir)))
        {
          SCM p = me->get_property ("extremity-function");
          SCM res = ly_symbol2scm ("head");
          
-         if (gh_procedure_p (p))
-           res =  gh_call2 (p, me->self_scm (), gh_int2scm (dir));
+         if (ly_procedure_p (p))
+           res =  scm_call_2 (p, me->self_scm (), scm_int2num (dir));
 
-         if (gh_symbol_p (res))
+         if (ly_symbol_p (res))
            index_set_cell (att, dir, res);
        }
     }
@@ -218,7 +218,7 @@ Slur::get_boundary_notecolumn_y (Grob *me, Direction dir)
 {
   SCM cols = me->get_property ("note-columns");
 
-  if (!gh_pair_p (cols))
+  if (!ly_pair_p (cols))
     {
       programming_error ("No note-columns in slur?");
       me->suicide ();
@@ -288,7 +288,7 @@ Slur::get_attachment (Grob *me, Direction dir,
                      Grob **common) 
 {
   SCM s = me->get_property ("attachment");
-  if (!gh_pair_p (s) || !gh_symbol_p (index_get_cell (s, dir)))
+  if (!ly_pair_p (s) || !ly_symbol_p (index_get_cell (s, dir)))
     {
       s = set_extremities (me);
     }
@@ -374,8 +374,8 @@ Slur::get_attachment (Grob *me, Direction dir,
   int stemdir = stem ? Stem::get_direction (stem) : 1;
   SCM l = scm_assoc
     (scm_list_n (a,
-                 gh_int2scm (stemdir * dir),
-                 gh_int2scm (slurdir * dir),
+                 scm_int2num (stemdir * dir),
+                 scm_int2num (slurdir * dir),
                   SCM_UNDEFINED), alist);
 
   if (l != SCM_BOOL_F)
@@ -524,7 +524,7 @@ MAKE_SCHEME_CALLBACK (Slur, height, 2);
 SCM
 Slur::height (SCM smob, SCM ax)
 {
-  Axis a = (Axis)gh_scm2int (ax);
+  Axis a = (Axis)ly_scm2int (ax);
   Grob * me = unsmob_grob (smob);
   assert (a == Y_AXIS);
 
@@ -565,7 +565,7 @@ Slur::print (SCM smob)
     TODO: replace dashed with generic property.
    */
   SCM d =  me->get_property ("dashed");
-  if (gh_number_p (d))
+  if (ly_number_p (d))
     a = Lookup::dashed_slur (one, thick, thick * robust_scm2double (d, 0));
   else
     a = Lookup::slur (one, get_grob_direction (me) * base_thick * ss / 10.0,
@@ -584,7 +584,7 @@ Slur::set_control_points (Grob*me)
   SCM r_0_scm = me->get_property ("ratio");
 
   Real r_0 = robust_scm2double (r_0_scm, 1);
-  Real h_inf = staff_space * gh_scm2double (h_inf_scm);
+  Real h_inf = staff_space * ly_scm2double (h_inf_scm);
   
   Slur_bezier_bow bb (get_encompass_offsets (me),
                      get_grob_direction (me),
@@ -598,14 +598,14 @@ Slur::set_control_points (Grob*me)
 
       SCM ssb = me->get_property ("beautiful");
       Real sb = 0;
-      if (gh_number_p (ssb))
-       sb = gh_scm2double (ssb);
+      if (ly_number_p (ssb))
+       sb = ly_scm2double (ssb);
 
       bb.minimise_enclosed_area (sb, details);
       SCM sbf = scm_assq (ly_symbol2scm ("force-blowfit"), details);
       Real bff = 1.0;
-      if (gh_pair_p (sbf) && gh_number_p (ly_cdr (sbf)))
-         bff = gh_scm2double (ly_cdr (sbf));
+      if (ly_pair_p (sbf) && ly_number_p (ly_cdr (sbf)))
+         bff = ly_scm2double (ly_cdr (sbf));
 
       bb.curve_.control_[1][Y_AXIS] *= bff;
       bb.curve_.control_[2][Y_AXIS] *= bff;
@@ -628,7 +628,7 @@ Slur::set_control_points (Grob*me)
   SCM controls = SCM_EOL;
   for (int i= 4; i--;)
     {
-      controls = gh_cons (ly_offset2scm (b.control_[i]), controls);
+      controls = scm_cons (ly_offset2scm (b.control_[i]), controls);
       /*
        BRRR WHURG.
        All these null control-points, where do they all come from?
@@ -650,16 +650,16 @@ Slur::get_curve (Grob*me)
   int i = 0;
 
   SCM attach = me->get_property ("attachment");
-  if (!gh_pair_p (attach))
+  if (!ly_pair_p (attach))
     attach = set_extremities (me);
 
   
   if (!get_grob_direction (me)
-      || ! gh_symbol_p (index_get_cell (attach, LEFT))
-      || ! gh_symbol_p (index_get_cell (attach, RIGHT)))
+      || ! ly_symbol_p (index_get_cell (attach, LEFT))
+      || ! ly_symbol_p (index_get_cell (attach, RIGHT)))
     set_extremities (me);
   
-  if (!gh_pair_p (me->get_property ("control-points")))
+  if (!ly_pair_p (me->get_property ("control-points")))
     set_control_points (me);
 
   // set_control_points may suicide
index fa597a6e1f7cb3db021a3af9fe8bde4fe7c56b1a..9f91c7036731093b42a4ea782dbb6d5d5018058f 100644 (file)
@@ -30,19 +30,19 @@ Spaceable_grob::add_rod (Grob *me , Grob * p, Real d)
 
   
   SCM mins = get_minimum_distances (me);
-  SCM newdist = gh_double2scm (d);
-  for (SCM s = mins; gh_pair_p (s); s = ly_cdr (s))
+  SCM newdist = scm_make_real (d);
+  for (SCM s = mins; ly_pair_p (s); s = ly_cdr (s))
     {
       SCM dist = ly_car (s);
       if (ly_car (dist) == p->self_scm ())
        {
-         gh_set_cdr_x (dist, scm_max (ly_cdr (dist),
+         scm_set_cdr_x (dist, scm_max (ly_cdr (dist),
                                       newdist));
          return ;
        }
     }
 
-  mins = gh_cons (gh_cons (p->self_scm (), newdist), mins);
+  mins = scm_cons (scm_cons (p->self_scm (), newdist), mins);
   me->set_property ("minimum-distances", mins);
 }
 
@@ -70,7 +70,7 @@ Spaceable_grob::add_spring (Grob*me, Grob * p, Real d, Real strength, bool expan
     
 #ifndef NDEBUG
   SCM mins = me->get_property ("ideal-distances");
-  for (SCM s = mins; gh_pair_p (s); s = ly_cdr (s))
+  for (SCM s = mins; ly_pair_p (s); s = ly_cdr (s))
     {
       Spring_smob * sp = unsmob_spring(ly_car (s));
       if (sp->other_ == p)
index 21780b9a762cb00b2f4c9970cd954e3740127124..a41b721a78c7be31296fa11f3684a2a23725179d 100644 (file)
@@ -96,11 +96,11 @@ loose_column (Grob *l, Grob *c, Grob *r)
     such a borderline case.)
     
   */  
-  if (!gh_pair_p (lns) || !gh_pair_p (rns))
+  if (!ly_pair_p (lns) || !ly_pair_p (rns))
     return false;
 
-  Item * l_neighbor = dynamic_cast<Item*>  (unsmob_grob (gh_car (lns)));
-  Item * r_neighbor = dynamic_cast<Item*>  (unsmob_grob (gh_car (rns)));
+  Item * l_neighbor = dynamic_cast<Item*>  (unsmob_grob (ly_car (lns)));
+  Item * r_neighbor = dynamic_cast<Item*>  (unsmob_grob (ly_car (rns)));
 
   if (!l_neighbor || !r_neighbor)
     return false;
@@ -133,15 +133,15 @@ loose_column (Grob *l, Grob *c, Grob *r)
 
     in any case, we don't want to move bar lines.
    */
-  for (SCM e = c->get_property ("elements"); gh_pair_p (e); e = gh_cdr (e))
+  for (SCM e = c->get_property ("elements"); ly_pair_p (e); e = ly_cdr (e))
     {
-      Grob * g = unsmob_grob (gh_car (e));
+      Grob * g = unsmob_grob (ly_car (e));
       if (g && Break_align_interface::has_interface (g))
        {
-         for (SCM s = g->get_property ("elements"); gh_pair_p (s);
-              s = gh_cdr (s))
+         for (SCM s = g->get_property ("elements"); ly_pair_p (s);
+              s = ly_cdr (s))
            {
-             Grob *h = unsmob_grob (gh_car (s));
+             Grob *h = unsmob_grob (ly_car (s));
 
              /*
                ugh. -- fix staff-bar name? 
@@ -177,17 +177,17 @@ Spacing_spanner::prune_loose_columns (Grob*me,Link_array<Grob> *cols, Rational s
       if (loose_column (cols->elem (i-1), c, cols->elem (i+1)))
        {
          SCM lns = c->get_property ("left-neighbors");
-         lns = gh_pair_p (lns) ? gh_car (lns) : SCM_BOOL_F;
+         lns = ly_pair_p (lns) ? ly_car (lns) : SCM_BOOL_F;
 
          SCM rns = c->get_property ("right-neighbors");
-         rns = gh_pair_p (rns) ? gh_car (rns) : SCM_BOOL_F;
+         rns = ly_pair_p (rns) ? ly_car (rns) : SCM_BOOL_F;
 
          /*
            Either object can be non existent, if the score ends
            prematurely.
           */
-         rns = gh_car (unsmob_grob (rns)->get_property ("right-items"));
-         c->set_property ("between-cols", gh_cons (lns,
+         rns = ly_car (unsmob_grob (rns)->get_property ("right-items"));
+         c->set_property ("between-cols", scm_cons (lns,
                                                         rns));
 
          /*
@@ -206,9 +206,9 @@ Spacing_spanner::prune_loose_columns (Grob*me,Link_array<Grob> *cols, Rational s
              Item *rc = dynamic_cast<Item*> (d == LEFT  ? c : next_door[RIGHT]);
 
              for (SCM s = lc->get_property ("spacing-wishes");
-                  gh_pair_p (s); s = gh_cdr (s))
+                  ly_pair_p (s); s = ly_cdr (s))
                {
-                 Grob *sp = unsmob_grob (gh_car (s));
+                 Grob *sp = unsmob_grob (ly_car (s));
                  if (Note_spacing::left_column (sp) != lc
                      || Note_spacing::right_column (sp) != rc)
                    continue;
@@ -273,9 +273,9 @@ Spacing_spanner::set_explicit_neighbor_columns (Link_array<Grob> cols)
 
 
       SCM wishes=  cols[i]->get_property ("spacing-wishes");
-      for (SCM s =wishes; gh_pair_p (s); s = gh_cdr (s))
+      for (SCM s =wishes; ly_pair_p (s); s = ly_cdr (s))
        {
-         Item * wish = dynamic_cast<Item*> (unsmob_grob (gh_car (s)));
+         Item * wish = dynamic_cast<Item*> (unsmob_grob (ly_car (s)));
 
          Item * lc = wish->get_column ();
          Grob * right = Note_spacing::right_column (wish);
@@ -297,7 +297,7 @@ Spacing_spanner::set_explicit_neighbor_columns (Link_array<Grob> cols)
                right_neighbors  =SCM_EOL;
              
              min_rank = right_rank;
-             right_neighbors = gh_cons (wish->self_scm (), right_neighbors);
+             right_neighbors = scm_cons (wish->self_scm (), right_neighbors);
            }
 
          /*
@@ -305,10 +305,10 @@ Spacing_spanner::set_explicit_neighbor_columns (Link_array<Grob> cols)
           */
          int maxrank = 0;
          SCM left_neighs = rc->get_property ("left-neighbors");
-         if (gh_pair_p (left_neighs)
-             && unsmob_grob (gh_car (left_neighs)))
+         if (ly_pair_p (left_neighs)
+             && unsmob_grob (ly_car (left_neighs)))
            {
-             Item * it = dynamic_cast<Item*> (unsmob_grob (gh_car (left_neighs)));
+             Item * it = dynamic_cast<Item*> (unsmob_grob (ly_car (left_neighs)));
              maxrank = Paper_column::get_rank (it->get_column ());
            }
 
@@ -317,12 +317,12 @@ Spacing_spanner::set_explicit_neighbor_columns (Link_array<Grob> cols)
              if (left_rank > maxrank)
                left_neighs = SCM_EOL;
 
-             left_neighs = gh_cons (wish->self_scm (), left_neighs);
+             left_neighs = scm_cons (wish->self_scm (), left_neighs);
              rc->set_property ("left-neighbors", right_neighbors);
            }
        }
 
-      if (gh_pair_p (right_neighbors))
+      if (ly_pair_p (right_neighbors))
        {
          cols[i]->set_property ("right-neighbors", right_neighbors);
        }
@@ -348,15 +348,15 @@ Spacing_spanner::set_implicit_neighbor_columns (Link_array<Grob> cols)
        sloppy with typnig left/right-neighbors should take list, but paper-column found instead.
        */
       SCM ln = cols[i] ->get_property ("left-neighbors");
-      if (!gh_pair_p (ln) && i ) 
+      if (!ly_pair_p (ln) && i ) 
        {
-         cols[i]->set_property ("left-neighbors", gh_cons (cols[i-1]->self_scm (), SCM_EOL));
+         cols[i]->set_property ("left-neighbors", scm_cons (cols[i-1]->self_scm (), SCM_EOL));
        }
 
       SCM rn = cols[i] ->get_property ("right-neighbors");
-      if (!gh_pair_p (rn) && i < cols.size () - 1) 
+      if (!ly_pair_p (rn) && i < cols.size () - 1) 
        {
-         cols[i]->set_property ("right-neighbors", gh_cons (cols[i + 1]->self_scm (), SCM_EOL));
+         cols[i]->set_property ("right-neighbors", scm_cons (cols[i + 1]->self_scm (), SCM_EOL));
        }
     }
 }
@@ -569,9 +569,9 @@ Spacing_spanner::musical_column_spacing (Grob *me, Item * lc, Item *rc, Real inc
     happens after the current note (this is set in the grob
     property SPACING-SEQUENCE.
   */
-  for (SCM s = seq; gh_pair_p (s); s = ly_cdr (s))
+  for (SCM s = seq; ly_pair_p (s); s = ly_cdr (s))
     {
-      Grob * wish = unsmob_grob (gh_car (s));
+      Grob * wish = unsmob_grob (ly_car (s));
 
       Item *wish_rcol = Note_spacing::right_column (wish);
       if (Note_spacing::left_column (wish) != lc
@@ -733,9 +733,9 @@ Spacing_spanner::breakable_column_spacing (Grob*me, Item* l, Item *r,Moment shor
   if (dt == Moment (0,0))
     {
       for (SCM s = l->get_property ("spacing-wishes");
-          gh_pair_p (s); s = gh_cdr (s))
+          ly_pair_p (s); s = ly_cdr (s))
        {
-         Item * spacing_grob = dynamic_cast<Item*> (unsmob_grob (gh_car (s)));
+         Item * spacing_grob = dynamic_cast<Item*> (unsmob_grob (ly_car (s)));
 
          if (!spacing_grob || !Staff_spacing::has_interface (spacing_grob))
            continue;
index e9a45412f8773e1decfa2715c56c10ec6df22e8c..0b473fe5df73db7258356b66dafc98b24f87426b 100644 (file)
@@ -82,10 +82,10 @@ Span_arpeggio_engraver::stop_translation_timestep ()
       for (int i=0; i < arpeggios_.size (); i ++)
        {
          for (SCM s = arpeggios_[i]->get_property ("stems");
-              gh_pair_p (s); s = ly_cdr (s))
+              ly_pair_p (s); s = ly_cdr (s))
            Group_interface::add_thing (span_arpeggio_, ly_symbol2scm ("stems"), ly_car (s));
          for (SCM s = arpeggios_[i]->get_property ("side-support-elements");
-              gh_pair_p (s); s = ly_cdr (s))
+              ly_pair_p (s); s = ly_cdr (s))
            Group_interface::add_thing (span_arpeggio_, ly_symbol2scm ("side-support-elements"), ly_car (s));
 
          /*
index 15e7234259b7794f07d347cf29c847042faefd5e..d9aa646a3b5bfd63ad8e7d0f86daffdf561b7681 100644 (file)
@@ -69,7 +69,7 @@ Span_bar_engraver::stop_translation_timestep ()
 
       SCM vissym =ly_symbol2scm ("break-visibility");
       SCM vis = bars_[0]->internal_get_property (vissym);        
-      if (gh_equal_p (spanbar_->internal_get_property (vissym), vis))
+      if (ly_equal_p (spanbar_->internal_get_property (vissym), vis))
        spanbar_->internal_set_property (vissym, vis);
 
       typeset_grob (spanbar_);
index c90a2837263658ef493f8ed00cc2ad7029a57b6a..95b1058f82439e6cad971abb53c28efe04915f1e 100644 (file)
@@ -53,7 +53,7 @@ Span_bar::print (SCM smobbed_me)
 
   /* compute common refpoint of elements */
   Grob *refp = me;
-  for (SCM elts = first_elt; gh_pair_p (elts); elts = ly_cdr (elts))
+  for (SCM elts = first_elt; ly_pair_p (elts); elts = ly_cdr (elts))
     {
       SCM smobbed_staff_bar = ly_car (elts);
       Grob *staff_bar = unsmob_grob (smobbed_staff_bar);
@@ -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 (!gh_string_p (glyph))
+  if (!ly_string_p (glyph))
     return SCM_EOL;
   
   String glyph_string = ly_scm2string (glyph);
@@ -74,7 +74,7 @@ Span_bar::print (SCM smobbed_me)
   Stencil span_bar_mol;
 
   Interval prev_extent;
-  for (SCM elts = first_elt; gh_pair_p (elts); elts = ly_cdr (elts))
+  for (SCM elts = first_elt; ly_pair_p (elts); elts = ly_cdr (elts))
     {
       SCM smobbed_staff_bar = ly_car (elts);
       Grob *staff_bar = unsmob_grob (smobbed_staff_bar);
@@ -114,7 +114,7 @@ SCM
 Span_bar::width_callback (SCM element_smob, SCM scm_axis)
 {
   Grob *se = unsmob_grob (element_smob);
-  Axis a = (Axis) gh_scm2int (scm_axis);
+  Axis a = (Axis) ly_scm2int (scm_axis);
   assert (a == X_AXIS);
   String gl = ly_scm2string (se->get_property ("glyph"));
 
@@ -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) gh_scm2int (axis);
+  Axis a = (Axis) ly_scm2int (axis);
   assert (a == Y_AXIS);
   Interval i (get_spanned_interval (me));
 
@@ -155,10 +155,10 @@ Span_bar::center_on_spanned_callback (SCM element_smob, SCM axis)
   if (i.is_empty ())
     {
       me->suicide ();
-      return gh_double2scm (0.0);
+      return scm_make_real (0.0);
     }
   
-  return gh_double2scm (i.center ());
+  return scm_make_real (i.center ());
 }
 
 void
@@ -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 (!gh_pair_p (me->get_property ("elements")))
+  if (!ly_pair_p (me->get_property ("elements")))
     {
       me->suicide ();
     }
@@ -178,17 +178,17 @@ Span_bar::evaluate_glyph (Grob*me)
 {
   SCM gl = me->get_property ("glyph");
 
-  if (gh_string_p (gl))
+  if (ly_string_p (gl))
     return ;
   
   for (SCM s = me->get_property ("elements");
-       !gh_string_p (gl) && gh_pair_p (s); s = gh_cdr (s))
+       !ly_string_p (gl) && ly_pair_p (s); s = ly_cdr (s))
     {
-      gl = unsmob_grob (gh_car (s))
+      gl = unsmob_grob (ly_car (s))
        ->get_property ("glyph");
     }
 
-  if (!gh_string_p (gl))
+  if (!ly_string_p (gl))
     {
       me->suicide ();
       return;
@@ -218,7 +218,7 @@ Interval
 Span_bar::get_spanned_interval (Grob*me) 
 {
   return ly_scm2interval (Axis_group_interface::group_extent_callback
-                         (me->self_scm (), gh_int2scm (Y_AXIS))); 
+                         (me->self_scm (), scm_int2num (Y_AXIS))); 
 }
 
 
@@ -232,9 +232,9 @@ Span_bar::get_bar_size (SCM smob)
     {
       /* This happens if the bars are hara-kiried from under us. */
       me->suicide ();
-      return gh_double2scm (-1);
+      return scm_make_real (-1);
     }
-  return gh_double2scm (iv.length ());
+  return scm_make_real (iv.length ());
 }
 
 
index 509ff6ae348b0a1d23c2cbebf26b52db31ad0ec5..ad1092e981efb2f02d09180616617a92333c2987 100644 (file)
@@ -30,7 +30,7 @@ Staff_collecting_engraver::acknowledge_grob (Grob_info gi)
   if (Staff_symbol::has_interface (gi.grob_))
     {
       SCM staffs = get_property ("stavesFound");
-      staffs = gh_cons (gi.grob_->self_scm (), staffs);
+      staffs = scm_cons (gi.grob_->self_scm (), staffs);
 
       daddy_context_->set_property ("stavesFound", staffs);
     }
index bc0d86f7d6b52eda706cb1270f335a67971d76f9..4b7f244532643eabd6e25e219fa85426f4c85926 100644 (file)
@@ -99,7 +99,7 @@ Staff_performer::stop_translation_timestep ()
 {
   SCM proc = ly_scheme_function ("percussion?");
   
-  SCM drums = gh_call1 (proc, ly_symbol2scm (instrument_string_.to_str0 ()));
+  SCM drums = scm_call_1 (proc, ly_symbol2scm (instrument_string_.to_str0 ()));
   audio_staff_->channel_ = (drums == SCM_BOOL_T ? 9 : -1 );
   if (name_)
     {
@@ -130,7 +130,7 @@ Staff_performer::new_instrument_string ()
   // mustn't ask Score for instrument: it will return piano!
   SCM minstr = get_property ("midiInstrument");
 
-  if (!gh_string_p (minstr)
+  if (!ly_string_p (minstr)
       || ly_scm2string (minstr) == instrument_string_)
     return "";
 
index 124cb364884e2c21adb375c17aa697e5c2977f7d..ef3bd0073a6cc7058a363551985b5f63fb330367 100644 (file)
@@ -101,7 +101,7 @@ Staff_spacing::bar_y_positions (Grob *bar_grob)
     {
       SCM glyph = bar_grob->get_property ("glyph");
       
-      String glyph_string = gh_string_p (glyph) ? ly_scm2string (glyph) : "";
+      String glyph_string = ly_string_p (glyph) ? ly_scm2string (glyph) : "";
       if (glyph_string.left_string (1) == "|" || glyph_string.left_string (1) == ".")
        {
          SCM sz = Bar_line::get_staff_bar_size (bar_grob->self_scm ());
@@ -128,14 +128,14 @@ Staff_spacing::next_notes_correction (Grob *me, Grob * last_grob)
   Real max_corr =0.0;
 
   for (SCM s = me->get_property ("right-items");
-       gh_pair_p (s);  s = gh_cdr (s))
+       ly_pair_p (s);  s = ly_cdr (s))
     {
-      Grob * g = unsmob_grob (gh_car (s));
+      Grob * g = unsmob_grob (ly_car (s));
 
       max_corr = max_corr >?  next_note_correction (me, g,  bar_size);
       for (SCM t = g->get_property ("elements");
-          gh_pair_p (t); t  = gh_cdr (t))
-       max_corr = max_corr >? next_note_correction (me, unsmob_grob (gh_car (t)), bar_size);
+          ly_pair_p (t); t  = ly_cdr (t))
+       max_corr = max_corr >? next_note_correction (me, unsmob_grob (ly_car (t)), bar_size);
       
     }
   
@@ -152,9 +152,9 @@ Staff_spacing::get_spacing_params (Grob *me, Real * space, Real * fixed)
   Item * me_item  = dynamic_cast<Item*> (me);
     
   for (SCM s = me->get_property ("left-items");
-       gh_pair_p (s); s = gh_cdr (s))
+       ly_pair_p (s); s = ly_cdr (s))
     {
-      Grob * cand = unsmob_grob (gh_car (s));
+      Grob * cand = unsmob_grob (ly_car (s));
       if (cand && Separation_item::has_interface (cand))
        separation_item = cand ;
     }
@@ -197,20 +197,20 @@ Staff_spacing::get_spacing_params (Grob *me, Real * space, Real * fixed)
   if (me_item->break_status_dir () == CENTER)
     {
       SCM nndef = scm_sloppy_assq (ly_symbol2scm ("next-note"), alist);
-      if (gh_pair_p (nndef))
+      if (ly_pair_p (nndef))
        space_def = nndef;
     }
   
   
-  if (!gh_pair_p (space_def))
+  if (!ly_pair_p (space_def))
     {
       programming_error ("Unknown prefatory spacing. "); 
       return; 
     }
 
-  space_def = gh_cdr (space_def);
-  Real distance = gh_scm2double (gh_cdr (space_def));
-  SCM type = gh_car (space_def) ;
+  space_def = ly_cdr (space_def);
+  Real distance = ly_scm2double (ly_cdr (space_def));
+  SCM type = ly_car (space_def) ;
 
   *fixed = last_ext[RIGHT];
   if (type == ly_symbol2scm ("fixed-space"))
index cfd92d8a56f5fb0b7ca40c25bffa6bdb2de89156..974c5ae1ebd1af643033a76607080882766dd278 100644 (file)
@@ -106,7 +106,7 @@ Tab_staff_symbol_engraver::process_music ()
     {
       int k = scm_ilength (get_property ("stringTunings"));
       if (k>=0)
-       span_->set_property ("line-count", gh_int2scm (k));
+       span_->set_property ("line-count", scm_int2num (k));
     }
 }
 
index 37004624c7530a9ad612cf5fd3009811e98495ca..6359907d1c44250894901922596e5f651fc5431f 100644 (file)
@@ -93,9 +93,9 @@ LY_DEFINE (ly_grob_staff_position, "ly:grob-staff-position",
   Real pos = Staff_symbol_referencer::get_position (g);
 
   if (fabs (rint (pos) -pos) < 1e-6) // ugh.
-    return gh_int2scm ((int) my_round (pos));
+    return scm_int2num ((int) my_round (pos));
   else
-    return gh_double2scm (pos);
+    return scm_make_real (pos);
 }
 
 
@@ -108,14 +108,14 @@ Staff_symbol_referencer::callback (SCM element_smob, SCM)
 
   SCM pos = me->get_property ("staff-position");
   Real off = 0.0;
-  if (gh_number_p (pos))
+  if (ly_number_p (pos))
     {
       Real space = Staff_symbol_referencer::staff_space (me);
-      off = gh_scm2double (pos) * space / 2.0;
-      me->set_property ("staff-position", gh_int2scm (0));
+      off = ly_scm2double (pos) * space / 2.0;
+      me->set_property ("staff-position", scm_int2num (0));
     }
 
-  return gh_double2scm (off);
+  return scm_make_real (off);
 }
 
 /*  This sets the position relative to the center of the staff symbol.
@@ -137,10 +137,10 @@ Staff_symbol_referencer::set_position (Grob *me, Real p)
   if (st && me->common_refpoint (st, Y_AXIS))
     {
       Real oldpos = get_position (me);
-      me->set_property ("staff-position", gh_double2scm (p - oldpos));
+      me->set_property ("staff-position", scm_make_real (p - oldpos));
     }
   else
-    me->set_property ("staff-position", gh_double2scm (p));
+    me->set_property ("staff-position", scm_make_real (p));
 
   if (!me->has_offset_callback (Staff_symbol_referencer::callback_proc,
                                Y_AXIS))
index 744beabe602243af8d8ab39ede3fb835b61a33a5..e8242d83fc0c5687e100f33531450dd8ccaffdd7 100644 (file)
@@ -42,14 +42,14 @@ Staff_symbol::print (SCM smob)
   do
     {
       SCM width_scm = me->get_property ("width");
-      if (d == RIGHT && gh_number_p (width_scm))
+      if (d == RIGHT && ly_number_p (width_scm))
        {
          /*
            don't multiply by Staff_symbol_referencer::staff_space (me),
            since that would make aligning staff symbols of different sizes to
            one right margin hell.
          */      
-         span_points[RIGHT] = gh_scm2double (width_scm);
+         span_points[RIGHT] = ly_scm2double (width_scm);
        }
       else
        {
@@ -95,8 +95,8 @@ int
 Staff_symbol::line_count (Grob*me) 
 {
   SCM c = me->get_property ("line-count");
-  if (gh_number_p (c))
-    return gh_scm2int (c);
+  if (ly_number_p (c))
+    return ly_scm2int (c);
   else
     return 0;
 }
index 68c09bfa934d3ca537ff0a9053a20703c35e1127..3ccf2ab485fc9a9f345e3864e2d4d286ed881a7e 100644 (file)
@@ -45,7 +45,7 @@ Stanza_number_engraver::process_music ()
 {
   SCM stanza = get_property ("stanza");
   
-  if (gh_string_p (stanza) && stanza != last_stanza_)
+  if (ly_string_p (stanza) && stanza != last_stanza_)
     {
       last_stanza_ = stanza;
       
index 0216c85106a0ac45b000eba48dc17ca97d7b45d6..0d36c981a076e636a6dc44f9aa0d8f3b57b26d8a 100644 (file)
@@ -67,7 +67,7 @@ Stem_engraver::acknowledge_grob (Grob_info i)
        {
          stem_ = make_item ("Stem");
 
-         stem_->set_property ("duration-log", gh_int2scm (duration_log));
+         stem_->set_property ("duration-log", scm_int2num (duration_log));
 
          if (tremolo_ev_)
            {
@@ -80,15 +80,15 @@ Stem_engraver::acknowledge_grob (Grob_info i)
 
                the first and last (quarter) note bothe get one tremolo flag.
               */
-             int requested_type = gh_scm2int (tremolo_ev_->get_property ("tremolo-type"));
+             int requested_type = ly_scm2int (tremolo_ev_->get_property ("tremolo-type"));
              SCM f = get_property ("tremoloFlags");
              if (!requested_type)
-               if (gh_number_p (f))
-                 requested_type = gh_scm2int (f);
+               if (ly_number_p (f))
+                 requested_type = ly_scm2int (f);
                else
                  requested_type = 8; 
              else
-               daddy_context_->set_property ("tremoloFlags", gh_int2scm (requested_type));
+               daddy_context_->set_property ("tremoloFlags", scm_int2num (requested_type));
 
              int tremolo_flags = intlog2 (requested_type) - 2
                - (duration_log > 2 ? duration_log - 2 : 0);
@@ -109,7 +109,7 @@ Stem_engraver::acknowledge_grob (Grob_info i)
                    itself.
                   */
                  tremolo_->set_property ("flag-count",
-                                              gh_int2scm (tremolo_flags));
+                                              scm_int2num (tremolo_flags));
                  tremolo_->set_parent (stem_, X_AXIS);
                  stem_->set_property ("tremolo-flag", tremolo_->self_scm ());
                  tremolo_->set_property ("stem",
@@ -149,15 +149,15 @@ Stem_engraver::stop_translation_timestep ()
        toDO: junk these properties.
        */
       SCM prop = get_property ("stemLeftBeamCount");
-      if (gh_number_p (prop))
+      if (ly_number_p (prop))
        {
-         Stem::set_beaming (stem_,gh_scm2int (prop),LEFT);
+         Stem::set_beaming (stem_,ly_scm2int (prop),LEFT);
          daddy_context_->unset_property (ly_symbol2scm ("stemLeftBeamCount"));
        }
       prop = get_property ("stemRightBeamCount");
-      if (gh_number_p (prop))
+      if (ly_number_p (prop))
        {
-         Stem::set_beaming (stem_,gh_scm2int (prop), RIGHT);
+         Stem::set_beaming (stem_,ly_scm2int (prop), RIGHT);
          daddy_context_->unset_property (ly_symbol2scm ("stemRightBeamCount"));
        }
 
index 48192b952e6f6c0e32320ea51bddd876b6c96b3a..fda0f1ec9ac3e17286c7dca930f5722bc714df3a 100644 (file)
@@ -42,7 +42,7 @@ MAKE_SCHEME_CALLBACK (Stem_tremolo, height, 2);
 SCM
 Stem_tremolo::height (SCM smob, SCM ax)
 {
-  Axis a = (Axis)gh_scm2int (ax);
+  Axis a = (Axis)ly_scm2int (ax);
   Grob * me = unsmob_grob (smob);
   assert (a == Y_AXIS);
 
@@ -68,7 +68,7 @@ Stem_tremolo::raw_stencil (Grob *me)
       SCM s = beam->get_property ("positions");
       if (is_number_pair (s))
        {
-         dy = -gh_scm2double (gh_car (s)) +gh_scm2double (gh_cdr (s));
+         dy = -ly_scm2double (ly_car (s)) +ly_scm2double (ly_cdr (s));
        }
       
       Real dx = Beam::last_visible_stem (beam)->relative_coordinate (0, X_AXIS)
@@ -92,8 +92,8 @@ Stem_tremolo::raw_stencil (Grob *me)
   
   int tremolo_flags = 0;
   SCM s = me->get_property ("flag-count");
-  if (gh_number_p (s))
-    tremolo_flags = gh_scm2int (s);
+  if (ly_number_p (s))
+    tremolo_flags = ly_scm2int (s);
 
   if (!tremolo_flags)
     {
@@ -150,9 +150,9 @@ Stem_tremolo::print (SCM grob)
 
   Real beamthickness = 0.0;
   SCM sbt = (beam) ? beam->get_property ("thickness") : SCM_EOL ;
-  if (gh_number_p (sbt))
+  if (ly_number_p (sbt))
     {
-      beamthickness = gh_scm2double (sbt) * ss;
+      beamthickness = ly_scm2double (sbt) * ss;
     }
 
   Real end_y
index 68c437ab1c0aadd5c99e9e2775f3bfef4c6d8502..72b52a3e7c32bc3879f1ac5e440f5a410a42f270 100644 (file)
@@ -40,16 +40,16 @@ Stem::set_beaming (Grob*me, int beam_count,  Direction d)
 {
   SCM pair = me->get_property ("beaming");
   
-  if (!gh_pair_p (pair))
+  if (!ly_pair_p (pair))
     {
-      pair = gh_cons (SCM_EOL, SCM_EOL);
+      pair = scm_cons (SCM_EOL, SCM_EOL);
       me->set_property ("beaming", pair);
     }
 
   SCM l = index_get_cell (pair, d);
   for (int i = 0; i<  beam_count; i++)
     {
-      l = gh_cons (gh_int2scm (i), l);
+      l = scm_cons (scm_int2num (i), l);
     }
   index_set_cell (pair, d, l);         
 }
@@ -83,13 +83,13 @@ Stem::stem_end_position (Grob*me)
 {
   SCM p =me->get_property ("stem-end-position");
   Real pos;
-  if (!gh_number_p (p))
+  if (!ly_number_p (p))
     {
       pos = get_default_stem_end_position (me);
-      me->set_property ("stem-end-position", gh_double2scm (pos));
+      me->set_property ("stem-end-position", scm_make_real (pos));
     }
   else
-    pos = gh_scm2double (p);
+    pos = ly_scm2double (p);
 
   return pos;
 }
@@ -118,7 +118,7 @@ Stem::set_stemend (Grob*me, Real se)
   if (d && d * head_positions (me)[get_direction (me)] >= se*d)
     me->warning (_ ("Weird stem size; check for narrow beams"));
 
-  me->set_property ("stem-end-position", gh_double2scm (se));
+  me->set_property ("stem-end-position", scm_make_real (se));
 }
 
 
@@ -189,7 +189,7 @@ Stem::extremal_heads (Grob*me)
   Drul_array<Grob *> exthead;
   exthead[LEFT] = exthead[RIGHT] =0;
   
-  for (SCM s = me->get_property ("note-heads"); gh_pair_p (s); s = ly_cdr (s))
+  for (SCM s = me->get_property ("note-heads"); ly_pair_p (s); s = ly_cdr (s))
     {
       Grob * n = unsmob_grob (ly_car (s));
 
@@ -222,7 +222,7 @@ Array<int>
 Stem::note_head_positions (Grob *me)
 {
   Array<int> ps ;
-  for (SCM s = me->get_property ("note-heads"); gh_pair_p (s); s = ly_cdr (s))
+  for (SCM s = me->get_property ("note-heads"); ly_pair_p (s); s = ly_cdr (s))
     {
       Grob * n = unsmob_grob (ly_car (s));
       int p = Staff_symbol_referencer::get_rounded_position (n);
@@ -254,7 +254,7 @@ bool
 Stem::is_invisible (Grob*me)
 {
   return ! (head_count (me)
-           && gh_scm2int (me->get_property ("duration-log")) >= 1);
+           && ly_scm2int (me->get_property ("duration-log")) >= 1);
 }
 
 Direction
@@ -289,16 +289,16 @@ Stem::get_default_stem_end_position (Grob*me)
   
   Real length = 7;             // WARNING: IN HALF SPACES
   SCM scm_len = me->get_property ("length");
-  if (gh_number_p (scm_len))
+  if (ly_number_p (scm_len))
     {
-      length = gh_scm2double (scm_len);
+      length = ly_scm2double (scm_len);
     }
   else
     {
       s = me->get_property ("lengths");
-      if (gh_pair_p (s))
+      if (ly_pair_p (s))
        {
-         length = 2* gh_scm2double (robust_list_ref (durlog -2, s));
+         length = 2* ly_scm2double (robust_list_ref (durlog -2, s));
        }
     }
 
@@ -317,7 +317,7 @@ Stem::get_default_stem_end_position (Grob*me)
   if (dir * head_positions (me)[dir] >= 0)
     {
       SCM sshorten = me->get_property ("stem-shorten");
-      SCM scm_shorten = gh_pair_p (sshorten) ?
+      SCM scm_shorten = ly_pair_p (sshorten) ?
        robust_list_ref ((duration_log (me) - 2) >? 0, sshorten): SCM_EOL;
       Real shorten = 2* robust_scm2double (scm_shorten,0);
       
@@ -429,7 +429,7 @@ int
 Stem::duration_log (Grob*me) 
 {
   SCM s = me->get_property ("duration-log");
-  return (gh_number_p (s)) ? gh_scm2int (s) : 2;
+  return (ly_number_p (s)) ? ly_scm2int (s) : 2;
 }
 
 void
@@ -549,7 +549,7 @@ MAKE_SCHEME_CALLBACK (Stem, height, 2);
 SCM
 Stem::height (SCM smob, SCM ax)
 {
-  Axis a = (Axis)gh_scm2int (ax);
+  Axis a = (Axis)ly_scm2int (ax);
   Grob * me = unsmob_grob (smob);
   assert (a == Y_AXIS);
 
@@ -576,7 +576,7 @@ Stem::flag (Grob*me)
   String flag_style;
   
   SCM flag_style_scm = me->get_property ("flag-style");
-  if (gh_symbol_p (flag_style_scm))
+  if (ly_symbol_p (flag_style_scm))
     {
       flag_style = ly_symbol2string (flag_style_scm);
     }
@@ -649,7 +649,7 @@ Stem::flag (Grob*me)
     }
 
   SCM stroke_style_scm = me->get_property ("stroke-style");
-  if (gh_string_p (stroke_style_scm))
+  if (ly_string_p (stroke_style_scm))
     {
       String stroke_style = ly_scm2string (stroke_style_scm);
       if (!stroke_style.is_empty ())
@@ -674,7 +674,7 @@ MAKE_SCHEME_CALLBACK (Stem,dim_callback,2);
 SCM
 Stem::dim_callback (SCM e, SCM ax)
 {
-  Axis a = (Axis) gh_scm2int (ax);
+  Axis a = (Axis) ly_scm2int (ax);
   assert (a == X_AXIS);
   Grob *me = unsmob_grob (e);
   Interval r (0, 0);
@@ -691,7 +691,7 @@ Stem::dim_callback (SCM e, SCM ax)
 Real
 Stem::thickness (Grob* me)
 {
-  return gh_scm2double (me->get_property ("thickness"))
+  return ly_scm2double (me->get_property ("thickness"))
     * Staff_symbol_referencer::line_thickness (me);
 }
 
@@ -775,7 +775,7 @@ Stem::off_callback (SCM element_smob, SCM)
 
   if (head_count (me) == 0)
     {
-      return gh_double2scm (0.0);
+      return scm_make_real (0.0);
     }
   
   if (Grob * f = first_head (me))
@@ -808,7 +808,7 @@ Stem::off_callback (SCM element_smob, SCM)
          r += - d * rule_thick * 0.5;
        }
     }
-  return gh_double2scm (r);
+  return scm_make_real (r);
 }
 
 
@@ -824,7 +824,7 @@ Stem::get_stem_info (Grob *me)
 {
   /* Return cached info if available */
   SCM scm_info = me->get_property ("stem-info");
-  if (!gh_pair_p (scm_info))
+  if (!ly_pair_p (scm_info))
     {
       calc_stem_info (me);
       scm_info = me->get_property ("stem-info");
@@ -832,8 +832,8 @@ Stem::get_stem_info (Grob *me)
   
   Stem_info si;
   si.dir_ = get_grob_direction (me); 
-  si.ideal_y_ = gh_scm2double (gh_car (scm_info)); 
-  si.shortest_y_ = gh_scm2double (gh_cadr (scm_info));
+  si.ideal_y_ = ly_scm2double (ly_car (scm_info)); 
+  si.shortest_y_ = ly_scm2double (ly_cadr (scm_info));
   return si;
 }
 
@@ -862,7 +862,7 @@ Stem::calc_stem_info (Grob *me)
   /* Simple standard stem length */
   SCM lengths = me->get_property ("beamed-lengths");
   Real ideal_length =
-    gh_scm2double (robust_list_ref (beam_count - 1,lengths))
+    ly_scm2double (robust_list_ref (beam_count - 1,lengths))
                
     * staff_space
     /* stem only extends to center of beam */
@@ -871,7 +871,7 @@ Stem::calc_stem_info (Grob *me)
   /* Condition: sane minimum free stem length (chord to beams) */
   lengths = me->get_property ("beamed-minimum-free-lengths");
   Real ideal_minimum_free =
-    gh_scm2double (robust_list_ref (beam_count - 1, lengths))
+    ly_scm2double (robust_list_ref (beam_count - 1, lengths))
     * staff_space;
   
 
@@ -932,7 +932,7 @@ Stem::calc_stem_info (Grob *me)
   ideal_y -= robust_scm2double (beam->get_property ("shorten"), 0);
 
   Real minimum_free =
-    gh_scm2double (robust_list_ref
+    ly_scm2double (robust_list_ref
                   (beam_count - 1,
                    me->get_property
                    ("beamed-extreme-minimum-free-lengths")))
@@ -950,8 +950,8 @@ Stem::calc_stem_info (Grob *me)
   Real shortest_y = minimum_y * my_dir; 
   
   me->set_property ("stem-info",
-                        scm_list_n (gh_double2scm (ideal_y),
-                                    gh_double2scm (shortest_y),
+                        scm_list_n (scm_make_real (ideal_y),
+                                    scm_make_real (shortest_y),
                                     SCM_UNDEFINED));
 }
 
@@ -959,8 +959,8 @@ Slice
 Stem::beam_multiplicity (Grob *stem)
 {
   SCM beaming= stem->get_property ("beaming");
-  Slice l = int_list_to_slice (gh_car (beaming));
-  Slice r = int_list_to_slice (gh_cdr (beaming));
+  Slice l = int_list_to_slice (ly_car (beaming));
+  Slice r = int_list_to_slice (ly_cdr (beaming));
   l.unite (r);
 
   return l;
index c920f639a095b2a49fe89e6f83030ce8205b8882..9108744dc332fcd6989e45acfb4609806ec4a2e6 100644 (file)
@@ -29,7 +29,7 @@ LY_DEFINE (ly_stencil_set_extent_x, "ly:stencil-set-extent!",
                   "number pair");
 
   Interval iv = ly_scm2interval (np);
-  s->dim_[Axis (gh_scm2int (axis))] = iv;
+  s->dim_[Axis (ly_scm2int (axis))] = iv;
 
   return SCM_UNDEFINED;
 }
@@ -40,12 +40,12 @@ LY_DEFINE (ly_translate_stencil_axis, "ly:stencil-translate-axis",
 {
   Stencil *s = unsmob_stencil (stil);
   SCM_ASSERT_TYPE (s, stil, SCM_ARG1, __FUNCTION__, "stencil");
-  SCM_ASSERT_TYPE (gh_number_p (amount), amount, SCM_ARG2, __FUNCTION__, "number pair");
+  SCM_ASSERT_TYPE (ly_number_p (amount), amount, SCM_ARG2, __FUNCTION__, "number pair");
   SCM_ASSERT_TYPE (is_axis (axis), axis, SCM_ARG3, __FUNCTION__, "axis");
 
   SCM new_s = s->smobbed_copy ();
   Stencil *q = unsmob_stencil (new_s);
-  q->translate_axis (gh_scm2double (amount), Axis (gh_scm2int (axis)));
+  q->translate_axis (ly_scm2double (amount), Axis (ly_scm2int (axis)));
   return new_s;
 
 }
@@ -84,7 +84,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 (gh_scm2int (axis))));
+  return ly_interval2scm (s->extent (Axis (ly_scm2int (axis))));
 }
 
 LY_DEFINE (ly_stencil_moved_to_edge, "ly:stencil-moved-to-edge",
@@ -106,22 +106,22 @@ LY_DEFINE (ly_stencil_moved_to_edge, "ly:stencil-moved-to-edge",
   Real p = 0.0;
   if (padding != SCM_UNDEFINED)
     {
-      SCM_ASSERT_TYPE (gh_number_p (padding), padding, SCM_ARG5, __FUNCTION__, "number");
-      p = gh_scm2double (padding);
+      SCM_ASSERT_TYPE (ly_number_p (padding), padding, SCM_ARG5, __FUNCTION__, "number");
+      p = ly_scm2double (padding);
     }
   Real m = 0.0;
   if (minimum != SCM_UNDEFINED)
     {
-      SCM_ASSERT_TYPE (gh_number_p (minimum), minimum, SCM_ARG6, __FUNCTION__, "number");
-      m = gh_scm2double (minimum);
+      SCM_ASSERT_TYPE (ly_number_p (minimum), minimum, SCM_ARG6, __FUNCTION__, "number");
+      m = ly_scm2double (minimum);
     }
 
   if (s1)
     first_stencil = *s1;
 
   if (s2)
-    return first_stencil.moved_to_edge (Axis (gh_scm2int (axis)),
-                                       Direction (gh_scm2int (direction)),
+    return first_stencil.moved_to_edge (Axis (ly_scm2int (axis)),
+                                       Direction (ly_scm2int (direction)),
                                        *s2, p, m).smobbed_copy ();
   else
     return Stencil().smobbed_copy ();
@@ -151,21 +151,21 @@ LY_DEFINE (ly_stencil_combine_at_edge, "ly:stencil-combine-at-edge",
   Real p = 0.0;
   if (padding != SCM_UNDEFINED)
     {
-      SCM_ASSERT_TYPE (gh_number_p (padding), padding, SCM_ARG5, __FUNCTION__, "number");
-      p = gh_scm2double (padding);
+      SCM_ASSERT_TYPE (ly_number_p (padding), padding, SCM_ARG5, __FUNCTION__, "number");
+      p = ly_scm2double (padding);
     }
   Real m = 0.0;
   if (minimum != SCM_UNDEFINED)
     {
-      SCM_ASSERT_TYPE (gh_number_p (minimum), minimum, SCM_ARG6, __FUNCTION__, "number");
-      m = gh_scm2double (minimum);
+      SCM_ASSERT_TYPE (ly_number_p (minimum), minimum, SCM_ARG6, __FUNCTION__, "number");
+      m = ly_scm2double (minimum);
     }
 
   if (s1)
     result = *s1;
   if (s2)
-    result.add_at_edge (Axis (gh_scm2int (axis)),
-                       Direction (gh_scm2int (direction)), *s2, p, m);
+    result.add_at_edge (Axis (ly_scm2int (axis)),
+                       Direction (ly_scm2int (direction)), *s2, p, m);
 
   return result.smobbed_copy ();
 }
@@ -181,12 +181,12 @@ LY_DEFINE (ly_stencil_add , "ly:stencil-add",
 
   while (!SCM_NULLP (args))
     {
-      Stencil *s = unsmob_stencil (gh_car (args));
+      Stencil *s = unsmob_stencil (ly_car (args));
       if (!s)
-       SCM_ASSERT_TYPE (s, gh_car (args), SCM_ARGn, __FUNCTION__, "Stencil");
+       SCM_ASSERT_TYPE (s, ly_car (args), SCM_ARGn, __FUNCTION__, "Stencil");
 
       result.add_stencil (*s);
-      args = gh_cdr (args);
+      args = ly_cdr (args);
     }
 
   return result.smobbed_copy ();
@@ -238,9 +238,9 @@ LY_DEFINE (ly_align_to_x, "ly:stencil-align-to!",
 {
   SCM_ASSERT_TYPE (unsmob_stencil (stil), stil, SCM_ARG1, __FUNCTION__, "stencil");
   SCM_ASSERT_TYPE (is_axis (axis), axis, SCM_ARG2, __FUNCTION__, "axis");
-  SCM_ASSERT_TYPE (gh_number_p (dir), dir, SCM_ARG3, __FUNCTION__, "number");
+  SCM_ASSERT_TYPE (ly_number_p (dir), dir, SCM_ARG3, __FUNCTION__, "number");
 
-  unsmob_stencil (stil)->align_to ((Axis)gh_scm2int (axis),
-                                  gh_scm2double (dir));
+  unsmob_stencil (stil)->align_to ((Axis)ly_scm2int (axis),
+                                  ly_scm2double (dir));
   return SCM_UNDEFINED;
 }
index dee7a88bc3e029701dd49f0dedcc202e73676c79..6ba60c6b39ea861603a24982621c9140dd273ed4 100644 (file)
@@ -42,7 +42,7 @@ Sustain_pedal::print (SCM smob)
   
   Stencil mol;
   SCM glyph = e->get_property ("text");
-  if (!gh_string_p (glyph))
+  if (!ly_string_p (glyph))
     return mol.smobbed_copy ();
   
   String text = ly_scm2string (glyph);
index 67964f6f492db0672196188cbfa9d0c3d2818942..22e76fb6bf8bc05187dad48d1df2e0d66061db6d 100644 (file)
@@ -48,15 +48,15 @@ System_start_delimiter_engraver::acknowledge_grob (Grob_info inf)
       /*
        UGH UGH
        */
-      if (gh_string_p (gl) && gh_equal_p (gl, scm_makfrom0str  ("brace"))
-         && gh_string_p (my_gl) && gh_equal_p (my_gl, scm_makfrom0str  ("bracket")))
+      if (ly_string_p (gl) && ly_equal_p (gl, scm_makfrom0str  ("brace"))
+         && ly_string_p (my_gl) && ly_equal_p (my_gl, scm_makfrom0str  ("bracket")))
        inf.grob_->translate_axis (-0.8, X_AXIS); // ugh
-      else if (gh_string_p (gl) && gh_equal_p (gl, scm_makfrom0str  ("bracket"))
-              && gh_string_p (my_gl) && gh_equal_p (my_gl, scm_makfrom0str  ("bracket")))
+      else if (ly_string_p (gl) && ly_equal_p (gl, scm_makfrom0str  ("bracket"))
+              && ly_string_p (my_gl) && ly_equal_p (my_gl, scm_makfrom0str  ("bracket")))
        {
          inf.grob_->translate_axis ( -0.8, X_AXIS); // ugh
          inf.grob_->set_property ("arch-height",
-                                      gh_double2scm (gh_scm2double (inf.grob_->get_property
+                                      scm_make_real (ly_scm2double (inf.grob_->get_property
                                        ("arch-height"))+0.5));
        }
     }
index 15d53268e6a305a5f924afdc33980aefcfa47a3b..87be0807b495df920596e3525b698903da087bc9 100644 (file)
 Stencil
 System_start_delimiter::staff_bracket (Grob*me,Real height)  
 {
-  Real arc_height = gh_scm2double (me->get_property ("arch-height")) ;
+  Real arc_height = ly_scm2double (me->get_property ("arch-height")) ;
   
   SCM at = scm_list_n (ly_symbol2scm ("bracket"),
                    me->get_property ("arch-angle"),
                    me->get_property ("arch-width"),
-                   gh_double2scm (arc_height),
-                   gh_double2scm (height),
+                   scm_make_real (arc_height),
+                   scm_make_real (height),
                    me->get_property ("arch-thick"),
                    me->get_property ("thickness"),
                    SCM_UNDEFINED);
@@ -75,7 +75,7 @@ System_start_delimiter::after_line_breaking (SCM smob)
 {
   Grob * me = unsmob_grob (smob);
   SCM   gl = me->get_property ("glyph");
-  if (gh_equal_p (gl,scm_makfrom0str ("bar-line")))
+  if (ly_equal_p (gl,scm_makfrom0str ("bar-line")))
     {
       int count = 0;
 
@@ -84,9 +84,9 @@ System_start_delimiter::after_line_breaking (SCM smob)
       */
       SCM elts = me->get_property ("elements");
       Grob *common = common_refpoint_of_list (elts, me, Y_AXIS);
-      for (SCM s = elts; gh_pair_p (s); s = gh_cdr (s))
+      for (SCM s = elts; ly_pair_p (s); s = ly_cdr (s))
        {
-         Interval v = unsmob_grob (gh_car (s))->extent (common, Y_AXIS);
+         Interval v = unsmob_grob (ly_car (s))->extent (common, Y_AXIS);
 
          if (!v.is_empty ())
            count ++;
@@ -109,13 +109,13 @@ System_start_delimiter::print (SCM smob)
   Grob * me = unsmob_grob (smob);
 
   SCM s = me->get_property ("glyph");
-  if (!gh_string_p (s))
+  if (!ly_string_p (s))
     return SCM_EOL;
   SCM gsym = scm_string_to_symbol (s) ;
   
   Real staff_space = Staff_symbol_referencer::staff_space (me);
   Interval ext = ly_scm2interval (Axis_group_interface::group_extent_callback
- (me->self_scm (), gh_int2scm (Y_AXIS)));
+ (me->self_scm (), scm_int2num (Y_AXIS)));
   Real l = ext.length () / staff_space;
   
   if (ext.is_empty ()
@@ -147,7 +147,7 @@ System_start_delimiter::staff_brace (Grob*me, Real y)
      name.  This is better than using find_font directly,
      esp. because that triggers mktextfm for non-existent
      fonts. */
-  SCM fam = gh_cons (ly_symbol2scm ("font-encoding"), ly_symbol2scm ("braces"));
+  SCM fam = scm_cons (ly_symbol2scm ("font-encoding"), ly_symbol2scm ("braces"));
   
   SCM alist = scm_list_n (fam, SCM_UNDEFINED);
   fm = select_font (me->get_paper (), scm_list_n (alist, SCM_UNDEFINED));
index 94d77d48d34d6cb8a332f66b1087453ab6d4e05d..0c1605d741a6f5f2c602725c04cfa4ef9c1c7764 100644 (file)
@@ -40,9 +40,9 @@ System::spanner_count () const
 {
   int k =0;
   for (SCM s = get_property ("all-elements");
-       gh_pair_p (s); s = ly_cdr (s))
+       ly_pair_p (s); s = ly_cdr (s))
     {
-      if (dynamic_cast<Spanner*> (unsmob_grob (gh_car (s))))
+      if (dynamic_cast<Spanner*> (unsmob_grob (ly_car (s))))
        k++;
     }
 
@@ -112,7 +112,7 @@ System::typeset_grob (Grob * elem)
 static void
 fixup_refpoints (SCM s)
 {
-  for (; gh_pair_p (s); s = ly_cdr (s))
+  for (; ly_pair_p (s); s = ly_cdr (s))
     {
       Grob::fixup_refpoint (ly_car (s));
     }
@@ -121,7 +121,7 @@ fixup_refpoints (SCM s)
 SCM
 System::get_lines ()
 {
-  for (SCM s = get_property ("all-elements"); gh_pair_p (s); s = ly_cdr (s))
+  for (SCM s = get_property ("all-elements"); ly_pair_p (s); s = ly_cdr (s))
     {
       Grob *g = unsmob_grob (ly_car (s));
       if (g->internal_has_interface (ly_symbol2scm ("only-prebreak-interface")))
@@ -149,7 +149,7 @@ System::get_lines ()
     {
       Grob *se = broken_intos_[i];
       SCM all = se->get_property ("all-elements");
-      for (SCM s = all; gh_pair_p (s); s = ly_cdr (s))
+      for (SCM s = all; ly_pair_p (s); s = ly_cdr (s))
        fixup_refpoint (ly_car (s));
       count += scm_ilength (all);
     }
@@ -159,7 +159,7 @@ System::get_lines ()
    */
   fixup_refpoints (get_property ("all-elements"));
 
-  for (SCM s = get_property ("all-elements"); gh_pair_p (s); s = ly_cdr (s))
+  for (SCM s = get_property ("all-elements"); ly_pair_p (s); s = ly_cdr (s))
     unsmob_grob (ly_car (s))->handle_broken_dependencies ();
   handle_broken_dependencies ();
 
@@ -221,7 +221,7 @@ set_loose_columns (System* which, Column_x_positions const *posns)
       do
        {
          SCM between = loose->get_property ("between-cols");
-         if (!gh_pair_p (between))
+         if (!ly_pair_p (between))
            break;
 
 
@@ -316,11 +316,11 @@ System::add_column (Paper_column*p)
 {
   Grob *me = this;
   SCM cs = me->get_property ("columns");
-  Grob * prev =  gh_pair_p (cs) ? unsmob_grob (ly_car (cs)) : 0;
+  Grob * prev =  ly_pair_p (cs) ? unsmob_grob (ly_car (cs)) : 0;
 
   p->rank_ = prev ? Paper_column::get_rank (prev) + 1 : 0; 
 
-  me->set_property ("columns",  gh_cons (p->self_scm (), cs));
+  me->set_property ("columns",  scm_cons (p->self_scm (), cs));
 
   Axis_group_interface::add_element (me, p);
 }
@@ -328,38 +328,38 @@ System::add_column (Paper_column*p)
 void
 System::pre_processing ()
 {
-  for (SCM s = get_property ("all-elements"); gh_pair_p (s); s = ly_cdr (s))
+  for (SCM s = get_property ("all-elements"); ly_pair_p (s); s = ly_cdr (s))
     unsmob_grob (ly_car (s))->discretionary_processing ();
 
   if (verbose_global_b)
     progress_indication (_f ("Grob count %d",  element_count ()));
 
   
-  for (SCM s = get_property ("all-elements"); gh_pair_p (s); s = ly_cdr (s))
+  for (SCM s = get_property ("all-elements"); ly_pair_p (s); s = ly_cdr (s))
     unsmob_grob (ly_car (s))->handle_prebroken_dependencies ();
   
   fixup_refpoints (get_property ("all-elements"));
   
-  for (SCM s = get_property ("all-elements"); gh_pair_p (s); s = ly_cdr (s))
+  for (SCM s = get_property ("all-elements"); ly_pair_p (s); s = ly_cdr (s))
     {
       Grob* sc = unsmob_grob (ly_car (s));
       sc->calculate_dependencies (PRECALCED, PRECALCING, ly_symbol2scm ("before-line-breaking-callback"));
     }
   
   progress_indication ("\n" + _ ("Calculating line breaks...") + " ");
-  for (SCM s = get_property ("all-elements"); gh_pair_p (s); s = ly_cdr (s))
+  for (SCM s = get_property ("all-elements"); ly_pair_p (s); s = ly_cdr (s))
     {
       Grob * e = unsmob_grob (ly_car (s));
       SCM proc = e->get_property ("spacing-procedure");
-      if (gh_procedure_p (proc))
-       gh_call1 (proc, e->self_scm ());
+      if (ly_procedure_p (proc))
+       scm_call_1 (proc, e->self_scm ());
     }
 }
 
 void
 System::post_processing ()
 {
-  for (SCM s = get_property ("all-elements"); gh_pair_p (s); s = ly_cdr (s))
+  for (SCM s = get_property ("all-elements"); ly_pair_p (s); s = ly_cdr (s))
     {
       Grob *g = unsmob_grob (ly_car (s));
       g->calculate_dependencies (POSTCALCED, POSTCALCING,
@@ -379,7 +379,7 @@ System::post_processing ()
   all = uniquify_list (all);
 
   this->get_stencil ();
-  for (SCM s = all; gh_pair_p (s); s = ly_cdr (s))
+  for (SCM s = all; ly_pair_p (s); s = ly_cdr (s))
     {
       Grob *g = unsmob_grob (ly_car (s));
       g->get_stencil ();
@@ -404,7 +404,7 @@ System::get_line ()
   SCM all = get_property ("all-elements");
   
   for (int i = LAYER_COUNT; i--;)
-    for (SCM s = all; gh_pair_p (s); s = ly_cdr (s))
+    for (SCM s = all; ly_pair_p (s); s = ly_cdr (s))
       {
        Grob *g = unsmob_grob (ly_car (s));
        Stencil *stil = g->get_stencil ();
@@ -437,7 +437,7 @@ System::get_line ()
       
       SCM between = ly_symbol2scm ("between-system-string");
       SCM inter = g->internal_get_property (between);
-      if (gh_string_p (inter))
+      if (ly_string_p (inter))
        stencils = scm_cons (scm_cons (between, inter), stencils);
     }
 
@@ -459,13 +459,13 @@ System::broken_col_range (Item const*l, Item const*r) const
   r = r->get_column ();
   SCM s = get_property ("columns");
 
-  while (gh_pair_p (s) && ly_car (s) != r->self_scm ())
+  while (ly_pair_p (s) && ly_car (s) != r->self_scm ())
     s = ly_cdr (s);
 
-  if (gh_pair_p (s))
+  if (ly_pair_p (s))
     s = ly_cdr (s);
 
-  while (gh_pair_p (s) && ly_car (s) != l->self_scm ())
+  while (ly_pair_p (s) && ly_car (s) != l->self_scm ())
     {
       Paper_column*c = dynamic_cast<Paper_column*> (unsmob_grob (ly_car (s)));
       if (Item::is_breakable (c) && !c->system_)
index e091d633845e4f36d18f86dcf87aa3c8a218477d..b1cb9dbcc07c70eda1ddf67f0aa7c6960a9b8328 100644 (file)
@@ -70,7 +70,7 @@ Tab_note_heads_engraver::process_music ()
   for (int i=0; i < note_events_.size (); i++)
     {
       SCM stringTunings = get_property ("stringTunings");
-      int number_of_strings = ((int) gh_length (stringTunings));
+      int number_of_strings = ((int) ly_length (stringTunings));
       bool high_string_one = to_boolean (get_property ("highStringOne"));
 
       Item * note  = make_item ("TabNoteHead");
@@ -81,9 +81,9 @@ Tab_note_heads_engraver::process_music ()
       Music * tabstring_event=0;
 
       for (SCM s =event->get_property ("articulations");
-          !tabstring_event && gh_pair_p (s); s = gh_cdr (s))
+          !tabstring_event && ly_pair_p (s); s = ly_cdr (s))
        {
-         Music * art = unsmob_music (gh_car (s));
+         Music * art = unsmob_music (ly_car (s));
 
          if (art->is_mus_type ("string-number-event"))
            tabstring_event = art;
@@ -100,7 +100,7 @@ Tab_note_heads_engraver::process_music ()
       bool string_found;
       if (tabstring_event)
        {
-         tab_string = gh_scm2int (tabstring_event->get_property ("string-number"));
+         tab_string = ly_scm2int (tabstring_event->get_property ("string-number"));
          string_found = true;
        }
       else
@@ -111,7 +111,7 @@ Tab_note_heads_engraver::process_music ()
       
       Duration dur = *unsmob_duration (event->get_property ("duration"));
       note->set_property ("duration-log",
-                              gh_int2scm (dur.duration_log ()));
+                              scm_int2num (dur.duration_log ()));
 
       if (dur.dot_count ())
        {
@@ -119,8 +119,8 @@ Tab_note_heads_engraver::process_music ()
          Rhythmic_head::set_dots (note, d);
          
          if (dur.dot_count ()
-             != gh_scm2int (d->get_property ("dot-count")))
-           d->set_property ("dot-count", gh_int2scm (dur.dot_count ()));
+             != ly_scm2int (d->get_property ("dot-count")))
+           d->set_property ("dot-count", scm_int2num (dur.dot_count ()));
 
          d->set_parent (note, Y_AXIS);
          announce_grob (d, SCM_EOL);
@@ -131,19 +131,19 @@ 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 = gh_number_p (min_fret_scm) ? gh_scm2int (min_fret_scm) : 0;
+      int min_fret = ly_number_p (min_fret_scm) ? ly_scm2int (min_fret_scm) : 0;
 
       while (!string_found)
        {
          int fret = unsmob_pitch (scm_pitch)->semitone_pitch ()
-           - gh_scm2int (gh_list_ref (stringTunings,gh_int2scm (tab_string-1)));
+           - ly_scm2int (scm_list_ref (stringTunings,scm_int2num (tab_string-1)));
          if (fret<min_fret)
            tab_string += high_string_one ? 1 : -1;
          else
            string_found = true;
        }
 
-      SCM text = gh_call3 (proc, gh_int2scm (tab_string), stringTunings, scm_pitch);
+      SCM text = scm_call_3 (proc, scm_int2num (tab_string), stringTunings, scm_pitch);
 
       int pos = 2 * tab_string - number_of_strings - 1; // No tab-note between the string !!!
       if (to_boolean (get_property ("stringOneTopmost")))
@@ -151,7 +151,7 @@ Tab_note_heads_engraver::process_music ()
       
       note->set_property ("text", text);      
       
-      note->set_property ("staff-position", gh_int2scm (pos));
+      note->set_property ("staff-position", scm_int2num (pos));
       announce_grob (note, event->self_scm ());
       notes_.push (note);
     }
index 80821732e79920ae0b2a48618d45307e4707bae4..2e5406bbed34d7ac2e956509692fb54fb30cf5c2 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 (gh_scm2int (met))).main_part_;
+      Rational r =  (d->get_length () / Moment (Rational (1, 4)) * Moment (ly_scm2int (met))).main_part_;
       
       audio_ = new Audio_tempo (int (r));
 
index 09e1ab073c7102335cae5eee224d388799891fe2..2da7fbe8e5c2d360dd6910b63325e4aff53a2dff 100644 (file)
@@ -93,13 +93,13 @@ Text_engraver::process_acknowledged_grobs ()
       // Hmm
       int priority = 200;
       SCM s = text->get_property ("script-priority");
-      if (gh_number_p (s))
-       priority = gh_scm2int (s);
+      if (ly_number_p (s))
+       priority = ly_scm2int (s);
       
       /* see script-engraver.cc */
       priority += i;
       
-      text->set_property ("script-priority", gh_int2scm (priority));
+      text->set_property ("script-priority", scm_int2num (priority));
 
       Direction dir = to_dir (r->get_property ("direction"));
       if (dir)
index c4b2eb522c067f5c52221e4899607740341403c4..c767c2d5ccdf5928846aa9f9d7755c9549563969 100644 (file)
@@ -20,7 +20,7 @@ MAKE_SCHEME_CALLBACK (Text_item, interpret_markup, 3)
 SCM
 Text_item::interpret_markup (SCM paper, SCM props, SCM markup)
 {
-  if (gh_string_p (markup))
+  if (ly_string_p (markup))
     {
       String str = ly_scm2string (markup);
       
@@ -44,10 +44,10 @@ Text_item::interpret_markup (SCM paper, SCM props, SCM markup)
       
       return Stencil (b, lst).smobbed_copy ();
     }
-  else if (gh_pair_p (markup))
+  else if (ly_pair_p (markup))
     {
-      SCM func = gh_car (markup);
-      SCM args = gh_cdr (markup);
+      SCM func = ly_car (markup);
+      SCM args = ly_cdr (markup);
       if (!markup_p (markup))
        programming_error ("Markup head has no markup signature.");
       
@@ -75,9 +75,9 @@ bool
 Text_item::markup_p (SCM x)
 {
   return
-    gh_string_p (x) ||
-    (gh_pair_p (x)
-     && SCM_BOOL_F != scm_object_property (gh_car (x), ly_symbol2scm ("markup-signature")));
+    ly_string_p (x) ||
+    (ly_pair_p (x)
+     && SCM_BOOL_F != scm_object_property (ly_car (x), ly_symbol2scm ("markup-signature")));
 }
 
 ADD_INTERFACE (Text_item,"text-interface",
index e7e75c3351c4bf29bbde4469b921046dd0a1eae4..41bef9c54c4c29738c9dbc1cb1056e7dc561d91e 100644 (file)
@@ -68,11 +68,11 @@ Text_spanner::print (SCM smob)
            span_points[d] = b->extent (common, X_AXIS).linear_combination (d * encl);
 
            if (is_number_pair (shorten))
-             span_points -= d * gh_scm2double (index_get_cell (shorten, d));
+             span_points -= d * ly_scm2double (index_get_cell (shorten, d));
          }
       
       if (is_number_pair (flare))
-       span_points -= d * gh_scm2double (index_get_cell (flare, d));
+       span_points -= d * ly_scm2double (index_get_cell (flare, d));
     }
   while (flip (&d) != LEFT);
 
@@ -80,7 +80,7 @@ Text_spanner::print (SCM smob)
   SCM properties = Font_interface::text_font_alist_chain (me);
   SCM edge_text = me->get_property ("edge-text");
   Drul_array<Stencil> edge;
-  if (gh_pair_p (edge_text))
+  if (ly_pair_p (edge_text))
     {
       Direction d = LEFT;
       do
@@ -112,7 +112,7 @@ Text_spanner::print (SCM smob)
          
          Real dx = 0.0;
          if (is_number_pair (flare))
-           dx = gh_scm2double (index_get_cell (flare, d)) * d;
+           dx = ly_scm2double (index_get_cell (flare, d)) * d;
 
          Real dy = - dir * edge_height[d] ;
          if (dy)
index f5cb273494ebd6e9a4bdaa3258417c0bb5213ac2..3b06ed338ceb984dc6e28626da9d1f7a65d52322 100644 (file)
@@ -128,9 +128,9 @@ Tex_font_metric::name_to_index (String s) const
   SCM sym = ly_symbol2scm (s.to_str0 ());
 
   SCM idx = scm_hash_ref (encoding_table_, sym, SCM_BOOL_F);
-  if (gh_char_p (idx))
+  if (ly_char_p (idx))
     {
-      return (unsigned char) gh_scm2char (idx);
+      return (unsigned char) ly_scm2char (idx);
     }
   else
     return -1;  
index a1df498c98f356877b2cf7a56c44538167b20819..9aabfa887e41ef5d1f5c9a0e8d2b7efec1afa68c 100644 (file)
@@ -94,7 +94,7 @@ Tie_engraver::acknowledge_grob (Grob_info i)
            maybe should check positions too.
           */
          if (right_mus && left_mus
-             && gh_equal_p (right_mus->get_property ("pitch"),
+             && ly_equal_p (right_mus->get_property ("pitch"),
                             left_mus->get_property ("pitch")))
            {
              Grob * p = make_spanner ("Tie");
@@ -124,7 +124,7 @@ void
 Tie_engraver::start_translation_timestep ()
 {
   daddy_context_->set_property ("tieMelismaBusy",
-                             gh_bool2scm (heads_to_tie_.size ()));
+                             ly_bool2scm (heads_to_tie_.size ()));
       
 }
 
index c5e70cabb163cdc87f5629e31a69b2601ff0e2a9..eeb0a37ec39ff9c2f383f25d6d616d2dafc6f1e3 100644 (file)
@@ -74,7 +74,7 @@ Tie_performer::acknowledge_audio_element (Audio_element_info inf)
          Music * left_mus = heads_to_tie_[i].event_;
 
          if (right_mus && left_mus
-             && gh_equal_p (right_mus->get_property ("pitch"),
+             && ly_equal_p (right_mus->get_property ("pitch"),
                             left_mus->get_property ("pitch")))
            {
              an->tie_to (th);
@@ -88,7 +88,7 @@ void
 Tie_performer::start_translation_timestep ()
 {
   daddy_context_->set_property ("tieMelismaBusy",
-                             gh_bool2scm (heads_to_tie_.size ()));
+                             ly_bool2scm (heads_to_tie_.size ()));
       
 }
 
index 92daec75b10d6f4cdb7e2208d8576b08fb3b9cb1..45fa3459b2bb049749aaafaa1e5358ac69382237 100644 (file)
@@ -50,7 +50,7 @@ Tie::set_head (Grob*me,Direction d, Grob * h)
 void
 Tie::set_interface (Grob*me)
 {
-  me->set_property ("head-pair", gh_cons (SCM_EOL, SCM_EOL));
+  me->set_property ("head-pair", scm_cons (SCM_EOL, SCM_EOL));
 }
 
 
@@ -59,7 +59,7 @@ Tie::head (Grob*me, Direction d)
 {
   SCM c = me->get_property ("head-pair");
 
-  if (gh_pair_p (c))
+  if (ly_pair_p (c))
     return unsmob_grob (index_get_cell (c, d));
   else
     return 0;
@@ -206,8 +206,8 @@ Tie::get_control_points (SCM smob)
   SCM lim // groetjes aan de chirurgendochter.
     = scm_assq (ly_symbol2scm ("height-limit"),details);
   
-  Real h_inf = gh_scm2double (ly_cdr (lim)) *  staff_space;
-  Real r_0 = gh_scm2double (ly_cdr (scm_assq (ly_symbol2scm ("ratio"),details)));
+  Real h_inf = ly_scm2double (ly_cdr (lim)) *  staff_space;
+  Real r_0 = ly_scm2double (ly_cdr (scm_assq (ly_symbol2scm ("ratio"),details)));
 
   Bezier b  = slur_shape (width, h_inf, r_0);
   
@@ -220,7 +220,7 @@ Tie::get_control_points (SCM smob)
   */
 
   Real ypos = Tie::get_position (me) * staff_space/2
-    + dir * gh_scm2double (me->get_property ("y-offset"));;
+    + dir * ly_scm2double (me->get_property ("y-offset"));;
 
   /*
     Make sure we don't start on a dots
@@ -268,7 +268,7 @@ Tie::get_control_points (SCM smob)
       Real diff = ry - y;
       Real newy = y;
 
-      Real clear = staff_space * gh_scm2double (me->get_property ("staffline-clearance"));
+      Real clear = staff_space * ly_scm2double (me->get_property ("staffline-clearance"));
 
       if (fabs (y) <=
          Staff_symbol_referencer::staff_radius (me) * staff_space + clear
@@ -314,7 +314,7 @@ Tie::get_control_points (SCM smob)
 
   SCM controls = SCM_EOL;
   for (int i= 4; i--;)
-    controls = gh_cons (ly_offset2scm (b.control_[i]), controls);
+    controls = scm_cons (ly_offset2scm (b.control_[i]), controls);
   return controls;
 }
 
@@ -326,13 +326,13 @@ Tie::print (SCM smob)
   Grob*me = unsmob_grob (smob);
 
   SCM cp = me->get_property ("control-points");
-  if (!gh_pair_p (cp))         // list is more accurate
+  if (!ly_pair_p (cp))         // list is more accurate
     {
       cp = get_control_points (smob);
       me->set_property ("control-points", cp);
     }
 
-  if (!gh_pair_p (cp))
+  if (!ly_pair_p (cp))
     return Stencil ().smobbed_copy ();
   
   Real thick
index 017dd42b7bea566146f464a293f6bbc5cf40716a..dcbad886281a2729f0fd3abf400df55550072eb5 100644 (file)
@@ -44,9 +44,9 @@ Time_signature_engraver::process_music ()
   SCM fr= get_property ("timeSignatureFraction");
   if (!time_signature_
       && last_time_fraction_ != fr
-      && gh_pair_p (fr))
+      && ly_pair_p (fr))
     {
-      int den = gh_scm2int (gh_cdr (fr));
+      int den = ly_scm2int (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,
-                     gh_scm2int (gh_car (fr))
+                     ly_scm2int (ly_car (fr))
                      ));
        }
   
index 2bc27ef5565a9c20a8dbf8513ec331f9863d95ac..4cc3a96b9674fe6044d697238c22da7c2cac5a32 100644 (file)
@@ -44,11 +44,11 @@ void
 Time_signature_performer::create_audio_elements ()
 {
   SCM fr = get_property ("timeSignatureFraction");
-  if (gh_pair_p (fr) && !gh_equal_p (fr, prev_fraction_))
+  if (ly_pair_p (fr) && !ly_equal_p (fr, prev_fraction_))
     {
       prev_fraction_ = fr;
-      int b = gh_scm2int (ly_car (fr));
-      int o = gh_scm2int (ly_cdr (fr));
+      int b = ly_scm2int (ly_car (fr));
+      int o = ly_scm2int (ly_cdr (fr));
       
       audio_ = new Audio_time_signature (b,o);
       Audio_element_info info (audio_, 0);
index be45079d32b51e6a42f084ef7197f6df791b692b..99f48a884c461fe8aca47496d24528c6c899c299 100644 (file)
@@ -34,14 +34,14 @@ Time_signature::print (SCM smob)
   SCM frac = me->get_property ("fraction");
   int n = 4;
   int d = 4;
-  if (gh_pair_p (frac))
+  if (ly_pair_p (frac))
     {
-      n = gh_scm2int (ly_car (frac));
-      d = gh_scm2int (ly_cdr (frac));
+      n = ly_scm2int (ly_car (frac));
+      d = ly_scm2int (ly_cdr (frac));
     }
 
   Stencil m;
-  if (gh_symbol_p (st))
+  if (ly_symbol_p (st))
     {
       String style (ly_scm2string (scm_symbol_to_string (st)));
       if (style[0]=='1')
@@ -101,7 +101,7 @@ Stencil
 Time_signature::numbered_time_signature (Grob*me,int num, int den)
 {
   SCM chain = me->get_property_alist_chain (Font_interface::text_font_alist_chain (me));
-  chain = scm_cons (scm_list_1 (gh_cons (ly_symbol2scm ("font-encoding"),
+  chain = scm_cons (scm_list_1 (scm_cons (ly_symbol2scm ("font-encoding"),
                                         ly_symbol2scm ("number"))),
                    chain);
                                
index 78b56d44a927c5486dd328352fa8c35ef3fd04ec..0a500dd86979c2c3220463e3b34836c3f92c2d05 100644 (file)
@@ -45,7 +45,7 @@ Timing_engraver::initialize ()
   Moment now = now_mom ();
   
   /* Set the first bar of the score? */
-  if (!gh_string_p (which))
+  if (!ly_string_p (which))
     which = (now.main_part_ || now.main_part_ == last_moment_.main_part_)
       ? SCM_EOL : scm_makfrom0str ("|");
 
@@ -63,7 +63,7 @@ Timing_engraver::start_translation_timestep ()
   SCM which = get_property ("whichBar");
 
   /* Set the first bar of the score? */
-  if (!gh_string_p (which))
+  if (!ly_string_p (which))
     which = SCM_EOL;
 
   Moment mp = measure_position ();
@@ -77,7 +77,7 @@ Timing_engraver::start_translation_timestep ()
        ->set_property ("measure-length", mlen.smobbed_copy ()); 
     }
   
-  if (!gh_string_p (which) && to_boolean (automatic_bars))
+  if (!ly_string_p (which) && to_boolean (automatic_bars))
     {
       SCM always = get_property ("barAlways");
 
index 10d09d3d9a4aa3798702718c65a3f44b22dc4f72..e7f56fc63c5d08eece335c5e7eb82fcf30cd05d4 100644 (file)
@@ -51,10 +51,10 @@ Timing_translator::initialize ()
    */
   daddy_context_->add_alias (ly_symbol2scm ("Timing"));
   daddy_context_->set_property ("timing" , SCM_BOOL_T);  
-  daddy_context_->set_property ("currentBarNumber" , gh_int2scm (1));
+  daddy_context_->set_property ("currentBarNumber" , scm_int2num (1));
 
   daddy_context_->set_property ("timeSignatureFraction",
-                               gh_cons (gh_int2scm (4), gh_int2scm (4)));
+                               scm_cons (scm_int2num (4), scm_int2num (4)));
   /*
     Do not init measurePosition; this should be done from global
     context.
@@ -133,9 +133,9 @@ Timing_translator::start_translation_timestep ()
   
   SCM barn = get_property ("currentBarNumber");
   int b = 0;
-  if (gh_number_p (barn))
+  if (ly_number_p (barn))
     {
-      b = gh_scm2int (barn);
+      b = ly_scm2int (barn);
     }
 
   SCM cad = get_property ("timing");
@@ -148,7 +148,7 @@ Timing_translator::start_translation_timestep ()
       b ++;
     }
 
-  daddy_context_->set_property ("currentBarNumber", gh_int2scm (b));
+  daddy_context_->set_property ("currentBarNumber", scm_int2num (b));
   daddy_context_->set_property ("measurePosition", measposp.smobbed_copy ());
 }
 
index 654d90899bda3333e88bcafc43839b0aa179cfda..eca1adefd23cb1fdf1dbc2c10fa5757725cf3ee2 100644 (file)
@@ -22,9 +22,9 @@ LY_DEFINE (get_all_translators,"ly:get-all-translators", 0, 0, 0,  (),
 {
   SCM l = global_translator_dict ?  global_translator_dict->to_alist () : SCM_EOL;
 
-  for (SCM s =l; gh_pair_p (s); s = gh_cdr (s))
+  for (SCM s =l; ly_pair_p (s); s = ly_cdr (s))
     {
-      gh_set_car_x (s, gh_cdar (s));
+      scm_set_car_x (s, ly_cdar (s));
     }
 
   return l;
index 0d09e91e7df99885fbb50f65cc4b272a151d7204..6ea96d4efaf3cdc2e59a3a54c89a72f4ea4259d0 100644 (file)
@@ -29,7 +29,7 @@ Translator_group::get_daddy_translator () const
 void
 translator_each (SCM list, Translator_method method)
 {
-  for (SCM p = list; gh_pair_p (p); p = ly_cdr (p))
+  for (SCM p = list; ly_pair_p (p); p = ly_cdr (p))
     (unsmob_translator (ly_car (p))->*method) ();
 }
 
@@ -37,7 +37,7 @@ translator_each (SCM list, Translator_method method)
 void
 Translator_group::initialize ()
 {
-  SCM tab = scm_make_vector (gh_int2scm (19), SCM_BOOL_F);
+  SCM tab = scm_make_vector (scm_int2num (19), SCM_BOOL_F);
   daddy_context_->set_property ("acceptHashTable", tab);
 }
 
@@ -47,7 +47,7 @@ translator_accepts_any_of (Translator*tr, SCM ifaces)
 {
   SCM ack_ifs = scm_assoc (ly_symbol2scm ("events-accepted"),
                           tr->translator_description ());
-  ack_ifs = gh_cdr (ack_ifs);
+  ack_ifs = ly_cdr (ack_ifs);
   for (SCM s = ifaces; ly_pair_p (s); s = ly_cdr (s))
     if (scm_c_memq (ly_car (s), ack_ifs) != SCM_BOOL_F)
       return true;
@@ -76,10 +76,10 @@ Translator_group::try_music (Music* m)
   SCM name = scm_sloppy_assq (ly_symbol2scm ("name"),
                              m->get_property_alist (false));
 
-  if (!gh_pair_p (name))
+  if (!ly_pair_p (name))
     return false;
 
-  name = gh_cdr (name);
+  name = ly_cdr (name);
   SCM accept_list = scm_hashq_ref (tab, name, SCM_UNDEFINED);
   if (accept_list == SCM_BOOL_F)
     {
@@ -88,7 +88,7 @@ Translator_group::try_music (Music* m)
       scm_hashq_set_x (tab, name, accept_list);
     }
 
-  for (SCM p = accept_list; gh_pair_p (p); p = ly_cdr (p))
+  for (SCM p = accept_list; ly_pair_p (p); p = ly_cdr (p))
     {
       Translator * t = unsmob_translator (ly_car (p));
       if (t && t->try_music (m))
@@ -101,7 +101,7 @@ SCM
 names_to_translators (SCM namelist, Context*tg)
 {
   SCM l = SCM_EOL;
-  for (SCM s = namelist; gh_pair_p (s) ; s = ly_cdr (s))
+  for (SCM s = namelist; ly_pair_p (s) ; s = ly_cdr (s))
     {
       Translator * t = get_translator (ly_car (s));
       if (!t)
@@ -110,7 +110,7 @@ names_to_translators (SCM namelist, Context*tg)
        {
          Translator * tr = t->clone ();
          SCM str = tr->self_scm ();
-         l = gh_cons (str, l);
+         l = scm_cons (str, l);
 
          tr->daddy_context_ = tg;
          scm_gc_unprotect_object (str);
@@ -144,10 +144,10 @@ recurse_over_translators (Context * c, Translator_method ptr, Direction dir)
       (tg->*ptr) ();
     }
 
-  for (SCM s = c->context_list_ ; gh_pair_p (s);
-       s =gh_cdr (s))
+  for (SCM s = c->context_list_ ; ly_pair_p (s);
+       s =ly_cdr (s))
     {
-      recurse_over_translators (unsmob_context (gh_car (s)), ptr, dir);
+      recurse_over_translators (unsmob_context (ly_car (s)), ptr, dir);
     }
 
   if (dir == UP)
index de977343fc295dbf282c3d726dc1aed55b871879..0ccb82c897050a2537757adefdcdcfdbb7bae11d 100644 (file)
@@ -32,7 +32,7 @@ void
 execute_pushpop_property (Context * trg,
                          SCM prop, SCM eltprop, SCM val)
 {
-  if (gh_symbol_p (prop) && gh_symbol_p (eltprop))
+  if (ly_symbol_p (prop) && ly_symbol_p (eltprop))
     {
       if (val != SCM_UNDEFINED)
        {
@@ -48,21 +48,21 @@ execute_pushpop_property (Context * trg,
          if (where != trg)
            {
              SCM base = updated_grob_properties (trg, prop);
-             prev = gh_cons (base, base); 
+             prev = scm_cons (base, base); 
              trg->internal_set_property (prop, prev);
            }
          else
            prev = trg->internal_get_property (prop);
          
-         if (!gh_pair_p (prev))
+         if (!ly_pair_p (prev))
            {
              programming_error ("Grob definition should be cons.");
              return ;
            }
 
-         SCM prev_alist = gh_car (prev);
+         SCM prev_alist = ly_car (prev);
          
-         if (gh_pair_p (prev_alist) || prev_alist == SCM_EOL)
+         if (ly_pair_p (prev_alist) || prev_alist == SCM_EOL)
            {
              bool ok = type_check_assignment (eltprop, val, ly_symbol2scm ("backend-type?"));
 
@@ -70,7 +70,7 @@ execute_pushpop_property (Context * trg,
               tack onto alist:
              */
              if (ok)
-               gh_set_car_x (prev, scm_acons (eltprop, val, prev_alist));
+               scm_set_car_x (prev, scm_acons (eltprop, val, prev_alist));
            }
          else
            {
@@ -80,24 +80,24 @@ execute_pushpop_property (Context * trg,
       else if (trg->where_defined (prop) == trg)
        {
          SCM prev = trg->internal_get_property (prop);
-         SCM prev_alist = gh_car (prev);
-         SCM daddy = gh_cdr (prev);
+         SCM prev_alist = ly_car (prev);
+         SCM daddy = ly_cdr (prev);
          
          SCM new_alist = SCM_EOL;
          SCM *tail = &new_alist;
 
          while (prev_alist != daddy)
            {
-             if (gh_equal_p (gh_caar (prev_alist), eltprop))
+             if (ly_equal_p (ly_caar (prev_alist), eltprop))
                {
-                 prev_alist = gh_cdr (prev_alist);
+                 prev_alist = ly_cdr (prev_alist);
                  break ;
                }
 
              
-             *tail = gh_cons (gh_car (prev_alist), SCM_EOL);
+             *tail = scm_cons (ly_car (prev_alist), SCM_EOL);
              tail = SCM_CDRLOC (*tail);
-             prev_alist = gh_cdr (prev_alist);
+             prev_alist = ly_cdr (prev_alist);
            }
 
          if (new_alist == SCM_EOL && prev_alist == daddy)
@@ -105,7 +105,7 @@ execute_pushpop_property (Context * trg,
          else
            {
              *tail = prev_alist;
-             trg->internal_set_property (prop, gh_cons (new_alist, daddy));
+             trg->internal_set_property (prop, scm_cons (new_alist, daddy));
            }
        }
     }
@@ -124,7 +124,7 @@ void
 apply_property_operations (Context *tg, SCM pre_init_ops)
 {
   SCM correct_order = scm_reverse (pre_init_ops);
-  for (SCM s = correct_order; gh_pair_p (s); s = ly_cdr (s))
+  for (SCM s = correct_order; ly_pair_p (s); s = ly_cdr (s))
     {
       SCM entry = ly_car (s);
       SCM type = ly_car (entry);
@@ -133,7 +133,7 @@ apply_property_operations (Context *tg, SCM pre_init_ops)
       if (type == ly_symbol2scm ("push") || type == ly_symbol2scm ("poppush"))
        {
          SCM val = ly_cddr (entry);
-         val = gh_pair_p (val) ? ly_car (val) : SCM_UNDEFINED;
+         val = ly_pair_p (val) ? ly_car (val) : SCM_UNDEFINED;
 
          execute_pushpop_property (tg, ly_car (entry), ly_cadr (entry), val);
        }
@@ -151,7 +151,7 @@ apply_property_operations (Context *tg, SCM pre_init_ops)
 SCM
 updated_grob_properties (Context * tg, SCM sym)
 {
-  assert (gh_symbol_p (sym));
+  assert (ly_symbol_p (sym));
   
   tg = tg->where_defined (sym);
   if (!tg)
@@ -164,25 +164,25 @@ updated_grob_properties (Context * tg, SCM sym)
   
   SCM props  = tg->internal_get_property (sym);
 
-  if (!gh_pair_p (props))
+  if (!ly_pair_p (props))
     {
       programming_error ("grob props not a pair?");
       return SCM_EOL;
     }
 
-  SCM based_on = gh_cdr (props);
+  SCM based_on = ly_cdr (props);
   if (based_on == daddy_props)
     {
-      return gh_car (props);
+      return ly_car (props);
     }
   else
     {
       SCM copy = daddy_props;
       SCM * tail = &copy;
-      SCM p = gh_car (props);
+      SCM p = ly_car (props);
       while  (p != based_on)
        {
-         *tail = gh_cons (gh_car (p), daddy_props);
+         *tail = scm_cons (ly_car (p), daddy_props);
          tail = SCM_CDRLOC (*tail);
          p = SCM_CDR (p);
        }
index b75b602b5434c74dd0ebc64ff08be44572387861..abca879039d4935d599125ed34b330ee91c8bda2 100644 (file)
@@ -114,7 +114,7 @@ Tuplet_bracket::print (SCM smob)
     SCM lp = me->get_property ("left-position");
     SCM rp = me->get_property ("right-position");  
 
-    if (!gh_number_p (rp) || !gh_number_p (lp))
+    if (!ly_number_p (rp) || !ly_number_p (lp))
       after_line_breaking (smob);
   }
   
@@ -133,17 +133,17 @@ Tuplet_bracket::print (SCM smob)
     Fixme: the type of this prop is sucky.
    */
   SCM bracket = me->get_property ("bracket-visibility");
-  if (gh_boolean_p (bracket))
+  if (ly_boolean_p (bracket))
     {
-      bracket_visibility = gh_scm2bool (bracket);
+      bracket_visibility = ly_scm2bool (bracket);
     }
   else if (bracket == ly_symbol2scm ("if-no-beam"))
     bracket_visibility = !par_beam;
 
   SCM numb = me->get_property ("number-visibility");  
-  if (gh_boolean_p (numb))
+  if (ly_boolean_p (numb))
     {
-      number_visibility = gh_scm2bool (numb);
+      number_visibility = ly_scm2bool (numb);
     }
   else if (numb == ly_symbol2scm ("if-no-beam"))
     number_visibility = !par_beam;
@@ -170,7 +170,7 @@ Tuplet_bracket::print (SCM smob)
 
   Paper_def *pap = me->get_paper ();
   Stencil num;
- if (gh_string_p (number) && number_visibility)
+ if (ly_string_p (number) && number_visibility)
     {
       SCM properties = Font_interface::text_font_alist_chain (me);
       SCM snum = Text_item::interpret_markup (pap->self_scm (), properties, number);
@@ -213,11 +213,11 @@ Tuplet_bracket::print (SCM smob)
       do {
        flare[d] =  height[d] = shorten[d] = 0.0;
        if (is_number_pair (fl))
-         flare[d] +=  ss * gh_scm2double (index_get_cell (fl, d));
+         flare[d] +=  ss * ly_scm2double (index_get_cell (fl, d));
        if (is_number_pair (eh))
-         height[d] +=  - dir * ss *gh_scm2double (index_get_cell (eh, d));
+         height[d] +=  - dir * ss *ly_scm2double (index_get_cell (eh, d));
        if (is_number_pair (sp))
-         shorten[d] +=  ss *gh_scm2double (index_get_cell (sp, d));
+         shorten[d] +=  ss *ly_scm2double (index_get_cell (sp, d));
       }
       while (flip (&d) != LEFT);
       
@@ -383,7 +383,7 @@ Tuplet_bracket::calc_position_and_height (Grob*me,Real *offset, Real * dy)
     }
 
   // padding
-  *offset +=  gh_scm2double (me->get_property ("padding")) *dir;
+  *offset +=  ly_scm2double (me->get_property ("padding")) *dir;
 
   
   /*
@@ -473,13 +473,13 @@ Tuplet_bracket::after_line_breaking (SCM smob)
     {
       SCM ps =  par_beam->get_property ("positions"); 
 
-      Real lp = gh_scm2double (gh_car (ps));
-      Real rp = gh_scm2double (gh_cdr (ps));
+      Real lp = ly_scm2double (ly_car (ps));
+      Real rp = ly_scm2double (ly_cdr (ps));
 
       /*
        duh. magic.
        */
-      offset = lp + dir * (0.5 + gh_scm2double (me->get_property ("padding")));
+      offset = lp + dir * (0.5 + ly_scm2double (me->get_property ("padding")));
       dy = rp- lp;
     }
   
@@ -487,18 +487,18 @@ Tuplet_bracket::after_line_breaking (SCM smob)
   SCM lp =  me->get_property ("left-position");
   SCM rp = me->get_property ("right-position");  
   
-  if (gh_number_p (lp) && !gh_number_p (rp))
+  if (ly_number_p (lp) && !ly_number_p (rp))
     {
-      rp = gh_double2scm (gh_scm2double (lp) + dy);
+      rp = scm_make_real (ly_scm2double (lp) + dy);
     }
-  else if (gh_number_p (rp) && !gh_number_p (lp))
+  else if (ly_number_p (rp) && !ly_number_p (lp))
     {
-      lp = gh_double2scm (gh_scm2double (rp) - dy);
+      lp = scm_make_real (ly_scm2double (rp) - dy);
     }
-  else if (!gh_number_p (rp) && !gh_number_p (lp))
+  else if (!ly_number_p (rp) && !ly_number_p (lp))
     {
-      lp = gh_double2scm (offset);
-      rp = gh_double2scm (offset +dy);
+      lp = scm_make_real (offset);
+      rp = scm_make_real (offset +dy);
     }
 
   me->set_property ("left-position", lp);
@@ -515,7 +515,7 @@ Direction
 Tuplet_bracket::get_default_dir (Grob*me)
 {
   Drul_array<int> dirs (0,0);  
-  for (SCM s = me->get_property ("note-columns"); gh_pair_p (s); s = ly_cdr (s))
+  for (SCM s = me->get_property ("note-columns"); ly_pair_p (s); s = ly_cdr (s))
     {
       Grob * nc = unsmob_grob (ly_car (s));
       Direction d = Note_column::dir (nc);
index 82ef13dbdf5267ca98d55342e66140bdf12672fa..d837691b1f81e78df020d1955b59baf9a0aa6cbf 100644 (file)
@@ -79,9 +79,9 @@ Tuplet_engraver::process_acknowledged_grobs ()
       
 
       SCM proc = get_property ("tupletNumberFormatFunction");
-      if (gh_procedure_p (proc))
+      if (ly_procedure_p (proc))
        {
-         SCM t = gh_apply (proc, scm_list_n (time_scaled_musics_[i]->self_scm (), SCM_UNDEFINED));
+         SCM t = scm_apply_0 (proc, scm_list_n (time_scaled_musics_[i]->self_scm (), SCM_UNDEFINED));
          glep->set_property ("text", t);
        }
       
index 70ee5a4dfbb44727e246fdc01faf069a9835b1b3..0f2c980c5096440c42c8bea6ad317e43c975ba7c 100644 (file)
@@ -30,22 +30,22 @@ 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 = gh_scm2int (get_music ()->get_property ("repeat-count"));
+  int rep_count = ly_scm2int (get_music ()->get_property ("repeat-count"));
 
   for (int i = 0; i < rep_count; i++)
     {
       if (unsmob_music (body))
-       *tail = gh_cons (body, SCM_EOL) ;
+       *tail = scm_cons (body, SCM_EOL) ;
 
       tail = SCM_CDRLOC (*tail);
 
       if (alt_count)
        {
-         *tail = gh_cons (gh_car (alts), SCM_EOL);
+         *tail = scm_cons (ly_car (alts), SCM_EOL);
          tail = SCM_CDRLOC (*tail);
          if (i >= rep_count - alt_count)
            
-           alts = gh_cdr (alts);
+           alts = ly_cdr (alts);
        }      
     }
 
@@ -81,7 +81,7 @@ Volta_repeat_iterator::Volta_repeat_iterator ()
 SCM
 Volta_repeat_iterator::get_music_list ()const
 {
-  return gh_cons (get_music ()->get_property ("element"),
+  return scm_cons (get_music ()->get_property ("element"),
                  get_music ()->get_property ("elements"));
 }
 
@@ -93,7 +93,7 @@ Volta_repeat_iterator::construct_children ()
   SCM alts = get_music ()->get_property ("elements");
 
   alt_count_ = scm_ilength (alts);
-  rep_count_ = gh_scm2int (get_music ()->get_property ("repeat-count"));
+  rep_count_ = ly_scm2int (get_music ()->get_property ("repeat-count"));
   done_count_ = 0;
 }
 
@@ -109,9 +109,9 @@ Volta_repeat_iterator::add_repeat_command (SCM what)
 
   Context * where = get_outlet ()->where_defined (reps);
   if (where
-      && current_reps == SCM_EOL || gh_pair_p (current_reps))
+      && current_reps == SCM_EOL || ly_pair_p (current_reps))
     {
-      current_reps = gh_cons (what, current_reps);
+      current_reps = scm_cons (what, current_reps);
       where->internal_set_property (reps, current_reps);
     }
 }
index 77786a376fa937dc49cc55d40796001af662ace4..e8197fc1fa5e302ae6bdb16363ee0a2ac2bf2aee 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 =
-       gh_scm2int (primitive->get_property ("prefix-set"));
+       ly_scm2int (primitive->get_property ("prefix-set"));
       int context_info =
-       gh_scm2int (primitive->get_property ("context-info"));
+       ly_scm2int (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 = gh_scm2int (delta_pitch_scm);
+             delta_pitch = ly_scm2int (delta_pitch_scm);
            }
          else
            {
@@ -258,7 +258,7 @@ Vaticana_ligature_engraver::align_heads (Array<Grob_info> primitives,
        * Save the head's final x-offset.
        */
       primitive->set_property ("x-offset",
-                                   gh_double2scm (x_offset));
+                                   scm_make_real (x_offset));
 
       /*
        * If the head is the 2nd head of a pes or flexa (but not a
@@ -277,7 +277,7 @@ Vaticana_ligature_engraver::align_heads (Array<Grob_info> primitives,
          else
            {
              prev_primitive->set_property ("add-join",
-                                                gh_bool2scm (true));
+                                                ly_bool2scm (true));
 
              /*
               * Create a small overlap of adjacent heads so that the join
@@ -335,7 +335,7 @@ void
 check_for_prefix_loss (Item *primitive)
 {
   int prefix_set =
-    gh_scm2int (primitive->get_property ("prefix-set"));
+    ly_scm2int (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 = gh_scm2int (delta_pitch_scm);
+       delta_pitch = ly_scm2int (delta_pitch_scm);
       }
     else
       {
@@ -377,14 +377,14 @@ Vaticana_ligature_engraver::transform_heads (Spanner *ligature,
 
     /* retrieve & complete prefix_set and context_info */
     int prefix_set =
-      gh_scm2int (primitive->get_property ("prefix-set"));
+      ly_scm2int (primitive->get_property ("prefix-set"));
     int context_info =
-      gh_scm2int (primitive->get_property ("context-info"));
+      ly_scm2int (primitive->get_property ("context-info"));
     if (is_stacked_head (prefix_set, context_info))
       {
        context_info |= STACKED_HEAD;
        primitive->set_property ("context-info",
-                                     gh_int2scm (context_info));
+                                     scm_int2num (context_info));
       }
 
     /*
@@ -397,7 +397,7 @@ Vaticana_ligature_engraver::transform_heads (Spanner *ligature,
     if (prefix_set & VIRGA)
       {
        glyph_name = "vaticana_punctum";
-       primitive->set_property ("add-stem", gh_bool2scm (true));
+       primitive->set_property ("add-stem", ly_bool2scm (true));
       }
     else if (prefix_set & QUILISMA)
       glyph_name = "vaticana_quilisma";
@@ -459,7 +459,7 @@ Vaticana_ligature_engraver::transform_heads (Spanner *ligature,
               * placed somewhere else.
               */
              prev_primitive->set_property ("add-cauda",
-                                                gh_bool2scm (false));
+                                                ly_bool2scm (false));
            }
          glyph_name = "vaticana_reverse_plica";
        }
@@ -490,7 +490,7 @@ Vaticana_ligature_engraver::transform_heads (Spanner *ligature,
      */
     if ((context_info & FLEXA_LEFT) && !(context_info & PES_UPPER))
       if (!String::compare (glyph_name, "vaticana_punctum"))
-       primitive->set_property ("add-cauda", gh_bool2scm (true));
+       primitive->set_property ("add-cauda", ly_bool2scm (true));
 
     /*
      * Execptional rule for porrectus:
@@ -504,16 +504,16 @@ Vaticana_ligature_engraver::transform_heads (Spanner *ligature,
        check_for_prefix_loss (prev_primitive);
        prev_glyph_name = "flexa";
        prev_primitive->set_property ("flexa-height",
-                                          gh_int2scm (prev_delta_pitch));
+                                          scm_int2num (prev_delta_pitch));
        prev_primitive->set_property ("flexa-width",
-                                          gh_double2scm (flexa_width));
+                                          scm_make_real (flexa_width));
        bool add_cauda = !(prev_prefix_set && PES_OR_FLEXA);
        prev_primitive->set_property ("add-cauda",
-                                          gh_bool2scm (add_cauda));
+                                          ly_bool2scm (add_cauda));
        check_for_prefix_loss (primitive);
        glyph_name = "";
        primitive->set_property ("flexa-width",
-                                     gh_double2scm (flexa_width));
+                                     scm_make_real (flexa_width));
       }
 
     /*
@@ -546,7 +546,7 @@ Vaticana_ligature_engraver::transform_heads (Spanner *ligature,
      * ligature grob's value for thickness to each ligature head (even
      * if not all of them need to know).
      */
-    primitive->set_property ("thickness", gh_double2scm (thickness));
+    primitive->set_property ("thickness", scm_make_real (thickness));
 
     prev_primitive = primitive;
     prev_prefix_set = prefix_set;
@@ -573,7 +573,7 @@ Vaticana_ligature_engraver::transform_heads (Spanner *ligature,
                             "setting `spacing-increment = %f': ptr=%ul",
                             ligature_width, paper_column));
   paper_column->
-    set_property ("forced-spacing", gh_double2scm (ligature_width));
+    set_property ("forced-spacing", scm_make_real (ligature_width));
 #endif
 }
 
index e5e98d2c47c312a9761e46b90efb141f74f08801..d440da8611e7f4e5e6f5e3b721b8b739ca0fac71 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 = gh_scm2int (flexa_height_scm);
+      interval = ly_scm2int (flexa_height_scm);
     }
   else
     {
@@ -240,7 +240,7 @@ vaticana_brew_primitive (Grob *me, bool ledger_take_space)
   SCM delta_pitch_scm = me->get_property ("delta-pitch");
   int delta_pitch;
   if (delta_pitch_scm != SCM_EOL)
-    delta_pitch = gh_scm2int (delta_pitch_scm);
+    delta_pitch = ly_scm2int (delta_pitch_scm);
   else
     delta_pitch = 0;
 
index 9c679e6adedef632c616685c0611b8ca1d5d984f..7296c856ed2683de0ca0ba57e797245bf537d8a9 100644 (file)
@@ -26,18 +26,18 @@ Virtual_font_metric::Virtual_font_metric (SCM font_list)
   SCM name_list = SCM_EOL;
   SCM *name_tail = &name_list;
   
-  for (SCM s = font_list; gh_pair_p (s); s = gh_cdr (s))
+  for (SCM s = font_list; ly_pair_p (s); s = ly_cdr (s))
     {
-      if (Font_metric *fm = unsmob_metrics (gh_car (s)))
+      if (Font_metric *fm = unsmob_metrics (ly_car (s)))
        {
-         *tail =  scm_cons (gh_car (s),SCM_EOL);
+         *tail =  scm_cons (ly_car (s),SCM_EOL);
          tail = SCM_CDRLOC (*tail);
 
-         if (!gh_number_p (mag))
+         if (!ly_number_p (mag))
            /* Ugh.  */
-           mag = gh_cdr (fm->description_);
+           mag = ly_cdr (fm->description_);
 
-         *name_tail = scm_cons (gh_car (fm->description_), SCM_EOL);
+         *name_tail = scm_cons (ly_car (fm->description_), SCM_EOL);
          name_tail = SCM_CDRLOC (*name_tail);
        }
     }
@@ -48,7 +48,7 @@ Virtual_font_metric::Virtual_font_metric (SCM font_list)
 Real 
 Virtual_font_metric::design_size () const
 {
-  return unsmob_metrics (gh_car (font_list_))-> design_size ();
+  return unsmob_metrics (ly_car (font_list_))-> design_size ();
 }
 
 void
@@ -61,8 +61,8 @@ int
 Virtual_font_metric::count () const
 {
   int k = 0;
-  for (SCM s = font_list_; gh_pair_p (s); s = gh_cdr (s))
-      k += unsmob_metrics (gh_car (s))->count ();
+  for (SCM s = font_list_; ly_pair_p (s); s = ly_cdr (s))
+      k += unsmob_metrics (ly_car (s))->count ();
   return k;
 }
 
@@ -70,9 +70,9 @@ Stencil
 Virtual_font_metric::find_by_name (String glyph) const
 {
   Stencil m;  
-  for (SCM s = font_list_; m.is_empty () && gh_pair_p (s); s = gh_cdr (s))
+  for (SCM s = font_list_; m.is_empty () && ly_pair_p (s); s = ly_cdr (s))
     {
-      m = unsmob_metrics (gh_car (s))->find_by_name (glyph);
+      m = unsmob_metrics (ly_car (s))->find_by_name (glyph);
     }
 
   return m;
@@ -96,9 +96,9 @@ Offset
 Virtual_font_metric::get_indexed_wxwy (int code)  const
 {
   int total = 0;
-  for (SCM s = font_list_; gh_pair_p (s); s = gh_cdr (s))
+  for (SCM s = font_list_; ly_pair_p (s); s = ly_cdr (s))
     {
-      Font_metric *fm = unsmob_metrics (gh_car (s));
+      Font_metric *fm = unsmob_metrics (ly_car (s));
       if (code < total + fm->count ())
        return fm->get_indexed_wxwy (code - total);
       total += fm->count ();
@@ -110,9 +110,9 @@ Box
 Virtual_font_metric::get_indexed_char (int code)  const
 {
   int total = 0;
-  for (SCM s = font_list_; gh_pair_p (s); s = gh_cdr (s))
+  for (SCM s = font_list_; ly_pair_p (s); s = ly_cdr (s))
     {
-      Font_metric *fm = unsmob_metrics (gh_car (s));
+      Font_metric *fm = unsmob_metrics (ly_car (s));
       if (code < total + fm->count ())
        return fm->get_indexed_char (code - total);
       total += fm->count ();
@@ -125,9 +125,9 @@ Virtual_font_metric::name_to_index (String glyph) const
 {
   Stencil m;
   int total = 0; 
-  for (SCM s = font_list_; m.is_empty () && gh_pair_p (s); s = gh_cdr (s))
+  for (SCM s = font_list_; m.is_empty () && ly_pair_p (s); s = ly_cdr (s))
     {
-      Font_metric *m =unsmob_metrics (gh_car (s));
+      Font_metric *m =unsmob_metrics (ly_car (s));
       int k = m->name_to_index (glyph);
       if (k >= 0)
        return total + k;
@@ -143,9 +143,9 @@ Virtual_font_metric::get_indexed_char_stencil (int code)  const
   Stencil  m ;  
   int total = 0;
   
-  for (SCM s = font_list_; gh_pair_p (s); s = gh_cdr (s))
+  for (SCM s = font_list_; ly_pair_p (s); s = ly_cdr (s))
     {
-      Font_metric *fm = unsmob_metrics (gh_car (s));
+      Font_metric *fm = unsmob_metrics (ly_car (s));
       if (code < total + fm->count ())
        {
          /* Ugh.  */
@@ -176,6 +176,6 @@ LY_DEFINE (ly_make_virtual_font, "ly:make-virtual-font", 0, 0, 1,
 String
 Virtual_font_metric::coding_scheme () const
 {
-  Font_metric *fm = unsmob_metrics (gh_car (font_list_));
+  Font_metric *fm = unsmob_metrics (ly_car (font_list_));
   return fm->coding_scheme ();
 }
index 119868b189bddcbeddd42743d0bc4d72ab7a545f..95be78a51e2760d854e0d15f97382ef7d8ec4e74 100644 (file)
@@ -56,7 +56,7 @@ Volta_bracket_interface::print (SCM smob)
   SCM glyph = endbar->get_property ("glyph");
   
   String str;
-  if (gh_string_p (glyph))
+  if (ly_string_p (glyph))
     str = ly_scm2string (glyph);
   else
     return SCM_EOL;
index d0bf95641940341f2635a16432e8a09aa7f4f47b..1dca3edef95cd832e333c9335d7937a720b0c22a 100644 (file)
@@ -82,7 +82,7 @@ Volta_engraver::staff_eligible ()
        volta engraver in score context or somesuch.
        
       */
-      if (!gh_pair_p (staffs))
+      if (!ly_pair_p (staffs))
        {
          programming_error ("Huh? Volta engraver can't find staffs?");
          return false;
@@ -106,13 +106,13 @@ Volta_engraver::process_music ()
     
   bool  end = false;
   start_string_ = SCM_EOL;
-  while (gh_pair_p (cs))
+  while (ly_pair_p (cs))
     {
       SCM c = ly_car (cs);
 
-      if (gh_pair_p (c)
+      if (ly_pair_p (c)
          && ly_car (c) == ly_symbol2scm ("volta")
-         && gh_pair_p (ly_cdr (c)))
+         && ly_pair_p (ly_cdr (c)))
        {
          if (ly_cadr (c) ==  SCM_BOOL_F)
            end = true;
@@ -146,7 +146,7 @@ Volta_engraver::process_music ()
     }
 
   if (volta_span_ && 
-      (gh_string_p (start_string_) || gh_pair_p (start_string_)))
+      (ly_string_p (start_string_) || ly_pair_p (start_string_)))
     {
       warning (_ ("Already have a volta spanner.  Stopping that one prematurely."));
       
@@ -161,7 +161,7 @@ Volta_engraver::process_music ()
     }
 
   if (!volta_span_ && 
-      (gh_string_p (start_string_) || gh_pair_p (start_string_)))
+      (ly_string_p (start_string_) || ly_pair_p (start_string_)))
     {
       started_mom_ = now_mom () ;