diff options
author | Han-Wen Nienhuys <hanwen@xs4all.nl> | 2004-09-24 16:59:35 +0000 |
---|---|---|
committer | Han-Wen Nienhuys <hanwen@xs4all.nl> | 2004-09-24 16:59:35 +0000 |
commit | 1e1fa5221ca359326b073626168c6b7cda6453e1 (patch) | |
tree | a7cfe74eb80f49fea80e38aed6d1dcd539cc13f4 | |
parent | 6e5ead91bf47b6e8b58304db26181355127af63c (diff) |
* lily/parser.yy (Music_list): add error-found to music with errors.
* lily/lily-parser.cc (LY_DEFINE): ignore scores with errors.
* lily/book.cc (process): ignore books with errors
* lily/drum-note-engraver.cc (try_music): idem.
* lily/part-combine-iterator.cc (Part_combine_iterator): use
BusyPlayingEvent to determine which voice was active last.
(unisono): use last active to where to get unisono information
from. This fixes: partcombine-rest.ly (again).
126 files changed, 906 insertions, 901 deletions
@@ -1,5 +1,7 @@ 2004-09-24 Han-Wen Nienhuys <hanwen@xs4all.nl> + * lily/*: ly_c[ad]+r -> scm_XXX , ly_c_pair_p -> scm_is_pair. + * scripts/lilypond-book.py (Compile_error.process_include): catch Compile_error exception, and remove output .texi. @@ -22,7 +24,7 @@ BusyPlayingEvent to determine which voice was active last. (unisono): use last active to where to get unisono information from. This fixes: partcombine-rest.ly (again). -v/v + * scm/part-combiner.scm (determine-split-list): cleanups 2004-09-23 Han-Wen Nienhuys <hanwen@xs4all.nl> diff --git a/lily/accidental-engraver.cc b/lily/accidental-engraver.cc index e6197418c5..d2182a4b1d 100644 --- a/lily/accidental-engraver.cc +++ b/lily/accidental-engraver.cc @@ -90,9 +90,9 @@ static void set_property_on_children (Context *trans, char const *sym, SCM val) { trans->set_property (sym, ly_deep_copy (val)); - for (SCM p = trans->children_contexts (); ly_c_pair_p (p); p = ly_cdr (p)) + for (SCM p = trans->children_contexts (); scm_is_pair (p); p = scm_cdr (p)) { - Context *trg = unsmob_context (ly_car (p)); + Context *trg = unsmob_context (scm_car (p)); set_property_on_children (trg, sym, ly_deep_copy (val)); } } @@ -148,7 +148,7 @@ recent_enough (int bar_number, SCM alteration_def, SCM laziness) || laziness== SCM_BOOL_T) return true; - return (bar_number <= scm_to_int (ly_cdr (alteration_def)) + scm_to_int (laziness)); + return (bar_number <= scm_to_int (scm_cdr (alteration_def)) + scm_to_int (laziness)); } static int @@ -156,8 +156,8 @@ extract_alteration (SCM alteration_def) { if (scm_is_number (alteration_def)) return scm_to_int (alteration_def); - else if (ly_c_pair_p (alteration_def)) - return scm_to_int (ly_car (alteration_def)); + else if (scm_is_pair (alteration_def)) + return scm_to_int (scm_car (alteration_def)); else if (alteration_def == SCM_BOOL_F) return 0; else @@ -169,7 +169,7 @@ bool is_tied (SCM alteration_def) { return (alteration_def == SCM_BOOL_T) - || (ly_c_pair_p (alteration_def) && ly_car (alteration_def) == SCM_BOOL_T); + || (scm_is_pair (alteration_def) && scm_car (alteration_def) == SCM_BOOL_T); } static int @@ -186,12 +186,12 @@ number_accidentals_from_sig (bool *different, SCM sig, Pitch *pitch, scm_int2num (n)), sig, SCM_BOOL_F); SCM from_key_signature = ly_assoc_get (scm_int2num (n), sig, SCM_BOOL_F); SCM from_other_octaves = SCM_BOOL_F; - for (SCM s = sig ; ly_c_pair_p (s); s = ly_cdr (s)) + for (SCM s = sig ; scm_is_pair (s); s = scm_cdr (s)) { - SCM entry = ly_car (s); - if (ly_c_pair_p (ly_car (entry)) - && ly_cdar (entry) == scm_int2num (n)) - from_other_octaves = ly_cdr (entry); + SCM entry = scm_car (s); + if (scm_is_pair (scm_car (entry)) + && scm_cdar (entry) == scm_int2num (n)) + from_other_octaves = scm_cdr (entry); } @@ -239,19 +239,19 @@ number_accidentals (bool *different, int number = 0; *different = false; - if (ly_c_pair_p (accidentals) && !scm_is_symbol (ly_car (accidentals))) + if (scm_is_pair (accidentals) && !scm_is_symbol (scm_car (accidentals))) warning (_f ("Accidental typesetting list must begin with context-name: %s", - ly_scm2string (ly_car (accidentals)).to_str0 ())); + ly_scm2string (scm_car (accidentals)).to_str0 ())); - for (; ly_c_pair_p (accidentals) && origin; - accidentals = ly_cdr (accidentals)) + for (; scm_is_pair (accidentals) && origin; + accidentals = scm_cdr (accidentals)) { // If pair then it is a new accidentals typesetting rule to be checked - SCM rule = ly_car (accidentals); - if (ly_c_pair_p (rule)) + SCM rule = scm_car (accidentals); + if (scm_is_pair (rule)) { - SCM type = ly_car (rule); - SCM laziness = ly_cdr (rule); + SCM type = scm_car (rule); + SCM laziness = scm_cdr (rule); SCM localsig = origin->get_property ("localKeySignature"); bool same_octave_b = diff --git a/lily/accidental-placement.cc b/lily/accidental-placement.cc index 3b85e72c0a..2c508ac9f7 100644 --- a/lily/accidental-placement.cc +++ b/lily/accidental-placement.cc @@ -64,7 +64,7 @@ Accidental_placement::add_accidental (Grob* me, Grob* a) entry = SCM_EOL; } else - entry = ly_cdr (entry); + entry = scm_cdr (entry); entry = scm_cons (a->self_scm (), 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"); ly_c_pair_p (acs); - acs =ly_cdr (acs)) - for (SCM s = ly_cdar (acs); ly_c_pair_p (s); s = ly_cdr (s)) + for (SCM acs =accs->get_property ("accidental-grobs"); scm_is_pair (acs); + acs =scm_cdr (acs)) + for (SCM s = scm_cdar (acs); scm_is_pair (s); s = scm_cdr (s)) { - Grob *a = unsmob_grob (ly_car (s)); + Grob *a = unsmob_grob (scm_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; ly_c_pair_p (s); s =ly_cdr (s)) + for (SCM s = accs; scm_is_pair (s); s =scm_cdr (s)) { Accidental_placement_entry *ape = new Accidental_placement_entry; - ape->notename_ = scm_to_int (ly_caar (s)); + ape->notename_ = scm_to_int (scm_caar (s)); - for (SCM t = ly_cdar (s); ly_c_pair_p (t); t =ly_cdr (t)) - ape->grobs_.push (unsmob_grob (ly_car (t))); + for (SCM t = scm_cdar (s); scm_is_pair (t); t =scm_cdr (t)) + ape->grobs_.push (unsmob_grob (scm_car (t))); apes.push (ape); } diff --git a/lily/accidental.cc b/lily/accidental.cc index 8e00df9b66..5a7c32daae 100644 --- a/lily/accidental.cc +++ b/lily/accidental.cc @@ -69,7 +69,7 @@ Accidental_interface::accurate_boxes (Grob *a, Grob**common) && !parens && scm_ilength (accs) == 1) { - if (scm_to_int (ly_car (accs)) == FLAT) + if (scm_to_int (scm_car (accs)) == FLAT) { Box stem = b; Box bulb = b; @@ -210,9 +210,9 @@ Accidental_interface::print (SCM smob) Stencil mol; for (SCM s = me->get_property ("accidentals"); - ly_c_pair_p (s); s = ly_cdr (s)) + scm_is_pair (s); s = scm_cdr (s)) { - int alteration = scm_to_int (ly_car (s)); + int alteration = scm_to_int (scm_car (s)); String font_char = get_fontcharname (style, alteration); Stencil acc (fm->find_by_name ("accidentals-" + font_char)); diff --git a/lily/align-interface.cc b/lily/align-interface.cc index 7cfea27c2a..cd40632eb8 100644 --- a/lily/align-interface.cc +++ b/lily/align-interface.cc @@ -227,7 +227,7 @@ Align_interface::align_elements_to_extents (Grob * me, Axis a) Axis Align_interface::axis (Grob*me) { - return Axis (scm_to_int (ly_car (me->get_property ("axes")))); + return Axis (scm_to_int (scm_car (me->get_property ("axes")))); } void diff --git a/lily/ambitus-engraver.cc b/lily/ambitus-engraver.cc index 5946495413..bf95336d8a 100644 --- a/lily/ambitus-engraver.cc +++ b/lily/ambitus-engraver.cc @@ -155,7 +155,7 @@ Ambitus_engraver::finalize () handle = scm_assoc (scm_from_int (p.get_notename ()), start_key_sig_); - int sig_alter = (handle != SCM_BOOL_F) ? scm_to_int (ly_cdr (handle)) : 0; + int sig_alter = (handle != SCM_BOOL_F) ? scm_to_int (scm_cdr (handle)) : 0; if (sig_alter == p.get_alteration ()) { accidentals_[d]->suicide(); diff --git a/lily/arpeggio.cc b/lily/arpeggio.cc index 7c8110f4e5..a6595c95cf 100644 --- a/lily/arpeggio.cc +++ b/lily/arpeggio.cc @@ -25,9 +25,9 @@ Arpeggio::print (SCM smob) Grob *me = unsmob_grob (smob); Grob * common = me; - for (SCM s = me->get_property ("stems"); ly_c_pair_p (s); s = ly_cdr (s)) + for (SCM s = me->get_property ("stems"); scm_is_pair (s); s = scm_cdr (s)) { - Grob * stem = unsmob_grob (ly_car (s)); + Grob * stem = unsmob_grob (scm_car (s)); common = common->common_refpoint (Staff_symbol_referencer::get_staff_symbol (stem), Y_AXIS); } @@ -43,9 +43,9 @@ Arpeggio::print (SCM smob) Interval heads; Real my_y = me->relative_coordinate (common, Y_AXIS); - for (SCM s = me->get_property ("stems"); ly_c_pair_p (s); s = ly_cdr (s)) + for (SCM s = me->get_property ("stems"); scm_is_pair (s); s = scm_cdr (s)) { - Grob * stem = unsmob_grob (ly_car (s)); + Grob * stem = unsmob_grob (scm_car (s)); Grob * ss = Staff_symbol_referencer::get_staff_symbol (stem); Interval iv =Stem::head_positions (stem); iv *= Staff_symbol::staff_space (ss)/2.0; @@ -104,9 +104,9 @@ Arpeggio::brew_chord_bracket (SCM smob) Grob *me = unsmob_grob (smob); Grob * common = me; - for (SCM s = me->get_property ("stems"); ly_c_pair_p (s); s = ly_cdr (s)) + for (SCM s = me->get_property ("stems"); scm_is_pair (s); s = scm_cdr (s)) { - Grob * stem = unsmob_grob (ly_car (s)); + Grob * stem = unsmob_grob (scm_car (s)); common = common->common_refpoint (Staff_symbol_referencer::get_staff_symbol (stem), Y_AXIS); } @@ -114,9 +114,9 @@ Arpeggio::brew_chord_bracket (SCM smob) Interval heads; Real my_y = me->relative_coordinate (common, Y_AXIS); - for (SCM s = me->get_property ("stems"); ly_c_pair_p (s); s = ly_cdr (s)) + for (SCM s = me->get_property ("stems"); scm_is_pair (s); s = scm_cdr (s)) { - Grob * stem = unsmob_grob (ly_car (s)); + Grob * stem = unsmob_grob (scm_car (s)); Grob * ss = Staff_symbol_referencer::get_staff_symbol (stem); Interval iv = Stem::head_positions (stem); iv *= Staff_symbol::staff_space (ss)/2.0; diff --git a/lily/auto-beam-engraver.cc b/lily/auto-beam-engraver.cc index d60fdb76a6..4e7b933be2 100644 --- a/lily/auto-beam-engraver.cc +++ b/lily/auto-beam-engraver.cc @@ -187,23 +187,23 @@ Auto_beam_engraver::test_moment (Direction dir, Moment test_mom) /* second guess: property generic time exception */ 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)); + if (m != SCM_BOOL_F && unsmob_moment (scm_cdr (m))) + moment = * unsmob_moment (scm_cdr (m)); /* third guess: property time exception, specific for duration type */ 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)); + if (m != SCM_BOOL_F && unsmob_moment (scm_cdr (m))) + moment = * unsmob_moment (scm_cdr (m)); /* fourth guess [user override]: property plain generic */ 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)); + if (m != SCM_BOOL_F && unsmob_moment (scm_cdr (m))) + moment = * unsmob_moment (scm_cdr (m)); /* fifth guess [user override]: property plain, specific for duration type */ 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)); + if (m != SCM_BOOL_F && unsmob_moment (scm_cdr (m))) + moment = * unsmob_moment (scm_cdr (m)); Rational r; if (moment.to_bool ()) diff --git a/lily/auto-change-iterator.cc b/lily/auto-change-iterator.cc index e4966b9dca..656264706b 100644 --- a/lily/auto-change-iterator.cc +++ b/lily/auto-change-iterator.cc @@ -96,13 +96,13 @@ Auto_change_iterator::process (Moment m) Moment now = get_outlet ()->now_mom (); Moment *splitm = 0; - for (; ly_c_pair_p (split_list_); split_list_ = ly_cdr (split_list_)) + for (; scm_is_pair (split_list_); split_list_ = scm_cdr (split_list_)) { - splitm = unsmob_moment (ly_caar (split_list_)); + splitm = unsmob_moment (scm_caar (split_list_)); if ((*splitm + start_moment_) > now) break ; - SCM tag = ly_cdar (split_list_); + SCM tag = scm_cdar (split_list_); Direction d = to_dir (tag); if (d && d != where_dir_) diff --git a/lily/axis-group-interface.cc b/lily/axis-group-interface.cc index a75ab081bf..ab1776da86 100644 --- a/lily/axis-group-interface.cc +++ b/lily/axis-group-interface.cc @@ -13,9 +13,9 @@ void Axis_group_interface::add_element (Grob*me,Grob *e) { - for (SCM ax = me->get_property ("axes"); ax != SCM_EOL ; ax = ly_cdr (ax)) + for (SCM ax = me->get_property ("axes"); ax != SCM_EOL ; ax = scm_cdr (ax)) { - Axis a = (Axis) scm_to_int (ly_car (ax)); + Axis a = (Axis) scm_to_int (scm_car (ax)); if (!e->get_parent (a)) e->set_parent (me, a); @@ -39,9 +39,9 @@ Interval Axis_group_interface::relative_group_extent (Axis a, Grob *common, SCM elts) { Interval r; - for (SCM s = elts; ly_c_pair_p (s); s = ly_cdr (s)) + for (SCM s = elts; scm_is_pair (s); s = scm_cdr (s)) { - Grob * se = unsmob_grob (ly_car (s)); + Grob * se = unsmob_grob (scm_car (s)); Interval dims = se->extent (common, a); if (!dims.is_empty ()) r.unite (dims); @@ -73,7 +73,7 @@ Axis_group_interface::set_axes (Grob*me,Axis a1, Axis a2) SCM axes = me->get_property ("axes"); - if (!ly_c_pair_p (axes) + if (!scm_is_pair (axes) || scm_c_memq (sa1, axes) == SCM_BOOL_F || scm_c_memq (sa2, axes) == SCM_BOOL_F) { @@ -106,9 +106,9 @@ Axis_group_interface::get_children (Grob*me) if (!has_interface (me)) return childs; - for (SCM ep = me->get_property ("elements"); ly_c_pair_p (ep); ep = ly_cdr (ep)) + for (SCM ep = me->get_property ("elements"); scm_is_pair (ep); ep = scm_cdr (ep)) { - Grob* e = unsmob_grob (ly_car (ep)); + Grob* e = unsmob_grob (scm_car (ep)); if (e) childs.concat (Axis_group_interface::get_children (e)); } diff --git a/lily/beam-quanting.cc b/lily/beam-quanting.cc index 00375335a8..f7938d36ab 100644 --- a/lily/beam-quanting.cc +++ b/lily/beam-quanting.cc @@ -101,8 +101,8 @@ Beam::quanting (SCM smob) Grob *me = unsmob_grob (smob); SCM s = me->get_property ("positions"); - Real yl = scm_to_double (ly_car (s)); - Real yr = scm_to_double (ly_cdr (s)); + Real yl = scm_to_double (scm_car (s)); + Real yr = scm_to_double (scm_cdr (s)); /* @@ -286,7 +286,7 @@ Beam::quanting (SCM smob) #if DEBUG_QUANTING SCM inspect_quants = me->get_property ("inspect-quants"); if (to_boolean (me->get_paper ()->lookup_variable (ly_symbol2scm ("debug-beam-quanting"))) - && ly_c_pair_p (inspect_quants)) + && scm_is_pair (inspect_quants)) { Drul_array<Real> ins = ly_scm2interval (inspect_quants); diff --git a/lily/beam.cc b/lily/beam.cc index 3fa06ebc76..b85bd91ee1 100644 --- a/lily/beam.cc +++ b/lily/beam.cc @@ -93,9 +93,9 @@ int Beam::get_beam_count (Grob *me) { int m = 0; - for (SCM s = me->get_property ("stems"); ly_c_pair_p (s); s = ly_cdr (s)) + for (SCM s = me->get_property ("stems"); scm_is_pair (s); s = scm_cdr (s)) { - Grob *stem = unsmob_grob (ly_car (s)); + Grob *stem = unsmob_grob (scm_car (s)); m = m >? (Stem::beam_multiplicity (stem).length () + 1); } return m; @@ -153,7 +153,7 @@ Beam::before_line_breaking (SCM smob) { me->warning (_ ("removing beam with less than two stems")); - unsmob_grob (ly_car (stems))->set_property ("beam", SCM_EOL); + unsmob_grob (scm_car (stems))->set_property ("beam", SCM_EOL); me->suicide (); return SCM_UNSPECIFIED; @@ -199,7 +199,7 @@ position_with_maximal_common_beams (SCM left_beaming, SCM right_beaming, Direction left_dir, Direction right_dir) { - Slice lslice = int_list_to_slice (ly_cdr (left_beaming)); + Slice lslice = int_list_to_slice (scm_cdr (left_beaming)); int best_count = 0; int best_start = 0; @@ -207,9 +207,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 = ly_car (right_beaming); ly_c_pair_p (s); s = ly_cdr (s)) + for ( SCM s = scm_car (right_beaming); scm_is_pair (s); s = scm_cdr (s)) { - int k = - right_dir * scm_to_int (ly_car (s)) + i; + int k = - right_dir * scm_to_int (scm_car (s)) + i; if (scm_c_memq (scm_int2num (k), left_beaming) != SCM_BOOL_F) count ++; } @@ -240,7 +240,7 @@ Beam::connect_beams (Grob *me) SCM this_beaming = this_stem->get_property ("beaming"); Direction this_dir = get_grob_direction (this_stem); - if (ly_c_pair_p (last_beaming) && ly_c_pair_p (this_beaming)) + if (scm_is_pair (last_beaming) && scm_is_pair (this_beaming)) { int start_point = position_with_maximal_common_beams (last_beaming, this_beaming, @@ -255,10 +255,10 @@ Beam::connect_beams (Grob *me) new_slice.set_empty (); SCM s = index_get_cell (this_beaming, d); - for (; ly_c_pair_p (s); s = ly_cdr (s)) + for (; scm_is_pair (s); s = scm_cdr (s)) { int new_beam_pos = - start_point - this_dir * scm_to_int (ly_car (s)); + start_point - this_dir * scm_to_int (scm_car (s)); new_slice.add_point (new_beam_pos); scm_set_car_x (s, scm_int2num (new_beam_pos)); @@ -274,10 +274,10 @@ Beam::connect_beams (Grob *me) else { scm_set_car_x ( this_beaming, SCM_EOL); - SCM s = ly_cdr (this_beaming); - for (; ly_c_pair_p (s); s = ly_cdr (s)) + SCM s = scm_cdr (this_beaming); + for (; scm_is_pair (s); s = scm_cdr (s)) { - int np = - this_dir * scm_to_int (ly_car (s)); + int np = - this_dir * scm_to_int (scm_car (s)); scm_set_car_x (s, scm_int2num (np)); last_int.add_point (np); } @@ -288,7 +288,7 @@ Beam::connect_beams (Grob *me) scm_set_cdr_x (this_beaming, SCM_EOL); } - if (scm_ilength (ly_cdr (this_beaming)) > 0) + if (scm_ilength (scm_cdr (this_beaming)) > 0) { last_beaming = this_beaming; last_dir = this_dir; @@ -367,18 +367,18 @@ Beam::print (SCM grob) right from the left stem, and rfliebertjes pointing left from right stem. */ - SCM left = (i > 0) ? ly_cdr (last_beaming) : SCM_EOL; - SCM right = st ? ly_car (this_beaming) : SCM_EOL; + SCM left = (i > 0) ? scm_cdr (last_beaming) : SCM_EOL; + SCM right = st ? scm_car (this_beaming) : SCM_EOL; Array<int> full_beams; Array<int> lfliebertjes; Array<int> rfliebertjes; for (SCM s = left; - ly_c_pair_p (s); s =ly_cdr (s)) + scm_is_pair (s); s =scm_cdr (s)) { - int b = scm_to_int (ly_car (s)); - if (scm_c_memq (ly_car (s), right) != SCM_BOOL_F) + int b = scm_to_int (scm_car (s)); + if (scm_c_memq (scm_car (s), right) != SCM_BOOL_F) { full_beams.push (b); } @@ -388,10 +388,10 @@ Beam::print (SCM grob) } } for (SCM s = right; - ly_c_pair_p (s); s =ly_cdr (s)) + scm_is_pair (s); s =scm_cdr (s)) { - int b = scm_to_int (ly_car (s)); - if (scm_c_memq (ly_car (s), left) == SCM_BOOL_F) + int b = scm_to_int (scm_car (s)); + if (scm_c_memq (scm_car (s), left) == SCM_BOOL_F) { rfliebertjes.push (b); } @@ -826,12 +826,12 @@ Beam::position_beam (Grob *me) SCM s = ly_deep_copy (me->get_property ("positions")); me->set_property ("positions", s); - if (ly_car (s) == SCM_BOOL_F) + if (scm_car (s) == SCM_BOOL_F) { // one wonders if such genericity is necessary --hwn. SCM callbacks = me->get_property ("position-callbacks"); - for (SCM i = callbacks; ly_c_pair_p (i); i = ly_cdr (i)) - scm_call_1 (ly_car (i), me->self_scm ()); + for (SCM i = callbacks; scm_is_pair (i); i = scm_cdr (i)) + scm_call_1 (scm_car (i), me->self_scm ()); } set_stem_lengths (me); @@ -1140,11 +1140,11 @@ where_are_the_whole_beams (SCM beaming) { Slice l; - for ( SCM s = ly_car (beaming); ly_c_pair_p (s) ; s = ly_cdr (s)) + for ( SCM s = scm_car (beaming); scm_is_pair (s) ; s = scm_cdr (s)) { - if (scm_c_memq (ly_car (s), ly_cdr (beaming)) != SCM_BOOL_F) + if (scm_c_memq (scm_car (s), scm_cdr (beaming)) != SCM_BOOL_F) - l.add_point (scm_to_int (ly_car (s))); + l.add_point (scm_to_int (scm_car (s))); } return l; @@ -1389,7 +1389,7 @@ Beam::rest_collision_callback (SCM element_smob, SCM axis) Drul_array<Real> pos (0, 0); SCM s = beam->get_property ("positions"); - if (ly_c_pair_p (s) && scm_is_number (ly_car (s))) + if (scm_is_pair (s) && scm_is_number (scm_car (s))) pos = ly_scm2interval (s); Real staff_space = Staff_symbol_referencer::staff_space (rest); @@ -1447,9 +1447,9 @@ Beam::is_knee (Grob* me) bool knee = false; int d = 0; - for (SCM s = me->get_property ("stems"); ly_c_pair_p (s); s = ly_cdr (s)) + for (SCM s = me->get_property ("stems"); scm_is_pair (s); s = scm_cdr (s)) { - Direction dir = get_grob_direction (unsmob_grob (ly_car (s))); + Direction dir = get_grob_direction (unsmob_grob (scm_car (s))); if (d && d != dir) { knee = true; diff --git a/lily/book-paper-def.cc b/lily/book-paper-def.cc index baf444e9d1..5c2f0befec 100644 --- a/lily/book-paper-def.cc +++ b/lily/book-paper-def.cc @@ -43,8 +43,8 @@ find_scaled_font (Output_def *mod, if (sizes != SCM_BOOL_F) { SCM met = scm_assoc (scm_make_real (lookup_mag), sizes); - if (ly_c_pair_p (met)) - return unsmob_metrics (ly_cdr (met)); + if (scm_is_pair (met)) + return unsmob_metrics (scm_cdr (met)); } else sizes = SCM_EOL; @@ -64,10 +64,10 @@ find_scaled_font (Output_def *mod, Virtual_font (Scaled (Font1), Scaled (Font2)) */ SCM lst = SCM_EOL; SCM *t = &lst; - for (SCM s = vf->get_font_list (); ly_c_pair_p (s); s = ly_cdr (s)) + for (SCM s = vf->get_font_list (); scm_is_pair (s); s = scm_cdr (s)) { Font_metric *scaled = find_scaled_font (mod, - unsmob_metrics (ly_car (s)), + unsmob_metrics (scm_car (s)), m, input_enc_name); *t = scm_cons (scaled->self_scm (), SCM_EOL); t = SCM_CDRLOC (*t); @@ -117,13 +117,13 @@ LY_DEFINE (ly_bookpaper_fonts, "ly:bookpaper-fonts", { SCM func = ly_scheme_function ("hash-table->alist"); - for (SCM s = scm_call_1 (func, font_table); ly_c_pair_p (s); - s = ly_cdr (s)) + for (SCM s = scm_call_1 (func, font_table); scm_is_pair (s); + s = scm_cdr (s)) { - SCM entry = ly_car (s); - for (SCM t = ly_cdr (entry); ly_c_pair_p (t); t = ly_cdr (t)) + SCM entry = scm_car (s); + for (SCM t = scm_cdr (entry); scm_is_pair (t); t = scm_cdr (t)) { - Font_metric *fm = unsmob_metrics (ly_cdar (t)); + Font_metric *fm = unsmob_metrics (scm_cdar (t)); if (dynamic_cast<Modified_font_metric*> (fm)) ell = scm_cons (fm->self_scm (), ell); diff --git a/lily/book.cc b/lily/book.cc index af4ecae8fe..211c24bd93 100644 --- a/lily/book.cc +++ b/lily/book.cc @@ -117,9 +117,9 @@ LY_DEFINE(ly_make_book, "ly:make-book", if (ly_c_module_p (header)) book->header_ = header; - for (SCM s = scores; ly_c_pair_p (s); s = ly_cdr (s)) + for (SCM s = scores; scm_is_pair (s); s = scm_cdr (s)) { - Score *score = unsmob_score (ly_car (s)); + Score *score = unsmob_score (scm_car (s)); if (score) book->scores_.push (score); } diff --git a/lily/break-align-engraver.cc b/lily/break-align-engraver.cc index a18647b0da..3ee7489568 100644 --- a/lily/break-align-engraver.cc +++ b/lily/break-align-engraver.cc @@ -43,10 +43,10 @@ Break_align_engraver::add_column (SCM smob) void Break_align_engraver::stop_translation_timestep () { - for (SCM p = column_alist_; ly_c_pair_p (p); p = ly_cdr (p)) + for (SCM p = column_alist_; scm_is_pair (p); p = scm_cdr (p)) { - SCM pair = ly_car (p); - add_column (ly_cdr (pair)); + SCM pair = scm_car (p); + add_column (scm_cdr (pair)); } column_alist_ = SCM_EOL; @@ -115,7 +115,7 @@ Break_align_engraver::add_to_group (SCM align_name, Item*item) if (s != SCM_BOOL_F) { - Grob *e = unsmob_grob (ly_cdr (s)); + Grob *e = unsmob_grob (scm_cdr (s)); group = dynamic_cast<Item*> (e); } else diff --git a/lily/break-align-interface.cc b/lily/break-align-interface.cc index ae9b7779c5..bcd62a73fc 100644 --- a/lily/break-align-interface.cc +++ b/lily/break-align-interface.cc @@ -88,13 +88,13 @@ Break_align_interface::ordered_elements (Grob *grob) Copy in order specified in BREAK-ALIGN-ORDER. */ Link_array<Grob> new_elts; - for (; ly_c_pair_p (order); order = ly_cdr (order)) + for (; scm_is_pair (order); order = scm_cdr (order)) { - SCM sym = ly_car (order); + SCM sym = scm_car (order); - for (SCM s =elts; ly_c_pair_p (s); s = ly_cdr (s)) + for (SCM s =elts; scm_is_pair (s); s = scm_cdr (s)) { - Grob *g = unsmob_grob (ly_car (s)); + Grob *g = unsmob_grob (scm_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"); - ly_c_pair_p (s) ; s = ly_cdr (s)) + scm_is_pair (s) ; s = scm_cdr (s)) { - Grob *elt = unsmob_grob (ly_car (s)); + Grob *elt = unsmob_grob (scm_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 (ly_c_pair_p (l)) + if (scm_is_pair (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; - !scm_is_symbol (rsym) && ly_c_pair_p (s); s = ly_cdr (s)) + !scm_is_symbol (rsym) && scm_is_pair (s); s = scm_cdr (s)) { - Grob * elt =unsmob_grob (ly_car (s)); + Grob * elt =unsmob_grob (scm_car (s)); rsym = elt->get_property ("break-align-symbol"); } @@ -200,7 +200,7 @@ Break_align_interface::do_alignment (Grob *grob) if (scm_is_symbol (rsym)) entry = scm_assq (rsym, alist); - bool entry_found = ly_c_pair_p (entry); + bool entry_found = scm_is_pair (entry); if (!entry_found) { String sym_string; @@ -221,10 +221,10 @@ Break_align_interface::do_alignment (Grob *grob) if (entry_found) { - entry = ly_cdr (entry); + entry = scm_cdr (entry); - distance = scm_to_double (ly_cdr (entry)); - type = ly_car (entry) ; + distance = scm_to_double (scm_cdr (entry)); + type = scm_car (entry) ; } if (r) diff --git a/lily/break-substitution.cc b/lily/break-substitution.cc index 6c4e9daae2..371bff33a0 100644 --- a/lily/break-substitution.cc +++ b/lily/break-substitution.cc @@ -102,16 +102,16 @@ do_break_substitution (SCM src) do_break_substitution (scm_vector_ref (src, si))); } } - else if (ly_c_pair_p (src)) + else if (scm_is_pair (src)) { /* UGH! breaks on circular lists. */ - SCM newcar = do_break_substitution (ly_car (src)); - SCM oldcdr = ly_cdr (src); + SCM newcar = do_break_substitution (scm_car (src)); + SCM oldcdr = scm_cdr (src); if (newcar == SCM_UNDEFINED - && (ly_c_pair_p (oldcdr) || oldcdr == SCM_EOL)) + && (scm_is_pair (oldcdr) || oldcdr == SCM_EOL)) { /* This is tail-recursion, ie. @@ -142,9 +142,9 @@ substitute_grob_list (SCM grob_list) SCM l = SCM_EOL; SCM * tail = &l; - for (SCM s = grob_list; ly_c_pair_p (s); s = ly_cdr (s)) + for (SCM s = grob_list; scm_is_pair (s); s = scm_cdr (s)) { - SCM n= substitute_grob (unsmob_grob (ly_car (s))); + SCM n= substitute_grob (unsmob_grob (scm_car (s))); if (n != SCM_UNDEFINED) { @@ -350,9 +350,9 @@ Spanner::fast_fubstitute_grob_list (SCM sym, int sp_index = len; int it_index = 0; - for (SCM s = grob_list; ly_c_pair_p (s); s = ly_cdr (s)) + for (SCM s = grob_list; scm_is_pair (s); s = scm_cdr (s)) { - Grob * g = unsmob_grob (ly_car (s)); + Grob * g = unsmob_grob (scm_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; ly_c_pair_p (s); s = ly_cdr (s)) + for (SCM s = alist; scm_is_pair (s); s = scm_cdr (s)) { - SCM sym = ly_caar (s); - SCM val = ly_cdar (s); + SCM sym = scm_caar (s); + SCM val = scm_cdar (s); SCM type = scm_object_property (sym, ly_symbol2scm ("backend-type?")); if (type == grob_list_p) diff --git a/lily/chord-name-engraver.cc b/lily/chord-name-engraver.cc index 0291aef631..7a78ed2443 100644 --- a/lily/chord-name-engraver.cc +++ b/lily/chord-name-engraver.cc @@ -121,7 +121,7 @@ Chord_name_engraver::process_music () chord_name_->set_property ("text", markup); SCM s = get_property ("chordChanges"); - if (to_boolean (s) && ly_c_pair_p (last_chord_) + if (to_boolean (s) && scm_is_pair (last_chord_) && ly_c_equal_p (chord_as_scm, last_chord_)) chord_name_->set_property ("begin-of-line-visible", SCM_BOOL_T); diff --git a/lily/cluster.cc b/lily/cluster.cc index d585735ac7..adf4e0aca6 100644 --- a/lily/cluster.cc +++ b/lily/cluster.cc @@ -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 (!ly_c_pair_p (cols)) + if (!scm_is_pair (cols)) { me->warning ("junking empty cluster"); me->suicide (); @@ -165,9 +165,9 @@ Cluster::print (SCM smob) line with the center of the note heads? */ - for (SCM s = cols; ly_c_pair_p (s); s = ly_cdr (s)) + for (SCM s = cols; scm_is_pair (s); s = scm_cdr (s)) { - Grob * col = unsmob_grob (ly_car (s)); + Grob * col = unsmob_grob (scm_car (s)); Interval yext = col->extent (commony, Y_AXIS); Real x = col->relative_coordinate (commonx, X_AXIS) - left_coord; @@ -186,10 +186,10 @@ Cluster::print (SCM smob) { Spanner * next = orig->broken_intos_[spanner->get_break_index () + 1]; SCM cols = next->get_property ("columns"); - if (ly_c_pair_p (cols)) + if (scm_is_pair (cols)) { Grob *next_commony = common_refpoint_of_list (cols, next, Y_AXIS); - Grob * col = unsmob_grob (ly_car (scm_last_pair (cols))); + Grob * col = unsmob_grob (scm_car (scm_last_pair (cols))); Interval v = col->extent (next_commony, Y_AXIS); Real x = right_bound->relative_coordinate (commonx, X_AXIS) - left_coord; diff --git a/lily/coherent-ligature-engraver.cc b/lily/coherent-ligature-engraver.cc index 1bc75b847a..2ef5cf41bd 100644 --- a/lily/coherent-ligature-engraver.cc +++ b/lily/coherent-ligature-engraver.cc @@ -127,10 +127,10 @@ 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"); - ly_c_pair_p (tail); - tail = ly_cdr (tail)) + scm_is_pair (tail); + tail = scm_cdr (tail)) { - Item *sibling = unsmob_item (ly_car (tail)); + Item *sibling = unsmob_item (scm_car (tail)); if ((sibling) && (Staff_symbol_referencer::get_staff_symbol (sibling) == sl)) { diff --git a/lily/context-def.cc b/lily/context-def.cc index e2a0b8c50a..dded720471 100644 --- a/lily/context-def.cc +++ b/lily/context-def.cc @@ -92,14 +92,14 @@ Context_def::mark_smob (SCM smob) void Context_def::add_context_mod (SCM mod) { - SCM tag = ly_car (mod); + SCM tag = scm_car (mod); if (ly_symbol2scm ("description") == tag) { - description_ = ly_cadr (mod); + description_ = scm_cadr (mod); return; } - SCM sym = ly_cadr (mod); + SCM sym = scm_cadr (mod); if (scm_is_string (sym)) sym = scm_string_to_symbol (sym); @@ -143,10 +143,10 @@ 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; ly_c_pair_p (s); s = ly_cdr (s)) + for (SCM s = mods; scm_is_pair (s); s = scm_cdr (s)) { - SCM tag = ly_caar (s); - SCM sym = ly_cadar (s); + SCM tag = scm_caar (s); + SCM sym = scm_cadar (s); if (tag == ly_symbol2scm ("accepts")) acc = scm_cons (sym, acc); else if (tag == ly_symbol2scm ("denies")) @@ -163,9 +163,9 @@ Context_def::path_to_acceptable_context (SCM type_sym, Output_def *odef) const SCM accepted = get_accepted (SCM_EOL); Link_array<Context_def> accepteds; - for (SCM s = accepted; ly_c_pair_p (s); s = ly_cdr (s)) + for (SCM s = accepted; scm_is_pair (s); s = scm_cdr (s)) if (Context_def *t = unsmob_context_def (find_context_def (odef, - ly_car (s)))) + scm_car (s)))) accepteds.push (t); Link_array<Context_def> best_result; @@ -208,10 +208,10 @@ 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; ly_c_pair_p (s); s = ly_cdr (s)) + for (SCM s = mods; scm_is_pair (s); s = scm_cdr (s)) { - SCM tag = ly_caar (s); - SCM arg = ly_cadar (s); + SCM tag = scm_caar (s); + SCM arg = scm_cadar (s); if (scm_is_string (arg)) arg = scm_string_to_symbol (arg); @@ -230,12 +230,12 @@ Context_def::get_translator_names (SCM user_mod) const SCM filter_performers (SCM ell) { - for (SCM *tail = ℓ ly_c_pair_p (*tail); tail = SCM_CDRLOC (*tail)) + for (SCM *tail = ℓ scm_is_pair (*tail); tail = SCM_CDRLOC (*tail)) { - if (dynamic_cast<Performer*> (unsmob_translator (ly_car (*tail)))) + if (dynamic_cast<Performer*> (unsmob_translator (scm_car (*tail)))) { - *tail = ly_cdr (*tail); - if (!ly_c_pair_p (*tail)) + *tail = scm_cdr (*tail); + if (!scm_is_pair (*tail)) break ; } } @@ -246,12 +246,12 @@ SCM filter_engravers (SCM ell) { SCM *tail = ℓ - for (; ly_c_pair_p (*tail) ; tail = SCM_CDRLOC (*tail)) + for (; scm_is_pair (*tail) ; tail = SCM_CDRLOC (*tail)) { - if (dynamic_cast<Engraver*> (unsmob_translator (ly_car (*tail)))) + if (dynamic_cast<Engraver*> (unsmob_translator (scm_car (*tail)))) { - *tail = ly_cdr (*tail); - if (!ly_c_pair_p (*tail)) + *tail = scm_cdr (*tail); + if (!scm_is_pair (*tail)) break ; } } @@ -279,9 +279,9 @@ Context_def::instantiate (SCM ops) SCM trans_list = SCM_EOL; - for (SCM s = trans_names; ly_c_pair_p (s) ; s = ly_cdr (s)) + for (SCM s = trans_names; scm_is_pair (s) ; s = scm_cdr (s)) { - Translator *t = get_translator (ly_car (s)); + Translator *t = get_translator (scm_car (s)); if (!t) warning (_f ("can't find: `%s'", s)); else @@ -292,7 +292,7 @@ Context_def::instantiate (SCM ops) if (tr->must_be_last ()) { SCM cons = scm_cons (str, SCM_EOL); - if (ly_c_pair_p (trans_list)) + if (scm_is_pair (trans_list)) scm_set_cdr_x (scm_last_pair (trans_list), cons); else trans_list= cons; diff --git a/lily/context.cc b/lily/context.cc index cb3029d44a..11ae7cb151 100644 --- a/lily/context.cc +++ b/lily/context.cc @@ -27,9 +27,9 @@ Context::is_removable () const void Context::check_removal () { - for (SCM p = context_list_; ly_c_pair_p (p); p = ly_cdr (p)) + for (SCM p = context_list_; scm_is_pair (p); p = scm_cdr (p)) { - Context *trg = unsmob_context (ly_car (p)); + Context *trg = unsmob_context (scm_car (p)); trg->check_removal (); if (trg->is_removable ()) @@ -174,8 +174,8 @@ Context::find_create_context (SCM n, String id, SCM Context::default_child_context_name () const { - return ly_c_pair_p (accepts_list_) - ? ly_car (scm_last_pair (accepts_list_)) + return scm_is_pair (accepts_list_) + ? scm_car (scm_last_pair (accepts_list_)) : SCM_EOL; } @@ -244,7 +244,7 @@ bool Context::is_alias (SCM sym) const { if (sym == ly_symbol2scm ("Bottom") - && !ly_c_pair_p (accepts_list_)) + && !scm_is_pair (accepts_list_)) return true; if (sym == unsmob_context_def (definition_)->get_context_name ()) return true; @@ -308,9 +308,9 @@ find_context_below (Context * where, Context * found = 0; for (SCM s = where->children_contexts (); - !found && ly_c_pair_p (s); s = ly_cdr (s)) + !found && scm_is_pair (s); s = scm_cdr (s)) { - Context * tr = unsmob_context (ly_car (s)); + Context * tr = unsmob_context (scm_car (s)); found = find_context_below (tr, type, id); } @@ -364,7 +364,7 @@ Context::now_mom () const int Context::print_smob (SCM s, SCM port, scm_print_state *) { - Context *sc = (Context *) ly_cdr (s); + Context *sc = (Context *) scm_cdr (s); scm_puts ("#<", port); scm_puts (classname (sc), port); diff --git a/lily/drum-note-engraver.cc b/lily/drum-note-engraver.cc index 4eb2326f27..c66846137c 100644 --- a/lily/drum-note-engraver.cc +++ b/lily/drum-note-engraver.cc @@ -88,11 +88,11 @@ Drum_notes_engraver::process_music () if (scm_hash_table_p (tab) == SCM_BOOL_T) defn = scm_hashq_ref (tab, drum_type, SCM_EOL); - if (ly_c_pair_p (defn)) + if (scm_is_pair (defn)) { - SCM pos = ly_caddr (defn); - SCM style =ly_car (defn); - SCM script = ly_cadr (defn); + SCM pos = scm_caddr (defn); + SCM style =scm_car (defn); + SCM script = scm_cadr (defn); if (scm_integer_p (pos) == SCM_BOOL_T) note->set_property ("staff-position", pos); diff --git a/lily/duration.cc b/lily/duration.cc index fc52de4481..5d05dc143d 100644 --- a/lily/duration.cc +++ b/lily/duration.cc @@ -93,7 +93,7 @@ IMPLEMENT_SIMPLE_SMOBS (Duration); int Duration::print_smob (SCM s, SCM port, scm_print_state *) { - Duration *r = (Duration *) ly_cdr (s); + Duration *r = (Duration *) scm_cdr (s); scm_puts ("#<Duration ", port); scm_display (scm_makfrom0str (r->to_string ().to_str0 ()), port); @@ -105,8 +105,8 @@ Duration::print_smob (SCM s, SCM port, scm_print_state *) SCM Duration::equal_p (SCM a , SCM b) { - Duration *p = (Duration *) ly_cdr (a); - Duration *q = (Duration *) ly_cdr (b); + Duration *p = (Duration *) scm_cdr (a); + Duration *q = (Duration *) scm_cdr (b); bool eq = p->dots_ == q->dots_ && p->durlog_ == q->durlog_ diff --git a/lily/dynamic-engraver.cc b/lily/dynamic-engraver.cc index 18997be2a5..7ccabdc2ac 100644 --- a/lily/dynamic-engraver.cc +++ b/lily/dynamic-engraver.cc @@ -257,7 +257,7 @@ Dynamic_engraver::process_music () /* FIXME: use get_markup () to check type. */ - if (scm_is_string (s) || ly_c_pair_p (s)) + if (scm_is_string (s) || scm_is_pair (s)) { cresc_->set_property ("edge-text", scm_cons (s, scm_makfrom0str (""))); @@ -397,8 +397,8 @@ Dynamic_engraver::acknowledge_grob (Grob_info info) if (script_ && !script_->get_parent (X_AXIS)) { SCM head = scm_last_pair (info.grob_->get_property ("note-heads")); - if (ly_c_pair_p (head)) - script_->set_parent (unsmob_grob (ly_car (head)), X_AXIS); + if (scm_is_pair (head)) + script_->set_parent (unsmob_grob (scm_car (head)), X_AXIS); } diff --git a/lily/dynamic-text-spanner.cc b/lily/dynamic-text-spanner.cc index 3e78516c15..d81246dccd 100644 --- a/lily/dynamic-text-spanner.cc +++ b/lily/dynamic-text-spanner.cc @@ -100,7 +100,7 @@ Dynamic_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 (ly_c_pair_p (edge_text)) + if (scm_is_pair (edge_text)) { Direction d = LEFT; do diff --git a/lily/engraver-group-engraver.cc b/lily/engraver-group-engraver.cc index c65f63e115..3cb642fc23 100644 --- a/lily/engraver-group-engraver.cc +++ b/lily/engraver-group-engraver.cc @@ -44,8 +44,8 @@ Engraver_group_engraver::acknowledge_grobs () SCM meta = info.grob_->internal_get_property (meta_sym); SCM nm = scm_assoc (name_sym, meta); - if (ly_c_pair_p (nm)) - nm = ly_cdr (nm); + if (scm_is_pair (nm)) + nm = scm_cdr (nm); else { /* @@ -67,9 +67,9 @@ Engraver_group_engraver::acknowledge_grobs () scm_hashq_set_x (tab, nm, acklist); } - for (SCM p = acklist; ly_c_pair_p (p); p = ly_cdr (p)) + for (SCM p = acklist; scm_is_pair (p); p = scm_cdr (p)) { - Translator * t = unsmob_translator (ly_car (p)); + Translator * t = unsmob_translator (scm_car (p)); Engraver * eng = dynamic_cast<Engraver*> (t); if (eng && eng != info.origin_trans_) eng->acknowledge_grob (info); @@ -87,9 +87,9 @@ Engraver_group_engraver::pending_grob_count () const { int count = announce_infos_.size (); for (SCM s = context ()->children_contexts (); - ly_c_pair_p (s); s = ly_cdr (s)) + scm_is_pair (s); s = scm_cdr (s)) { - Context *c = unsmob_context (ly_car (s)); + Context *c = unsmob_context (scm_car (s)); Engraver_group_engraver * group =dynamic_cast<Engraver_group_engraver*> (c->implementation ()); @@ -104,9 +104,9 @@ Engraver_group_engraver::do_announces () { do { for (SCM s = context ()->children_contexts (); - ly_c_pair_p (s); s = ly_cdr (s)) + scm_is_pair (s); s = scm_cdr (s)) { - Context *c = unsmob_context (ly_car (s)); + Context *c = unsmob_context (scm_car (s)); Engraver_group_engraver * group = dynamic_cast<Engraver_group_engraver*> (c->implementation ()); if (group) @@ -160,9 +160,9 @@ bool engraver_valid (Translator*tr, SCM ifaces) { SCM ack_ifs = scm_assoc (ly_symbol2scm ("interfaces-acked"), tr->translator_description ()); - ack_ifs = ly_cdr (ack_ifs); - for (SCM s = ifaces; ly_c_pair_p (s); s = ly_cdr (s)) - if (scm_c_memq (ly_car (s), ack_ifs) != SCM_BOOL_F) + ack_ifs = scm_cdr (ack_ifs); + for (SCM s = ifaces; scm_is_pair (s); s = scm_cdr (s)) + if (scm_c_memq (scm_car (s), ack_ifs) != SCM_BOOL_F) return true; return false; } @@ -172,12 +172,12 @@ engraver_valid (Translator*tr, SCM ifaces) SCM find_acknowledge_engravers (SCM gravlist, SCM meta_alist) { - SCM ifaces = ly_cdr (scm_assoc (ly_symbol2scm ("interfaces"), meta_alist)); + SCM ifaces = scm_cdr (scm_assoc (ly_symbol2scm ("interfaces"), meta_alist)); SCM l = SCM_EOL; - for (SCM s = gravlist; ly_c_pair_p (s); s = ly_cdr (s)) + for (SCM s = gravlist; scm_is_pair (s); s = scm_cdr (s)) { - Translator* tr = unsmob_translator (ly_car (s)); + Translator* tr = unsmob_translator (scm_car (s)); if (engraver_valid (tr, ifaces)) l = scm_cons (tr->self_scm (), l); } @@ -203,10 +203,10 @@ recurse_down_engravers (Context * c, Engraver_method ptr, bool context_first) (tg->*ptr) (); } - for (SCM s = c->children_contexts () ; ly_c_pair_p (s); - s =ly_cdr (s)) + for (SCM s = c->children_contexts () ; scm_is_pair (s); + s =scm_cdr (s)) { - recurse_down_engravers (unsmob_context (ly_car (s)), ptr, context_first); + recurse_down_engravers (unsmob_context (scm_car (s)), ptr, context_first); } if (context_first) @@ -221,9 +221,9 @@ recurse_down_engravers (Context * c, Engraver_method ptr, bool context_first) void engraver_each (SCM list, Engraver_method method) { - for (SCM p = list; ly_c_pair_p (p); p = ly_cdr (p)) + for (SCM p = list; scm_is_pair (p); p = scm_cdr (p)) { - Engraver * e = dynamic_cast<Engraver*>(unsmob_translator (ly_car (p))); + Engraver * e = dynamic_cast<Engraver*>(unsmob_translator (scm_car (p))); if (e) (e->*method) (); } diff --git a/lily/event-chord-iterator.cc b/lily/event-chord-iterator.cc index e588574020..21ec89cbff 100644 --- a/lily/event-chord-iterator.cc +++ b/lily/event-chord-iterator.cc @@ -47,9 +47,9 @@ Event_chord_iterator::process (Moment m) if (last_processed_mom_ < Moment (0)) { for (SCM s = dynamic_cast<Music_sequence *> (get_music ())->music_list (); - ly_c_pair_p (s); s = ly_cdr (s)) + scm_is_pair (s); s = scm_cdr (s)) { - Music *mus = unsmob_music (ly_car (s)); + Music *mus = unsmob_music (scm_car (s)); bool gotcha = try_music (mus); if (!gotcha) diff --git a/lily/event.cc b/lily/event.cc index 69125b035d..f79409f60a 100644 --- a/lily/event.cc +++ b/lily/event.cc @@ -142,14 +142,14 @@ LY_DEFINE (ly_transpose_key_alist, "ly:transpose-key-alist", SCM newlist = SCM_EOL; Pitch *p = unsmob_pitch (pit); - for (SCM s = l; ly_c_pair_p (s); s = ly_cdr (s)) + for (SCM s = l; scm_is_pair (s); s = scm_cdr (s)) { - SCM key = ly_caar (s); - SCM alter = ly_cdar (s); - if (ly_c_pair_p (key)) + SCM key = scm_caar (s); + SCM alter = scm_cdar (s); + if (scm_is_pair (key)) { - Pitch orig (scm_to_int (ly_car (key)), - scm_to_int (ly_cdr (key)), + Pitch orig (scm_to_int (scm_car (key)), + scm_to_int (scm_cdr (key)), scm_to_int (alter)); orig =orig.transposed (*p); @@ -188,14 +188,14 @@ bool alist_equal_p (SCM a, SCM b) { for (SCM s = a; - ly_c_pair_p (s); s = ly_cdr (s)) + scm_is_pair (s); s = scm_cdr (s)) { - SCM key = ly_caar (s); - SCM val = ly_cdar (s); + SCM key = scm_caar (s); + SCM val = scm_cdar (s); SCM l = scm_assoc (key, b); if (l == SCM_BOOL_F - || !ly_c_equal_p ( ly_cdr (l), val)) + || !ly_c_equal_p ( scm_cdr (l), val)) return false; } diff --git a/lily/extender-engraver.cc b/lily/extender-engraver.cc index e5ed2c9426..c6fb7167e3 100644 --- a/lily/extender-engraver.cc +++ b/lily/extender-engraver.cc @@ -120,9 +120,9 @@ completize_extender (Spanner *sp) if (!sp->get_bound (RIGHT)) { SCM heads = sp->get_property ("heads"); - if (ly_c_pair_p (heads)) + if (scm_is_pair (heads)) { - Item *it = dynamic_cast<Item*> (unsmob_grob (ly_car (heads))); + Item *it = dynamic_cast<Item*> (unsmob_grob (scm_car (heads))); if (it) sp->set_bound (RIGHT, it); } diff --git a/lily/font-metric.cc b/lily/font-metric.cc index 3b7563af17..64224c48ea 100644 --- a/lily/font-metric.cc +++ b/lily/font-metric.cc @@ -186,7 +186,7 @@ LY_DEFINE (ly_font_filename,"ly:font-filename", { Font_metric *fm = unsmob_metrics (font); SCM_ASSERT_TYPE (fm, font, SCM_ARG1, __FUNCTION__, "font-metric"); - return ly_car (fm->description_); + return scm_car (fm->description_); } @@ -222,7 +222,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 ly_cdr (fm->description_); + return scm_cdr (fm->description_); } LY_DEFINE (ly_font_design_size,"ly:font-design-size", 1 , 0, 0, diff --git a/lily/font-select.cc b/lily/font-select.cc index df6e008684..8472b5acb9 100644 --- a/lily/font-select.cc +++ b/lily/font-select.cc @@ -112,19 +112,19 @@ select_encoded_font (Output_def *paper, SCM chain, SCM input_encoding) { SCM name = ly_assoc_chain (ly_symbol2scm ("font-name"), chain); - if (!ly_c_pair_p (name) || !scm_is_string (ly_cdr (name))) + if (!scm_is_pair (name) || !scm_is_string (scm_cdr (name))) { SCM fonts = paper->lookup_variable (ly_symbol2scm ("fonts")); name = properties_to_font_size_family (fonts, chain); } else - name = ly_cdr (name); + name = scm_cdr (name); if (scm_is_string (name)) { SCM mag = ly_assoc_chain (ly_symbol2scm ("font-magnification"), chain); - Real rmag = (ly_c_pair_p (mag) - ? robust_scm2double (ly_cdr (mag), 1.0) + Real rmag = (scm_is_pair (mag) + ? robust_scm2double (scm_cdr (mag), 1.0) : 1); Font_metric *fm = all_fonts_global->find_font (ly_scm2string (name)); @@ -137,8 +137,8 @@ select_encoded_font (Output_def *paper, SCM chain, SCM input_encoding) SCM font_size = ly_assoc_chain (ly_symbol2scm ("font-size"), chain); Real req = 0; - if (ly_c_pair_p (font_size)) - req = scm_to_double (ly_cdr (font_size)); + if (scm_is_pair (font_size)) + req = scm_to_double (scm_cdr (font_size)); return get_font_by_mag_step (paper, req, vec, scm_to_double (base_size), input_encoding); diff --git a/lily/forbid-break-engraver.cc b/lily/forbid-break-engraver.cc index 242866e2f0..207e302849 100644 --- a/lily/forbid-break-engraver.cc +++ b/lily/forbid-break-engraver.cc @@ -21,18 +21,18 @@ Forbid_line_break_engraver::start_translation_timestep () SCM busy = get_property ("busyGrobs"); Moment now = now_mom (); - while (ly_c_pair_p (busy) && unsmob_moment (ly_caar (busy))->main_part_ == now.main_part_) - busy = ly_cdr (busy); + while (scm_is_pair (busy) && unsmob_moment (scm_caar (busy))->main_part_ == now.main_part_) + busy = scm_cdr (busy); - while (ly_c_pair_p (busy)) + while (scm_is_pair (busy)) { - Grob *g = unsmob_grob (ly_cdar (busy)); + Grob *g = unsmob_grob (scm_cdar (busy)); if (Rhythmic_head::has_interface (g)) { get_score_engraver ()->forbid_breaks (); } - busy = ly_cdr (busy); + busy = scm_cdr (busy); } } diff --git a/lily/global-context.cc b/lily/global-context.cc index 1621336bc6..580479bb94 100644 --- a/lily/global-context.cc +++ b/lily/global-context.cc @@ -88,8 +88,8 @@ Global_context::now_mom () const Score_context* Global_context::get_score_context () const { - return (ly_c_pair_p (context_list_)) - ? dynamic_cast<Score_context*> (unsmob_context (ly_car (context_list_))) + return (scm_is_pair (context_list_)) + ? dynamic_cast<Score_context*> (unsmob_context (scm_car (context_list_))) : 0; } @@ -172,9 +172,9 @@ Global_context::apply_finalizations () { SCM lst = get_property ("finalizations"); set_property ("finalizations", SCM_EOL); - for (SCM s = lst; ly_c_pair_p (s); s = ly_cdr (s)) + for (SCM s = lst; scm_is_pair (s); s = scm_cdr (s)) /* TODO: make safe. */ - scm_primitive_eval (ly_car (s)); + scm_primitive_eval (scm_car (s)); } /* Add a function to execute before stepping to the next time step. */ diff --git a/lily/grob-interface.cc b/lily/grob-interface.cc index 2da145220e..19b88d8a64 100644 --- a/lily/grob-interface.cc +++ b/lily/grob-interface.cc @@ -65,18 +65,18 @@ check_interfaces_for_property (Grob const *me, SCM sym) SCM ifs = me->get_property ("interfaces"); bool found = false; - for (; !found && ly_c_pair_p (ifs); ifs =ly_cdr (ifs)) + for (; !found && scm_is_pair (ifs); ifs =scm_cdr (ifs)) { - SCM iface = scm_hashq_ref (all_ifaces , ly_car (ifs), SCM_BOOL_F); + SCM iface = scm_hashq_ref (all_ifaces , scm_car (ifs), SCM_BOOL_F); if (iface == SCM_BOOL_F) { String msg = to_string (_f ("Unknown interface `%s'", - ly_symbol2string (ly_car (ifs)).to_str0 ())); + ly_symbol2string (scm_car (ifs)).to_str0 ())); programming_error (msg); continue; } - found= found || (scm_c_memq (sym, ly_caddr (iface)) != SCM_BOOL_F); + found= found || (scm_c_memq (sym, scm_caddr (iface)) != SCM_BOOL_F); } if (!found) diff --git a/lily/grob-pq-engraver.cc b/lily/grob-pq-engraver.cc index c0f97f1d45..e3917c3758 100644 --- a/lily/grob-pq-engraver.cc +++ b/lily/grob-pq-engraver.cc @@ -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 (ly_car (a)), - *unsmob_moment (ly_car (b))) < 0) + if (Moment::compare (*unsmob_moment (scm_car (a)), + *unsmob_moment (scm_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 (ly_c_pair_p (busy) && *unsmob_moment (ly_caar (busy)) == now) + while (scm_is_pair (busy) && *unsmob_moment (scm_caar (busy)) == now) { - busy = ly_cdr (busy); + busy = scm_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 (ly_c_pair_p (busy) && *unsmob_moment (ly_caar (busy)) < now) + while (scm_is_pair (busy) && *unsmob_moment (scm_caar (busy)) < now) { /* The grob-pq-engraver is not water tight, and stuff like tupletSpannerDuration confuses it. */ - busy = ly_cdr (busy); + busy = scm_cdr (busy); } if (start_busy != busy) diff --git a/lily/grob-property.cc b/lily/grob-property.cc index f351d1ba36..1c5bbea7b0 100644 --- a/lily/grob-property.cc +++ b/lily/grob-property.cc @@ -45,7 +45,7 @@ Grob::add_to_list_property (SCM sym, SCM thing) if (handle != SCM_BOOL_F) { - scm_set_cdr_x (handle, scm_cons (thing, ly_cdr (handle))); + scm_set_cdr_x (handle, scm_cons (thing, scm_cdr (handle))); } else { @@ -54,7 +54,7 @@ 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) ? ly_cdr (handle) : SCM_EOL; + SCM tail = (handle != SCM_BOOL_F) ? scm_cdr (handle) : SCM_EOL; SCM val = scm_cons (thing, tail); mutable_property_alist_ = scm_cons (scm_cons (sym, val), @@ -88,20 +88,20 @@ Grob::internal_get_property (SCM sym) const { SCM s = scm_sloppy_assq (sym, mutable_property_alist_); if (s != SCM_BOOL_F) - return ly_cdr (s); + return scm_cdr (s); s = scm_sloppy_assq (sym, immutable_property_alist_); - if (internal_type_checking_global_b && ly_c_pair_p (s)) + if (internal_type_checking_global_b && scm_is_pair (s)) { - if (!type_check_assignment (sym, ly_cdr (s), + if (!type_check_assignment (sym, scm_cdr (s), ly_symbol2scm ("backend-type?"))) abort (); check_interfaces_for_property (this, sym); } - return (s == SCM_BOOL_F) ? SCM_EOL : ly_cdr (s); + return (s == SCM_BOOL_F) ? SCM_EOL : scm_cdr (s); } void diff --git a/lily/grob.cc b/lily/grob.cc index 0406636264..ecc744921a 100644 --- a/lily/grob.cc +++ b/lily/grob.cc @@ -53,14 +53,14 @@ Grob::Grob (SCM basicprops) smobify_self (); SCM meta = get_property ("meta"); - if (ly_c_pair_p (meta)) + if (scm_is_pair (meta)) { SCM ifs = scm_assoc (ly_symbol2scm ("interfaces"), meta); /* Switch off interface checks for the moment. */ bool itc = internal_type_checking_global_b; internal_type_checking_global_b = false; - internal_set_property (ly_symbol2scm ("interfaces"), ly_cdr (ifs)); + internal_set_property (ly_symbol2scm ("interfaces"), scm_cdr (ifs)); internal_type_checking_global_b = itc; } @@ -94,7 +94,7 @@ Grob::Grob (SCM basicprops) if (is_number_pair (xt)) cb = xt; else if (cb != SCM_BOOL_F - && !ly_c_procedure_p (cb) && !ly_c_pair_p (cb) + && !ly_c_procedure_p (cb) && !scm_is_pair (cb) && ly_c_procedure_p (get_property ("print-function"))) cb = stencil_extent_proc; @@ -176,9 +176,9 @@ Grob::calculate_dependencies (int final, int busy, SCM funcname) status_ = busy; - for (SCM d = get_property ("dependencies"); ly_c_pair_p (d); - d = ly_cdr (d)) - unsmob_grob (ly_car (d))->calculate_dependencies (final, busy, funcname); + for (SCM d = get_property ("dependencies"); scm_is_pair (d); + d = scm_cdr (d)) + unsmob_grob (scm_car (d))->calculate_dependencies (final, busy, funcname); SCM proc = internal_get_property (funcname); if (ly_c_procedure_p (proc)) @@ -268,8 +268,8 @@ Grob::handle_broken_dependencies () /* THIS, SP is the original spanner. We use a special function because some Spanners have enormously long lists in their properties, and a special function fixes FOO */ - for (SCM s = mutable_property_alist_; ly_c_pair_p (s); s = ly_cdr (s)) - sp->substitute_one_mutable_property (ly_caar (s), ly_cdar (s)); + for (SCM s = mutable_property_alist_; scm_is_pair (s); s = scm_cdr (s)) + sp->substitute_one_mutable_property (scm_caar (s), scm_cdar (s)); System *system = get_system (); @@ -387,7 +387,7 @@ Grob::get_offset (Axis a) const bool Grob::is_empty (Axis a) const { - return ! (ly_c_pair_p (dim_cache_[a].dimension_) + return ! (scm_is_pair (dim_cache_[a].dimension_) || ly_c_procedure_p (dim_cache_[a].dimension_)); } @@ -398,7 +398,7 @@ Grob::extent (Grob *refp, Axis a) const Dimension_cache *d = (Dimension_cache *) &dim_cache_[a]; Interval ext; - if (ly_c_pair_p (d->dimension_)) + if (scm_is_pair (d->dimension_)) ; else if (ly_c_procedure_p (d->dimension_)) /* FIXME: add doco on types, and should typecheck maybe? */ @@ -406,7 +406,7 @@ Grob::extent (Grob *refp, Axis a) const else return ext; - if (!ly_c_pair_p (d->dimension_)) + if (!scm_is_pair (d->dimension_)) return ext; ext = ly_scm2interval (d->dimension_); @@ -416,18 +416,18 @@ Grob::extent (Grob *refp, Axis a) const : "extra-Y-extent"); /* Signs ? */ - if (ly_c_pair_p (extra)) + if (scm_is_pair (extra)) { - ext[BIGGER] += scm_to_double (ly_cdr (extra)); - ext[SMALLER] += scm_to_double (ly_car (extra)); + ext[BIGGER] += scm_to_double (scm_cdr (extra)); + ext[SMALLER] += scm_to_double (scm_car (extra)); } extra = get_property (a == X_AXIS ? "minimum-X-extent" : "minimum-Y-extent"); - if (ly_c_pair_p (extra)) - ext.unite (Interval (scm_to_double (ly_car (extra)), - scm_to_double (ly_cdr (extra)))); + if (scm_is_pair (extra)) + ext.unite (Interval (scm_to_double (scm_car (extra)), + scm_to_double (scm_cdr (extra)))); ext.translate (x); @@ -452,8 +452,8 @@ Grob::common_refpoint (Grob const *s, Axis a) const Grob * common_refpoint_of_list (SCM elist, Grob *common, Axis a) { - for (; ly_c_pair_p (elist); elist = ly_cdr (elist)) - if (Grob *s = unsmob_grob (ly_car (elist))) + for (; scm_is_pair (elist); elist = scm_cdr (elist)) + if (Grob *s = unsmob_grob (scm_car (elist))) { if (common) common = common->common_refpoint (s, a); @@ -484,7 +484,7 @@ Grob::name () const { SCM meta = get_property ("meta"); SCM nm = scm_assoc (ly_symbol2scm ("name"), meta); - nm = (ly_c_pair_p (nm)) ? ly_cdr (nm) : SCM_EOL; + nm = (scm_is_pair (nm)) ? scm_cdr (nm) : SCM_EOL; return scm_is_symbol (nm) ? ly_symbol2string (nm) : classname (this); } @@ -617,7 +617,7 @@ Grob::mark_smob (SCM ses) int Grob::print_smob (SCM s, SCM port, scm_print_state *) { - Grob *sc = (Grob *) ly_cdr (s); + Grob *sc = (Grob *) scm_cdr (s); scm_puts ("#<Grob ", port); scm_puts ((char *) sc->name ().to_str0 (), port); @@ -652,9 +652,9 @@ ly_scm2grobs (SCM lst) { Link_array<Grob> arr; - for (SCM s = lst; ly_c_pair_p (s); s = ly_cdr (s)) + for (SCM s = lst; scm_is_pair (s); s = scm_cdr (s)) { - SCM e = ly_car (s); + SCM e = scm_car (s); arr.push (unsmob_grob (e)); } diff --git a/lily/hairpin.cc b/lily/hairpin.cc index 83505966da..ac4144e597 100644 --- a/lily/hairpin.cc +++ b/lily/hairpin.cc @@ -72,7 +72,7 @@ Hairpin::print (SCM smob) { bool neighbor_found = false; for (SCM adj = me->get_property ("adjacent-hairpins"); - ly_c_pair_p (adj); adj = ly_cdr (adj)) + scm_is_pair (adj); adj = scm_cdr (adj)) { /* FIXME: this will fuck up in case of polyphonic @@ -80,7 +80,7 @@ Hairpin::print (SCM smob) in the current staff/voice. */ - Spanner *pin = unsmob_spanner (ly_car (adj)); + Spanner *pin = unsmob_spanner (scm_car (adj)); if (pin && (pin->get_bound (LEFT)->get_column() == b || pin->get_bound (RIGHT)->get_column() == b)) diff --git a/lily/hara-kiri-group-spanner.cc b/lily/hara-kiri-group-spanner.cc index d82fa3bc23..f477cd22e4 100644 --- a/lily/hara-kiri-group-spanner.cc +++ b/lily/hara-kiri-group-spanner.cc @@ -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 (ly_c_pair_p (worth)) + if (scm_is_pair (worth)) return ; if (!to_boolean (me->get_property ("remove-first")) diff --git a/lily/hyphen-engraver.cc b/lily/hyphen-engraver.cc index 94f2ae76cf..8f7193fad1 100644 --- a/lily/hyphen-engraver.cc +++ b/lily/hyphen-engraver.cc @@ -73,9 +73,9 @@ completize_hyphen (Spanner* sp) if (!sp->get_bound (RIGHT)) { SCM heads = sp->get_property ("heads"); - if (ly_c_pair_p (heads)) + if (scm_is_pair (heads)) { - Item* it = dynamic_cast<Item*> (unsmob_grob (ly_car (heads))); + Item* it = dynamic_cast<Item*> (unsmob_grob (scm_car (heads))); if (it) sp->set_bound (RIGHT, it); } diff --git a/lily/include/group-interface.hh b/lily/include/group-interface.hh index 196eea71f9..fbc776e49b 100644 --- a/lily/include/group-interface.hh +++ b/lily/include/group-interface.hh @@ -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); ly_c_pair_p (s); s = ly_cdr (s)) + for (SCM s = elt->get_property (name); scm_is_pair (s); s = scm_cdr (s)) { - SCM e = ly_car (s); + SCM e = scm_car (s); arr.push (dynamic_cast<T*> (unsmob_grob (e))); } diff --git a/lily/include/lily-guile.hh b/lily/include/lily-guile.hh index 0cdf6f12e0..17f7e30ee1 100644 --- a/lily/include/lily-guile.hh +++ b/lily/include/lily-guile.hh @@ -37,6 +37,18 @@ inline bool ly_c_boolean_p (SCM x) { return SCM_BOOLP (x); } inline bool ly_c_eq_p (SCM x, SCM y) { return SCM_EQ_P (x, y); } #define scm_is_eq(x,y) (SCM_EQ_P((x), (y))) +#define scm_is_pair(x) (SCM_CONSP(x)) + +inline SCM scm_cdr (SCM x) { return SCM_CDR (x); } +inline SCM scm_car (SCM x) { return SCM_CAR (x); } +inline SCM scm_caar (SCM x) { return SCM_CAAR (x); } +inline SCM scm_cdar (SCM x) { return SCM_CDAR (x); } +inline SCM scm_cadr (SCM x) { return SCM_CADR (x); } +inline SCM scm_cddr (SCM x) { return SCM_CDDR (x); } +inline SCM scm_caddr (SCM x) { return SCM_CADDR (x); } +inline SCM scm_cdadr (SCM x) { return SCM_CDADR (x); } +inline SCM scm_caadr (SCM x) { return SCM_CAADR (x); } +inline SCM scm_cadar (SCM x) { return SCM_CADAR (x); } inline double ly_scm2double (SCM x) { return scm_num2dbl (x, "ly_scm2double"); } #define scm_to_double(x) (ly_scm2double(x)) #define scm_from_double(x) (scm_make_real(x)) @@ -146,22 +158,12 @@ SCM parse_symbol_list (char const *); SCM robust_list_ref(int i, SCM l); SCM alist_to_hashq (SCM); -inline SCM ly_cdr (SCM x) { return SCM_CDR (x); } -inline SCM ly_car (SCM x) { return SCM_CAR (x); } -inline SCM ly_caar (SCM x) { return SCM_CAAR (x); } -inline SCM ly_cdar (SCM x) { return SCM_CDAR (x); } -inline SCM ly_cadr (SCM x) { return SCM_CADR (x); } -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)); } -inline bool ly_c_pair_p (SCM x) { return SCM_NFALSEP (scm_pair_p (x)); } inline bool ly_c_char_p (SCM x) { return SCM_CHARP (x); } inline bool ly_c_vector_p (SCM x) { return SCM_VECTORP (x); } inline bool ly_c_list_p (SCM x) { return SCM_NFALSEP (scm_list_p (x)); } diff --git a/lily/item.cc b/lily/item.cc index f857ff5591..c5cca666d5 100644 --- a/lily/item.cc +++ b/lily/item.cc @@ -157,8 +157,8 @@ Item::handle_prebroken_dependencies () { 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)); + bool trans = ly_scm2bool (scm_car (result)); + bool empty = ly_scm2bool (scm_cdr (result)); if (empty && trans) suicide (); diff --git a/lily/key-engraver.cc b/lily/key-engraver.cc index 3c9283b887..e4c84d9e9f 100644 --- a/lily/key-engraver.cc +++ b/lily/key-engraver.cc @@ -123,7 +123,7 @@ Key_engraver::acknowledge_grob (Grob_info info) } } else if (Bar_line::has_interface (info.grob_) - && ly_c_pair_p (get_property ("keySignature"))) + && scm_is_pair (get_property ("keySignature"))) { create_key (true); } @@ -152,24 +152,24 @@ void Key_engraver::read_ev (Music const * r) { SCM p = r->get_property ("pitch-alist"); - if (!ly_c_pair_p (p)) + if (!scm_is_pair (p)) return; SCM n = scm_list_copy (p); SCM accs = SCM_EOL; for (SCM s = get_property ("keyAccidentalOrder"); - ly_c_pair_p (s); s = ly_cdr (s)) + scm_is_pair (s); s = scm_cdr (s)) { - if (ly_c_pair_p (scm_member (ly_car (s), n))) + if (scm_is_pair (scm_member (scm_car (s), n))) { - accs = scm_cons (ly_car (s), accs); - n = scm_delete_x (ly_car (s), n); + accs = scm_cons (scm_car (s), accs); + n = scm_delete_x (scm_car (s), n); } } - for (SCM s = n ; ly_c_pair_p (s); s = ly_cdr (s)) - if (scm_to_int (ly_cdar (s))) - accs = scm_cons (ly_car (s), accs); + for (SCM s = n ; scm_is_pair (s); s = scm_cdr (s)) + if (scm_to_int (scm_cdar (s))) + accs = scm_cons (scm_car (s), accs); context ()->set_property ("keySignature", accs); context ()->set_property ("tonic" , diff --git a/lily/key-performer.cc b/lily/key-performer.cc index f27f0d85f4..4d61deffdc 100644 --- a/lily/key-performer.cc +++ b/lily/key-performer.cc @@ -50,8 +50,8 @@ Key_performer::create_audio_elements () SCM acc = scm_call_1 (proc, pitchlist); Pitch key_do (0, - scm_to_int (ly_caar (pitchlist)), - scm_to_int (ly_cdar (pitchlist))); + scm_to_int (scm_caar (pitchlist)), + scm_to_int (scm_cdar (pitchlist))); Pitch c_do (0, 0, 0); diff --git a/lily/key-signature-interface.cc b/lily/key-signature-interface.cc index 4bf6651dde..c7672ea875 100644 --- a/lily/key-signature-interface.cc +++ b/lily/key-signature-interface.cc @@ -53,8 +53,8 @@ const int NATURAL_TOP_PITCH = 4; int alteration_pos (SCM what, int alter, int c0p) { - if (ly_c_pair_p (what)) - return scm_to_int (ly_car (what)) * 7 + scm_to_int (ly_cdr (what)) + c0p; + if (scm_is_pair (what)) + return scm_to_int (scm_car (what)) * 7 + scm_to_int (scm_cdr (what)) + c0p; int p = scm_to_int (what); @@ -125,9 +125,9 @@ Key_signature_interface::print (SCM smob) */ Font_metric *fm = Font_interface::get_default_font (me); - for (SCM s = newas; ly_c_pair_p (s); s = ly_cdr (s)) + for (SCM s = newas; scm_is_pair (s); s = scm_cdr (s)) { - int alteration = scm_to_int (ly_cdar (s)); + int alteration = scm_to_int (scm_cdar (s)); String font_char = Accidental_interface::get_fontcharname (style, alteration); Stencil acc (fm->find_by_name ("accidentals-" + font_char)); @@ -138,7 +138,7 @@ Key_signature_interface::print (SCM smob) } else { - SCM what = ly_caar (s); + SCM what = scm_caar (s); int pos = alteration_pos (what, alteration, c0p); acc.translate_axis (pos * inter, Y_AXIS); mol.add_at_edge (X_AXIS, LEFT, acc, 0, 0); @@ -151,19 +151,19 @@ Key_signature_interface::print (SCM smob) SCM old = me->get_property ("old-accidentals"); Stencil natural; - if (ly_c_pair_p (old)) + if (scm_is_pair (old)) natural=Font_interface::get_default_font (me)-> find_by_name (String ("accidentals-") + style + String ("0")); int last_pos = -100; - for (; ly_c_pair_p (old); old = ly_cdr (old)) + for (; scm_is_pair (old); old = scm_cdr (old)) { - SCM found = scm_assoc (ly_caar (old), newas); + SCM found = scm_assoc (scm_caar (old), newas); if (found == SCM_BOOL_F - || ly_cdr (found) != ly_cdar (old)) + || scm_cdr (found) != scm_cdar (old)) { - SCM what = ly_caar (old); + SCM what = scm_caar (old); int alteration = 0; int pos = alteration_pos (what, alteration, c0p); diff --git a/lily/lexer.ll b/lily/lexer.ll index d79c0c9a69..975b336fd7 100644 --- a/lily/lexer.ll +++ b/lily/lexer.ll @@ -193,7 +193,7 @@ HYPHEN -- progress_indication ("\n"); progress_indication (_f ("input renamed to: `%s'", s.to_str0 ())); progress_indication ("\n"); - scm_module_define (ly_car (scopes_), + scm_module_define (scm_car (scopes_), ly_symbol2scm ("input-file-name"), scm_makfrom0str (s.to_str0())); @@ -499,9 +499,9 @@ HYPHEN -- String str (YYText () + 1); SCM s = lookup_markup_command (str); - if (ly_c_pair_p (s) && scm_is_symbol (ly_cdr (s)) ) { - yylval.scm = ly_car(s); - SCM tag = ly_cdr(s); + if (ly_c_pair_p (s) && scm_is_symbol (scm_cdr (s)) ) { + yylval.scm = scm_car(s); + SCM tag = scm_cdr(s); if (tag == ly_symbol2scm("markup0")) return MARKUP_HEAD_MARKUP0; if (tag == ly_symbol2scm("empty")) @@ -676,7 +676,7 @@ void Lily_lexer::pop_state () { if (YYSTATE == notes || YYSTATE == chords) - pitchname_tab_stack_ = ly_cdr (pitchname_tab_stack_); + pitchname_tab_stack_ = scm_cdr (pitchname_tab_stack_); yy_pop_state (); } @@ -728,10 +728,10 @@ Lily_lexer::scan_bare_word (String str) if ((YYSTATE == notes) || (YYSTATE == chords)) { SCM handle = SCM_BOOL_F; if (ly_c_pair_p (pitchname_tab_stack_)) - handle = scm_hashq_get_handle (ly_car (pitchname_tab_stack_), sym); + handle = scm_hashq_get_handle (scm_car (pitchname_tab_stack_), sym); if (ly_c_pair_p (handle)) { - yylval.scm = ly_cdr (handle); + yylval.scm = scm_cdr (handle); if (unsmob_pitch (yylval.scm)) return (YYSTATE == notes) ? NOTENAME_PITCH : TONICNAME_PITCH; else if (scm_is_symbol (yylval.scm)) @@ -739,7 +739,7 @@ Lily_lexer::scan_bare_word (String str) } else if ((handle = scm_hashq_get_handle (chordmodifier_tab_, sym))!= SCM_BOOL_F) { - yylval.scm = ly_cdr (handle); + yylval.scm = scm_cdr (handle); return CHORD_MODIFIER; } } diff --git a/lily/ligature-engraver.cc b/lily/ligature-engraver.cc index 0e221aa38d..bd08ed8354 100644 --- a/lily/ligature-engraver.cc +++ b/lily/ligature-engraver.cc @@ -116,7 +116,7 @@ Ligature_engraver::override_stencil_callback () SCM target_callback = ly_symbol2scm ("print-function"); SCM source_callback = ly_symbol2scm ("ligature-primitive-callback"); SCM noteHeadProperties = updated_grob_properties (context (), ly_symbol2scm ("NoteHead")); - SCM value = ly_cdr (scm_sloppy_assq (source_callback, noteHeadProperties)); + SCM value = scm_cdr (scm_sloppy_assq (source_callback, noteHeadProperties)); execute_pushpop_property (context (), ly_symbol2scm ("NoteHead"), target_callback, value); } diff --git a/lily/lily-guile.cc b/lily/lily-guile.cc index 019a87bc5c..83b4e5b8de 100644 --- a/lily/lily-guile.cc +++ b/lily/lily-guile.cc @@ -44,7 +44,7 @@ inline int my_isnan (Real r) { return isnan (r); } SCM ly_last (SCM list) { - return ly_car (scm_last_pair (list)); + return scm_car (scm_last_pair (list)); } @@ -156,7 +156,7 @@ index_get_cell (SCM s, Direction d) { assert (d); - return (d == LEFT) ? ly_car (s) : ly_cdr (s); + return (d == LEFT) ? scm_car (s) : scm_cdr (s); } SCM @@ -212,8 +212,8 @@ LY_DEFINE (ly_dir_p, "ly:dir?", bool is_number_pair (SCM p) { - return ly_c_pair_p (p) - && scm_is_number (ly_car (p)) && scm_is_number (ly_cdr (p)); + return scm_is_pair (p) + && scm_is_number (scm_car (p)) && scm_is_number (scm_cdr (p)); } typedef void (*Void_fptr) (); @@ -275,8 +275,8 @@ LY_DEFINE(ly_assoc_get, "ly:assoc-get", if (default_value == SCM_UNDEFINED) default_value = SCM_BOOL_F; - if (ly_c_pair_p (handle)) - return ly_cdr (handle); + if (scm_is_pair (handle)) + return scm_cdr (handle); else return default_value; } @@ -301,14 +301,14 @@ to_dir (SCM s) Interval ly_scm2interval (SCM p) { - return Interval (scm_to_double (ly_car (p)), scm_to_double (ly_cdr (p))); + return Interval (scm_to_double (scm_car (p)), scm_to_double (scm_cdr (p))); } Drul_array<Real> ly_scm2realdrul (SCM p) { - return Drul_array<Real> (scm_to_double (ly_car (p)), - scm_to_double (ly_cdr (p))); + return Drul_array<Real> (scm_to_double (scm_car (p)), + scm_to_double (scm_cdr (p))); } SCM @@ -339,7 +339,7 @@ appendable_list_append (SCM l, SCM elt) { SCM newcons = scm_cons (elt, SCM_EOL); - scm_set_cdr_x (ly_car (l), newcons); + scm_set_cdr_x (scm_car (l), newcons); scm_set_car_x (l, newcons); } @@ -352,8 +352,8 @@ ly_offset2scm (Offset o) Offset ly_scm2offset (SCM s) { - return Offset (scm_to_double (ly_car (s)), - scm_to_double (ly_cdr (s))); + return Offset (scm_to_double (scm_car (s)), + scm_to_double (scm_cdr (s))); } LY_DEFINE (ly_number2string, "ly:number->string", @@ -410,8 +410,8 @@ LY_DEFINE (ly_dimension_p, "ly:dimension?", 1, 0, 0, (SCM d), SCM ly_deep_copy (SCM src) { - if (ly_c_pair_p (src)) - return scm_cons (ly_deep_copy (ly_car (src)), ly_deep_copy (ly_cdr (src))); + if (scm_is_pair (src)) + return scm_cons (ly_deep_copy (scm_car (src)), ly_deep_copy (scm_cdr (src))); else if (ly_c_vector_p (src)) { int len = SCM_VECTOR_LENGTH (src); @@ -431,13 +431,13 @@ ly_deep_copy (SCM src) SCM ly_assoc_chain (SCM key, SCM achain) { - if (ly_c_pair_p (achain)) + if (scm_is_pair (achain)) { - SCM handle = scm_assoc (key, ly_car (achain)); - if (ly_c_pair_p (handle)) + SCM handle = scm_assoc (key, scm_car (achain)); + if (scm_is_pair (handle)) return handle; else - return ly_assoc_chain (key, ly_cdr (achain)); + return ly_assoc_chain (key, scm_cdr (achain)); } else return SCM_BOOL_F; @@ -465,13 +465,13 @@ corresponds to call SCM ly_assoc_cdr (SCM key, SCM alist) { - if (ly_c_pair_p (alist)) + if (scm_is_pair (alist)) { - SCM trykey = ly_caar (alist); - if (ly_c_pair_p (trykey) && to_boolean (scm_equal_p (key, ly_cdr (trykey)))) - return ly_car (alist); + SCM trykey = scm_caar (alist); + if (scm_is_pair (trykey) && to_boolean (scm_equal_p (key, scm_cdr (trykey)))) + return scm_car (alist); else - return ly_assoc_cdr (key, ly_cdr (alist)); + return ly_assoc_cdr (key, scm_cdr (alist)); } return SCM_BOOL_F; } @@ -519,10 +519,10 @@ ly_truncate_list (int k, SCM lst) { SCM s = lst; k--; - for (; ly_c_pair_p (s) && k--; s = ly_cdr (s)) + for (; scm_is_pair (s) && k--; s = scm_cdr (s)) ; - if (ly_c_pair_p (s)) + if (scm_is_pair (s)) scm_set_cdr_x (s, SCM_EOL); } return lst; @@ -618,11 +618,11 @@ SCM ly_unique (SCM list) { SCM unique = SCM_EOL; - for (SCM i = list; ly_c_pair_p (i); i = ly_cdr (i)) + for (SCM i = list; scm_is_pair (i); i = scm_cdr (i)) { - if (!ly_c_pair_p (ly_cdr (i)) - || !ly_c_equal_p (ly_car (i), ly_cadr (i))) - unique = scm_cons (ly_car (i), unique); + if (!scm_is_pair (scm_cdr (i)) + || !ly_c_equal_p (scm_car (i), scm_cadr (i))) + unique = scm_cons (scm_car (i), unique); } return scm_reverse_x (unique, SCM_EOL); } @@ -680,10 +680,10 @@ ly_split_list (SCM s, SCM list) { SCM before = SCM_EOL; SCM after = list; - for (; ly_c_pair_p (after);) + for (; scm_is_pair (after);) { - SCM i = ly_car (after); - after = ly_cdr (after); + SCM i = scm_car (after); + after = scm_cdr (after); if (ly_c_equal_p (i, s)) break; before = scm_cons (i, before); @@ -710,9 +710,9 @@ display_list (SCM s) SCM p = scm_current_output_port (); scm_puts ("(", p); - for (; ly_c_pair_p (s); s =ly_cdr (s)) + for (; scm_is_pair (s); s =scm_cdr (s)) { - scm_display (ly_car (s), p); + scm_display (scm_car (s), p); scm_puts (" ", p); } scm_puts (")", p); @@ -724,9 +724,9 @@ int_list_to_slice (SCM l) { Slice s; s.set_empty (); - for (; ly_c_pair_p (l); l = ly_cdr (l)) - if (scm_is_number (ly_car (l))) - s.add_point (scm_to_int (ly_car (l))); + for (; scm_is_pair (l); l = scm_cdr (l)) + if (scm_is_number (scm_car (l))) + s.add_point (scm_to_int (scm_car (l))); return s; } @@ -737,9 +737,9 @@ int_list_to_slice (SCM l) SCM robust_list_ref (int i, SCM l) { - while (i-- > 0 && ly_c_pair_p (ly_cdr (l))) - l = ly_cdr (l); - return ly_car (l); + while (i-- > 0 && scm_is_pair (scm_cdr (l))) + l = scm_cdr (l); + return scm_car (l); } Real @@ -793,10 +793,10 @@ alist_to_hashq (SCM alist) return scm_c_make_hash_table (0); SCM tab = scm_c_make_hash_table (i); - for (SCM s = alist; ly_c_pair_p (s); s = ly_cdr (s)) + for (SCM s = alist; scm_is_pair (s); s = scm_cdr (s)) { - SCM pt = ly_cdar (s); - scm_hashq_set_x (tab, ly_caar (s), pt); + SCM pt = scm_cdar (s); + scm_hashq_set_x (tab, scm_caar (s), pt); } return tab; } diff --git a/lily/lily-lexer.cc b/lily/lily-lexer.cc index f65ffeeb0c..e6110dad68 100644 --- a/lily/lily-lexer.cc +++ b/lily/lily-lexer.cc @@ -123,10 +123,10 @@ Lily_lexer::Lily_lexer (Lily_lexer const &src) SCM scopes = SCM_EOL; SCM *tail = &scopes; - for (SCM s = src.scopes_; ly_c_pair_p (s); s = ly_cdr (s)) + for (SCM s = src.scopes_; scm_is_pair (s); s = scm_cdr (s)) { SCM newmod = ly_make_anonymous_module (false); - ly_import_module (newmod, ly_car (s)); + ly_import_module (newmod, scm_car (s)); *tail = scm_cons (newmod, SCM_EOL); tail = SCM_CDRLOC (*tail); } @@ -152,9 +152,9 @@ Lily_lexer::add_scope (SCM module) { ly_reexport_module (scm_current_module ()); scm_set_current_module (module); - for (SCM s = scopes_; ly_c_pair_p (s); s = ly_cdr (s)) + for (SCM s = scopes_; scm_is_pair (s); s = scm_cdr (s)) { - ly_use_module (module, ly_car (s)); + ly_use_module (module, scm_car (s)); } scopes_ = scm_cons (module, scopes_); } @@ -162,9 +162,9 @@ Lily_lexer::add_scope (SCM module) SCM Lily_lexer::remove_scope () { - SCM sc = ly_car (scopes_); - scopes_ = ly_cdr (scopes_); - scm_set_current_module (ly_car (scopes_)); + SCM sc = scm_car (scopes_); + scopes_ = scm_cdr (scopes_); + scm_set_current_module (scm_car (scopes_)); return sc; } @@ -179,9 +179,9 @@ Lily_lexer::lookup_keyword (String s) SCM Lily_lexer::lookup_identifier_symbol (SCM sym) { - for (SCM s = scopes_; ly_c_pair_p (s); s = ly_cdr (s)) + for (SCM s = scopes_; scm_is_pair (s); s = scm_cdr (s)) { - SCM var = ly_module_lookup (ly_car (s), sym); + SCM var = ly_module_lookup (scm_car (s), sym); if (var != SCM_BOOL_F) return scm_variable_ref (var); } @@ -204,7 +204,7 @@ Lily_lexer::start_main_input () /* Do not allow \include in --safe-mode */ allow_includes_b_ = allow_includes_b_ && !safe_global_b; - scm_module_define (ly_car (scopes_), + scm_module_define (scm_car (scopes_), ly_symbol2scm ("input-file-name"), scm_makfrom0str (main_input_name_.to_str0 ())); } @@ -224,7 +224,7 @@ Lily_lexer::set_identifier (SCM name, SCM s) warning (_f ("Identifier name is a keyword: `%s'", symstr.to_str0())); } - SCM mod = ly_car (scopes_); + SCM mod = scm_car (scopes_); scm_module_define (mod, sym, s); } @@ -295,7 +295,7 @@ IMPLEMENT_DEFAULT_EQUAL_P (Lily_lexer); SCM Lily_lexer::mark_smob (SCM s) { - Lily_lexer *lexer = (Lily_lexer*) ly_cdr (s); + Lily_lexer *lexer = (Lily_lexer*) scm_cdr (s); scm_gc_mark (lexer->chordmodifier_tab_); scm_gc_mark (lexer->pitchname_tab_stack_); diff --git a/lily/lily-parser.cc b/lily/lily-parser.cc index 6f3c510906..b6c049e379 100644 --- a/lily/lily-parser.cc +++ b/lily/lily-parser.cc @@ -66,7 +66,7 @@ IMPLEMENT_DEFAULT_EQUAL_P (Lily_parser); SCM Lily_parser::mark_smob (SCM s) { - Lily_parser *parser = (Lily_parser*) ly_cdr (s); + Lily_parser *parser = (Lily_parser*) scm_cdr (s); return (parser->lexer_) ? parser->lexer_->self_scm () : SCM_EOL; } @@ -74,7 +74,7 @@ int Lily_parser::print_smob (SCM s, SCM port, scm_print_state*) { scm_puts ("#<my_lily_parser ", port); - Lily_parser *parser = (Lily_parser*) ly_cdr (s); + Lily_parser *parser = (Lily_parser*) scm_cdr (s); (void) parser; scm_puts (" >", port); return 1; @@ -125,7 +125,7 @@ Lily_parser::parse_string (String ly_code) SCM oldmod = scm_current_module (); - scm_set_current_module (ly_car (lexer_->scopes_)); + scm_set_current_module (scm_car (lexer_->scopes_)); // TODO: use $parser lexer_->set_identifier (ly_symbol2scm ("parser"), diff --git a/lily/lookup.cc b/lily/lookup.cc index 63c37a2c97..d0c7ed4dbd 100644 --- a/lily/lookup.cc +++ b/lily/lookup.cc @@ -452,8 +452,8 @@ Stencil Lookup::accordion (SCM s, Real staff_space, Font_metric *fm) { Stencil m; - String sym = ly_scm2string (ly_car (s)); - String reg = ly_scm2string (ly_car (ly_cdr (s))); + String sym = ly_scm2string (scm_car (s)); + String reg = ly_scm2string (scm_car (scm_cdr (s))); if (sym == "Discant") { diff --git a/lily/ly-module.cc b/lily/ly-module.cc index ab0d15d405..4ee3c5d273 100644 --- a/lily/ly-module.cc +++ b/lily/ly-module.cc @@ -139,9 +139,9 @@ LY_DEFINE (ly_modules_lookup, "ly:modules-lookup", "returning the first occurence. " "If not found, return @var{default}, or @code{#f}.") { - for (SCM s = modules; ly_c_pair_p (s); s = ly_cdr (s)) + for (SCM s = modules; scm_is_pair (s); s = scm_cdr (s)) { - SCM mod = ly_car (s); + SCM mod = scm_car (s); SCM v = scm_sym2var (sym, scm_module_lookup_closure (mod), SCM_UNDEFINED); if (SCM_VARIABLEP(v) && SCM_VARIABLE_REF(v) != SCM_UNDEFINED) diff --git a/lily/lyric-combine-music-iterator.cc b/lily/lyric-combine-music-iterator.cc index 39d2418507..feebdceb0f 100644 --- a/lily/lyric-combine-music-iterator.cc +++ b/lily/lyric-combine-music-iterator.cc @@ -45,9 +45,9 @@ melisma_busy (Context* tr) SCM melisma_properties = tr->get_property ("melismaBusyProperties"); bool busy = false; - for (; ly_c_pair_p (melisma_properties); - melisma_properties = ly_cdr (melisma_properties)) - busy = busy || to_boolean (tr->internal_get_property (ly_car (melisma_properties))); + for (; scm_is_pair (melisma_properties); + melisma_properties = scm_cdr (melisma_properties)) + busy = busy || to_boolean (tr->internal_get_property (scm_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 (; ly_c_pair_p (grobs); grobs = ly_cdr (grobs)) + for (; scm_is_pair (grobs); grobs = scm_cdr (grobs)) { - SCM grob = ly_cdar (grobs); - Moment end =*unsmob_moment (ly_caar (grobs)); + SCM grob = scm_cdar (grobs); + Moment end =*unsmob_moment (scm_caar (grobs)); /* diff --git a/lily/lyric-combine-music.cc b/lily/lyric-combine-music.cc index 9abad8a958..021c915953 100644 --- a/lily/lyric-combine-music.cc +++ b/lily/lyric-combine-music.cc @@ -25,9 +25,9 @@ Music* Lyric_combine_music::get_music () const { SCM l = get_property ("elements"); - if (!ly_c_pair_p (l)) + if (!scm_is_pair (l)) return 0; - return unsmob_music (ly_car (l)); + return unsmob_music (scm_car (l)); } @@ -35,12 +35,12 @@ Music* Lyric_combine_music::get_lyrics () const { SCM l = get_property ("elements"); - if (!ly_c_pair_p (l)) + if (!scm_is_pair (l)) return 0; - l = ly_cdr (l); - if (!ly_c_pair_p (l)) + l = scm_cdr (l); + if (!scm_is_pair (l)) return 0; - return unsmob_music (ly_car (l)); + return unsmob_music (scm_car (l)); } diff --git a/lily/lyric-engraver.cc b/lily/lyric-engraver.cc index 6ccdc44823..552d46151f 100644 --- a/lily/lyric-engraver.cc +++ b/lily/lyric-engraver.cc @@ -110,9 +110,9 @@ Grob * get_current_note_head (Context *voice) { for (SCM s = voice->get_property ("busyGrobs"); - ly_c_pair_p (s); s = ly_cdr (s)) + scm_is_pair (s); s = scm_cdr (s)) { - Item *g = dynamic_cast<Item*> (unsmob_grob (ly_cdar (s))); + Item *g = dynamic_cast<Item*> (unsmob_grob (scm_cdar (s))); if (g && !g->get_column () && Note_head::has_interface (g)) diff --git a/lily/main.cc b/lily/main.cc index 12c6598ac8..4e05741952 100644 --- a/lily/main.cc +++ b/lily/main.cc @@ -256,9 +256,9 @@ determine_output_options () bool found_tex = false; SCM formats = ly_output_formats (); - for (SCM s = formats; ly_c_pair_p (s); s = ly_cdr (s)) + for (SCM s = formats; scm_is_pair (s); s = scm_cdr (s)) { - found_tex = found_tex || (ly_scm2string (ly_car (s)) == "tex"); + found_tex = found_tex || (ly_scm2string (scm_car (s)) == "tex"); } diff --git a/lily/measure-grouping-engraver.cc b/lily/measure-grouping-engraver.cc index 2ee9054c81..b6996ca74e 100644 --- a/lily/measure-grouping-engraver.cc +++ b/lily/measure-grouping-engraver.cc @@ -63,7 +63,7 @@ Measure_grouping_engraver::process_music () return; SCM grouping = get_property ("beatGrouping"); - if (ly_c_pair_p (grouping)) + if (scm_is_pair (grouping)) { Moment *measpos = unsmob_moment (get_property ("measurePosition")); Rational mp = measpos->main_part_; @@ -72,12 +72,12 @@ Measure_grouping_engraver::process_music () Rational bl = beatlen->main_part_; Rational where (0); - for (SCM s = grouping; ly_c_pair_p (s); - where += Rational (scm_to_int (ly_car (s))) * bl, - s = ly_cdr (s) + for (SCM s = grouping; scm_is_pair (s); + where += Rational (scm_to_int (scm_car (s))) * bl, + s = scm_cdr (s) ) { - int grouplen = scm_to_int (ly_car (s)); + int grouplen = scm_to_int (scm_car (s)); if (where == mp) { if (grouping_) diff --git a/lily/modified-font-metric.cc b/lily/modified-font-metric.cc index b3e56980a7..c6afc58392 100644 --- a/lily/modified-font-metric.cc +++ b/lily/modified-font-metric.cc @@ -34,10 +34,10 @@ Modified_font_metric::Modified_font_metric (String input_encoding, SCM desc = m->description_; - Real total_mag = magn * scm_to_double (ly_cdr (desc)); + Real total_mag = magn * scm_to_double (scm_cdr (desc)); assert (total_mag); - description_ = scm_cons (ly_car (desc), scm_make_real (total_mag)); + description_ = scm_cons (scm_car (desc), scm_make_real (total_mag)); orig_ = m; if (coding_scheme_ != "" diff --git a/lily/moment.cc b/lily/moment.cc index a7d0e8ddb9..74c1573e0a 100644 --- a/lily/moment.cc +++ b/lily/moment.cc @@ -46,7 +46,7 @@ Moment::mark_smob (SCM) int Moment::print_smob (SCM s, SCM port, scm_print_state *) { - Moment *r = (Moment *) ly_cdr (s); + Moment *r = (Moment *) scm_cdr (s); scm_puts ("#<Mom ", port); String str = r->to_string (); diff --git a/lily/multi-measure-rest.cc b/lily/multi-measure-rest.cc index cb9cd684e9..1b57cd7e52 100644 --- a/lily/multi-measure-rest.cc +++ b/lily/multi-measure-rest.cc @@ -279,8 +279,8 @@ Multi_measure_rest::church_rest (Grob *me, Font_metric *musfont, int measures, inner_padding = 1.0; Stencil mol; - for (SCM s = mols; ly_c_pair_p (s); s = ly_cdr (s)) - mol.add_at_edge (X_AXIS, LEFT, *unsmob_stencil (ly_car (s)), + for (SCM s = mols; scm_is_pair (s); s = scm_cdr (s)) + mol.add_at_edge (X_AXIS, LEFT, *unsmob_stencil (scm_car (s)), inner_padding, 0); mol.align_to (X_AXIS, LEFT); mol.translate_axis (outer_padding_factor * inner_padding, X_AXIS); diff --git a/lily/music-function.cc b/lily/music-function.cc index 6e3c5ac93e..e496ec6838 100644 --- a/lily/music-function.cc +++ b/lily/music-function.cc @@ -35,14 +35,14 @@ LY_DEFINE (ly_make_music_function, "ly:make-music-function", 2, 0, 0, "@code{ly:music?} predicates or other type predicates.") { String str = ""; - for (SCM s = signature; ly_c_pair_p (s); s = ly_cdr (s)) + for (SCM s = signature; scm_is_pair (s); s = scm_cdr (s)) { if (str != "") str += "-"; - if (ly_car (s) == Music_type_p_proc) + if (scm_car (s) == Music_type_p_proc) str += "music"; - else if (ly_c_procedure_p (ly_car (s))) + else if (ly_c_procedure_p (scm_car (s))) str += "scm"; } if (str == "") str = "noarg"; diff --git a/lily/music-sequence.cc b/lily/music-sequence.cc index 90b5258f1d..3ba671e27b 100644 --- a/lily/music-sequence.cc +++ b/lily/music-sequence.cc @@ -36,8 +36,8 @@ Music_sequence::Music_sequence ( ) void transpose_music_list (SCM l, Pitch rq) { - for (SCM s = l; ly_c_pair_p (s); s = ly_cdr (s)) - unsmob_music (ly_car (s))->transpose (rq); + for (SCM s = l; scm_is_pair (s); s = scm_cdr (s)) + unsmob_music (scm_car (s))->transpose (rq); } Moment @@ -46,9 +46,9 @@ Music_sequence::cumulative_length (SCM l) Moment cumulative; Moment last_len; - for (SCM s = l; ly_c_pair_p (s); s = ly_cdr (s)) + for (SCM s = l; scm_is_pair (s); s = scm_cdr (s)) { - Moment l = unsmob_music (ly_car (s))->get_length (); + Moment l = unsmob_music (scm_car (s))->get_length (); if (last_len.grace_part_ && l.main_part_) { last_len.grace_part_ = Rational (0); @@ -67,9 +67,9 @@ Moment Music_sequence::maximum_length (SCM l) { Moment dur = 0; - for (SCM s = l; ly_c_pair_p (s); s = ly_cdr (s)) + for (SCM s = l; scm_is_pair (s); s = scm_cdr (s)) { - Music * m = unsmob_music (ly_car (s)); + Music * m = unsmob_music (scm_car (s)); Moment l = m->get_length (); dur = dur >? l; } @@ -84,9 +84,9 @@ music_list_to_relative (SCM l,Pitch p, bool ret_first) int count=0; Pitch last = p; - for (SCM s = l; ly_c_pair_p (s); s = ly_cdr (s)) + for (SCM s = l; scm_is_pair (s); s = scm_cdr (s)) { - if (Music *m = unsmob_music (ly_car (s))) + if (Music *m = unsmob_music (scm_car (s))) { last = m->to_relative_octave (last); if (!count ++) @@ -101,8 +101,8 @@ music_list_to_relative (SCM l,Pitch p, bool ret_first) void compress_music_list (SCM l, Moment m) { - for (SCM s = l; ly_c_pair_p (s); s = ly_cdr (s)) - unsmob_music (ly_car (s))->compress (m); + for (SCM s = l; scm_is_pair (s); s = scm_cdr (s)) + unsmob_music (scm_car (s))->compress (m); } ADD_MUSIC (Music_sequence); @@ -112,9 +112,9 @@ Music_sequence::minimum_start (SCM l) { Moment m; - for (SCM s = l; ly_c_pair_p (s); s = ly_cdr (s)) + for (SCM s = l; scm_is_pair (s); s = scm_cdr (s)) { - m = m <? unsmob_music (ly_car (s))->start_mom (); + m = m <? unsmob_music (scm_car (s))->start_mom (); } return m; } @@ -124,9 +124,9 @@ Music_sequence::first_start (SCM l) { Moment m; - for (SCM s = l; ly_c_pair_p (s); s = ly_cdr (s)) + for (SCM s = l; scm_is_pair (s); s = scm_cdr (s)) { - Music * mus = unsmob_music (ly_car (s)); + Music * mus = unsmob_music (scm_car (s)); Moment l = mus->get_length (); Moment s = mus->start_mom (); if (l.to_bool () || s.to_bool ()) diff --git a/lily/music.cc b/lily/music.cc index a729802b6c..32c0ad3bc5 100644 --- a/lily/music.cc +++ b/lily/music.cc @@ -114,11 +114,11 @@ void print_alist (SCM a, SCM port) { /* SCM_EOL -> catch malformed lists. */ - for (SCM s = a; ly_c_pair_p (s); s = ly_cdr (s)) + for (SCM s = a; scm_is_pair (s); s = scm_cdr (s)) { - scm_display (ly_caar (s), port); + scm_display (scm_caar (s), port); scm_puts (" = ", port); - scm_write (ly_cdar (s), port); + scm_write (scm_cdar (s), port); scm_puts ("\n", port); } } @@ -186,10 +186,10 @@ Music::internal_get_property (SCM sym) const { SCM s = scm_sloppy_assq (sym, mutable_property_alist_); if (s != SCM_BOOL_F) - return ly_cdr (s); + return scm_cdr (s); s = scm_sloppy_assq (sym, immutable_property_alist_); - return (s == SCM_BOOL_F) ? SCM_EOL : ly_cdr (s); + return (s == SCM_BOOL_F) ? SCM_EOL : scm_cdr (s); } void @@ -320,11 +320,11 @@ LY_DEFINE (ly_music_list_p,"ly:music-list?", "of music objects.") { if (scm_list_p (lst) == SCM_BOOL_T) - while (ly_c_pair_p (lst)) + while (scm_is_pair (lst)) { - if (!unsmob_music (ly_car (lst))) + if (!unsmob_music (scm_car (lst))) return SCM_BOOL_F; - lst = ly_cdr (lst); + lst = scm_cdr (lst); } return SCM_BOOL_T; @@ -340,9 +340,9 @@ LY_DEFINE (ly_deep_mus_copy, "ly:music-deep-copy", copy = unsmob_music (m)->clone ()->self_scm (); scm_gc_unprotect_object (copy); } - else if (ly_c_pair_p (m)) - copy = scm_cons (ly_deep_mus_copy (ly_car (m)), - ly_deep_mus_copy (ly_cdr (m))); + else if (scm_is_pair (m)) + copy = scm_cons (ly_deep_mus_copy (scm_car (m)), + ly_deep_mus_copy (scm_cdr (m))); return copy; } diff --git a/lily/new-fingering-engraver.cc b/lily/new-fingering-engraver.cc index 843cae76d2..681e61ba4e 100644 --- a/lily/new-fingering-engraver.cc +++ b/lily/new-fingering-engraver.cc @@ -69,9 +69,9 @@ New_fingering_engraver::acknowledge_grob (Grob_info inf) SCM arts = note_ev->get_property ("articulations"); - for (SCM s = arts; ly_c_pair_p (s); s = ly_cdr (s)) + for (SCM s = arts; scm_is_pair (s); s = scm_cdr (s)) { - Music * m = unsmob_music (ly_car (s)); + Music * m = unsmob_music (scm_car (s)); if (!m) continue; diff --git a/lily/note-collision.cc b/lily/note-collision.cc index c633aafdd2..d8d015c84c 100644 --- a/lily/note-collision.cc +++ b/lily/note-collision.cc @@ -318,10 +318,10 @@ Note_collision_interface::do_shifts (Grob* me) Real left_most = 1e6; Array<Real> amounts; - for (; ly_c_pair_p (hand); hand =ly_cdr (hand)) + for (; scm_is_pair (hand); hand =scm_cdr (hand)) { - Grob * s = unsmob_grob (ly_caar (hand)); - Real amount = scm_to_double (ly_cdar (hand)) * wid; + Grob * s = unsmob_grob (scm_caar (hand)); + Real amount = scm_to_double (scm_cdar (hand)) * wid; done.push (s); amounts.push (amount); @@ -329,10 +329,10 @@ Note_collision_interface::do_shifts (Grob* me) left_most = amount; } - for (; ly_c_pair_p (autos); autos =ly_cdr (autos)) + for (; scm_is_pair (autos); autos =scm_cdr (autos)) { - Grob * s = unsmob_grob (ly_caar (autos)); - Real amount = scm_to_double (ly_cdar (autos)) *wid; + Grob * s = unsmob_grob (scm_caar (autos)); + Real amount = scm_to_double (scm_cdar (autos)) *wid; if (!done.find (s)) { @@ -355,9 +355,9 @@ Note_collision_interface::get_clash_groups (Grob *me) Drul_array<Link_array<Grob> > clash_groups; SCM s = me->get_property ("elements"); - for (; ly_c_pair_p (s); s = ly_cdr (s)) + for (; scm_is_pair (s); s = scm_cdr (s)) { - SCM car = ly_car (s); + SCM car = scm_car (s); Grob * se = unsmob_grob (car); if (Note_column::has_interface (se)) @@ -481,9 +481,9 @@ Note_collision_interface::forced_shift (Grob *me) SCM tups = SCM_EOL; SCM s = me->get_property ("elements"); - for (; ly_c_pair_p (s); s = ly_cdr (s)) + for (; scm_is_pair (s); s = scm_cdr (s)) { - Grob * se = unsmob_grob (ly_car (s)); + Grob * se = unsmob_grob (scm_car (s)); SCM force = se->get_property ("force-hshift"); if (scm_is_number (force)) diff --git a/lily/note-column.cc b/lily/note-column.cc index 230bf38000..a3afffe426 100644 --- a/lily/note-column.cc +++ b/lily/note-column.cc @@ -55,9 +55,9 @@ Note_column::head_positions_interval (Grob *me) iv.set_empty (); SCM h = me->get_property ("note-heads"); - for (; ly_c_pair_p (h); h = ly_cdr (h)) + for (; scm_is_pair (h); h = scm_cdr (h)) { - Grob *se = unsmob_grob (ly_car (h)); + Grob *se = unsmob_grob (scm_car (h)); int j = Staff_symbol_referencer::get_rounded_position (se); iv.unite (Slice (j,j)); @@ -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 (ly_c_pair_p (me->get_property ("note-heads"))) + else if (scm_is_pair (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 (ly_c_pair_p (me->get_property ("note-heads"))) + if (scm_is_pair (me->get_property ("note-heads"))) both = true; else me->set_property ("rest", h->self_scm ()); @@ -158,9 +158,9 @@ Note_column::accidentals (Grob *me) { SCM heads = me->get_property ("note-heads"); Grob * acc = 0; - for (;ly_c_pair_p (heads); heads =ly_cdr (heads)) + for (;scm_is_pair (heads); heads =scm_cdr (heads)) { - Grob * h = unsmob_grob (ly_car (heads)); + Grob * h = unsmob_grob (scm_car (heads)); acc = h ? unsmob_grob (h->get_property ("accidental-grob")) : 0; if (acc) break; diff --git a/lily/note-head.cc b/lily/note-head.cc index 4fd2bd06f0..9b25d3ee95 100644 --- a/lily/note-head.cc +++ b/lily/note-head.cc @@ -136,10 +136,10 @@ Note_head::stem_attachment_coordinate (Grob *me, Axis a) return 0.0; SCM result = scm_call_2 (v, me->self_scm (), scm_int2num (a)); - if (!ly_c_pair_p (result)) + if (!scm_is_pair (result)) return 0.0; - result = (a == X_AXIS) ? ly_car (result) : ly_cdr (result); + result = (a == X_AXIS) ? scm_car (result) : scm_cdr (result); return robust_scm2double (result,0); } diff --git a/lily/note-spacing.cc b/lily/note-spacing.cc index 57af38e0e2..70f062ec73 100644 --- a/lily/note-spacing.cc +++ b/lily/note-spacing.cc @@ -42,9 +42,9 @@ Note_spacing::get_spacing (Grob *me, Item* right_col, Interval left_head_wid; do { - for (SCM s = props[d]; ly_c_pair_p (s); s = ly_cdr (s)) + for (SCM s = props[d]; scm_is_pair (s); s = scm_cdr (s)) { - Item * it= dynamic_cast<Item*> (unsmob_grob (ly_car (s))); + Item * it= dynamic_cast<Item*> (unsmob_grob (scm_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 ; ly_c_pair_p (s) ; s = ly_cdr (s)) + for (SCM s = right ; scm_is_pair (s) ; s = scm_cdr (s)) { - Item * ri = unsmob_item (ly_car (s)); + Item * ri = unsmob_item (scm_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 ; ly_c_pair_p (s) ; s =ly_cdr (s)) + for (SCM s = right ; scm_is_pair (s) ; s =scm_cdr (s)) { - if (unsmob_item (ly_car (s))->get_column () == mincol) - newright = scm_cons (ly_car (s), newright); + if (unsmob_item (scm_car (s))->get_column () == mincol) + newright = scm_cons (scm_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]; ly_c_pair_p (s); s = ly_cdr (s)) + for (SCM s = props[d]; scm_is_pair (s); s = scm_cdr (s)) { - Item * it= dynamic_cast<Item*> (unsmob_grob (ly_car (s))); + Item * it= dynamic_cast<Item*> (unsmob_grob (scm_car (s))); if (d == RIGHT) acc_right = acc_right || Note_column::accidentals (it); diff --git a/lily/ottava-bracket.cc b/lily/ottava-bracket.cc index 3c9c34f487..dac4104665 100644 --- a/lily/ottava-bracket.cc +++ b/lily/ottava-bracket.cc @@ -58,9 +58,9 @@ Ottava_bracket::print (SCM smob) { SCM heads = b->get_property ("note-heads"); common = common_refpoint_of_list (heads, common, X_AXIS); - for (SCM s = heads; ly_c_pair_p (s); s =ly_cdr (s)) + for (SCM s = heads; scm_is_pair (s); s =scm_cdr (s)) { - Grob * h = unsmob_grob (ly_car (s)); + Grob * h = unsmob_grob (scm_car (s)); Grob * dots = Rhythmic_head::get_dots (h); if (dots) common = dots->common_refpoint (common, X_AXIS); @@ -91,9 +91,9 @@ Ottava_bracket::print (SCM smob) Interval ext; if (Note_column::has_interface (b)) { - for (SCM s = b->get_property ("note-heads"); ly_c_pair_p (s); s =ly_cdr (s)) + for (SCM s = b->get_property ("note-heads"); scm_is_pair (s); s =scm_cdr (s)) { - Grob * h = unsmob_grob (ly_car (s)); + Grob * h = unsmob_grob (scm_car (s)); ext.unite (h->extent (common, X_AXIS)); Grob * dots = Rhythmic_head::get_dots (h); diff --git a/lily/output-def.cc b/lily/output-def.cc index 21139546c9..bd05a9fbc1 100644 --- a/lily/output-def.cc +++ b/lily/output-def.cc @@ -175,10 +175,10 @@ LY_DEFINE (ly_output_description, "ly:output-description", SCM al = ly_module2alist (id->scope_); SCM ell = SCM_EOL; - for (SCM s = al; ly_c_pair_p (s); s = ly_cdr (s)) + for (SCM s = al; scm_is_pair (s); s = scm_cdr (s)) { - Context_def * td = unsmob_context_def (ly_cdar (s)); - SCM key = ly_caar (s); + Context_def * td = unsmob_context_def (scm_cdar (s)); + SCM key = scm_caar (s); if (td && key == td->get_context_name ()) ell = scm_cons (scm_cons (key, td->to_alist ()), ell); } diff --git a/lily/paper-book.cc b/lily/paper-book.cc index da5b2453c3..ca7ec1e94c 100644 --- a/lily/paper-book.cc +++ b/lily/paper-book.cc @@ -53,7 +53,7 @@ Paper_book::mark_smob (SCM smob) int Paper_book::print_smob (SCM smob, SCM port, scm_print_state*) { - Paper_book *b = (Paper_book*) ly_cdr (smob); + Paper_book *b = (Paper_book*) scm_cdr (smob); scm_puts ("#<", port); scm_puts (classname (b), port); @@ -155,9 +155,9 @@ Paper_book::output (String outname) pages (); SCM formats = ly_output_formats (); - for (SCM s = formats; ly_c_pair_p (s); s = ly_cdr (s)) + for (SCM s = formats; scm_is_pair (s); s = scm_cdr (s)) { - String format = ly_scm2string (ly_car (s)); + String format = ly_scm2string (scm_car (s)); String file_name = outname; if (file_name != "-") @@ -384,9 +384,9 @@ Paper_book::systems () int i = 0; Paper_system *last = 0; - for (SCM s = systems_; s != SCM_EOL; s = ly_cdr (s)) + for (SCM s = systems_; s != SCM_EOL; s = scm_cdr (s)) { - Paper_system *ps = unsmob_paper_system (ly_car (s)); + Paper_system *ps = unsmob_paper_system (scm_car (s)); ps->number_ = ++i; if (last && last->is_title ()) diff --git a/lily/paper-column.cc b/lily/paper-column.cc index 22bc32a774..02ab4224f5 100644 --- a/lily/paper-column.cc +++ b/lily/paper-column.cc @@ -99,8 +99,8 @@ Paper_column::is_musical (Grob *me) bool Paper_column::is_used (Grob*me) { - return ly_c_pair_p (me->get_property ("elements")) || Item::is_breakable (me) - || ly_c_pair_p (me->get_property ("bounded-by-me")) + return scm_is_pair (me->get_property ("elements")) || Item::is_breakable (me) + || scm_is_pair (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 (ly_c_pair_p (*ptrptr)) + while (scm_is_pair (*ptrptr)) { - Grob * g = unsmob_grob (ly_car (*ptrptr)); + Grob * g = unsmob_grob (scm_car (*ptrptr)); if (!g || !g->is_live ()) { - *ptrptr = ly_cdr (*ptrptr); + *ptrptr = scm_cdr (*ptrptr); } else { diff --git a/lily/paper-system.cc b/lily/paper-system.cc index 885296a3ec..0c0e3d5500 100644 --- a/lily/paper-system.cc +++ b/lily/paper-system.cc @@ -36,14 +36,14 @@ Paper_system::~Paper_system () SCM Paper_system::mark_smob (SCM smob) { - Paper_system *system = (Paper_system*) ly_cdr (smob); + Paper_system *system = (Paper_system*) scm_cdr (smob); return system-> stencil_.expr (); } int Paper_system::print_smob (SCM smob, SCM port, scm_print_state*) { - Paper_system *p = (Paper_system*) ly_cdr (smob); + Paper_system *p = (Paper_system*) scm_cdr (smob); scm_puts ("#<", port); scm_puts (classname (p), port); scm_puts (" ", port); diff --git a/lily/parse-scm.cc b/lily/parse-scm.cc index 2ad5a0c1ce..a18a6b42c3 100644 --- a/lily/parse-scm.cc +++ b/lily/parse-scm.cc @@ -84,7 +84,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 (ly_cadr (args), ly_caddr (args), scm_current_error_port ()); + scm_display_error_message (scm_cadr (args), scm_caddr (args), scm_current_error_port ()); /* The following is a kludge; we should probably search for diff --git a/lily/parser.yy b/lily/parser.yy index c8ce217748..f7885478b8 100644 --- a/lily/parser.yy +++ b/lily/parser.yy @@ -119,8 +119,8 @@ is_duration (int t) void set_music_properties (Music *p, SCM a) { - for (SCM k = a; ly_c_pair_p (k); k = ly_cdr (k)) - p->internal_set_property (ly_caar (k), ly_cdar (k)); + for (SCM k = a; ly_c_pair_p (k); k = scm_cdr (k)) + p->internal_set_property (scm_caar (k), scm_cdar (k)); } SCM @@ -150,7 +150,7 @@ bool ly_input_procedure_p (SCM x) { return ly_c_procedure_p (x) - || (ly_c_pair_p (x) && ly_c_procedure_p (ly_car (x))); + || (ly_c_pair_p (x) && ly_c_procedure_p (scm_car (x))); } Music* @@ -611,12 +611,12 @@ context_def_spec_body: | context_def_spec_body GROBDESCRIPTIONS embedded_scm { Context_def*td = unsmob_context_def ($$); - for (SCM p = $3; ly_c_pair_p (p); p = ly_cdr (p)) { - SCM tag = ly_caar (p); + for (SCM p = $3; ly_c_pair_p (p); p = scm_cdr (p)) { + SCM tag = scm_caar (p); /* TODO: should make new tag "grob-definition" ? */ td->add_context_mod (scm_list_3 (ly_symbol2scm ("assign"), - tag, scm_cons (ly_cdar (p), SCM_EOL))); + tag, scm_cons (scm_cdar (p), SCM_EOL))); } } | context_def_spec_body context_mod { @@ -816,8 +816,8 @@ Music_list: SCM c = scm_cons ($2->self_scm (), SCM_EOL); scm_gc_unprotect_object ($2->self_scm ()); /* UGH */ - if (ly_c_pair_p (ly_cdr (s))) - scm_set_cdr_x (ly_cdr (s), c); /* append */ + if (ly_c_pair_p (scm_cdr (s))) + scm_set_cdr_x (scm_cdr (s), c); /* append */ else scm_set_car_x (s, c); /* set first cons */ scm_set_cdr_x (s, c); /* remember last cell */ @@ -833,8 +833,8 @@ Music_list: SCM c = scm_cons (m->self_scm (), SCM_EOL); scm_gc_unprotect_object (m->self_scm ()); /* UGH */ - if (ly_c_pair_p (ly_cdr (s))) - scm_set_cdr_x (ly_cdr (s), c); /* append */ + if (ly_c_pair_p (scm_cdr (s))) + scm_set_cdr_x (scm_cdr (s), c); /* append */ else scm_set_car_x (s, c); /* set first cons */ scm_set_cdr_x (s, c); /* remember last cell */ @@ -861,9 +861,9 @@ Repeated_music: { Music *beg = $4; int times = $3; - SCM alts = ly_c_pair_p ($5) ? ly_car ($5) : SCM_EOL; + SCM alts = ly_c_pair_p ($5) ? scm_car ($5) : SCM_EOL; if (times < scm_ilength (alts)) { - unsmob_music (ly_car (alts)) + unsmob_music (scm_car (alts)) ->origin ()->warning ( _ ("More alternatives than repeats. Junking excess alternatives.")); alts = ly_truncate_list (times, alts); @@ -918,12 +918,12 @@ Repeated_music: Sequential_music: SEQUENTIAL '{' Music_list '}' { $$ = MY_MAKE_MUSIC ("SequentialMusic"); - $$->set_property ("elements", ly_car ($3)); + $$->set_property ("elements", scm_car ($3)); $$->set_spot (THIS->here_input ()); } | '{' Music_list '}' { $$ = MY_MAKE_MUSIC ("SequentialMusic"); - $$->set_property ("elements", ly_car ($2)); + $$->set_property ("elements", scm_car ($2)); $$->set_spot (THIS->here_input ()); } ; @@ -931,13 +931,13 @@ Sequential_music: Simultaneous_music: SIMULTANEOUS '{' Music_list '}'{ $$ = MY_MAKE_MUSIC ("SimultaneousMusic"); - $$->set_property ("elements", ly_car ($3)); + $$->set_property ("elements", scm_car ($3)); $$->set_spot (THIS->here_input ()); } | simul_open Music_list simul_close { $$ = MY_MAKE_MUSIC ("SimultaneousMusic"); - $$->set_property ("elements", ly_car ($2)); + $$->set_property ("elements", scm_car ($2)); $$->set_spot (THIS->here_input ()); } ; @@ -1025,17 +1025,17 @@ Generic_prefix_music_scm: Generic_prefix_music: Generic_prefix_music_scm { - SCM func = ly_car ($1); - Input *loc = unsmob_input (ly_cadr ($1)); - SCM args = ly_cddr ($1); + SCM func = scm_car ($1); + Input *loc = unsmob_input (scm_cadr ($1)); + SCM args = scm_cddr ($1); SCM sig = scm_object_property (func, ly_symbol2scm ("music-function-signature")); int k = 0; bool ok = true; for (SCM s = sig, t = args; ok && ly_c_pair_p (s) && ly_c_pair_p (t); - s = ly_cdr (s), t = ly_cdr (t)) { + s = scm_cdr (s), t = scm_cdr (t)) { k++; - if (scm_call_1 (ly_car (s), ly_car (t)) != SCM_BOOL_T) + if (scm_call_1 (scm_car (s), scm_car (t)) != SCM_BOOL_T) { loc->error (_f ("Argument %d failed typecheck", k)); THIS->error_level_ = 1; @@ -1044,7 +1044,7 @@ Generic_prefix_music: } SCM m = SCM_EOL; if (ok) - m = scm_apply_0 (func, ly_cdr ($1)); + m = scm_apply_0 (func, scm_cdr ($1)); if (unsmob_music (m)) { $$ = unsmob_music (m); @@ -1084,7 +1084,7 @@ Prefix_composite_music: fraction Music { - int n = scm_to_int (ly_car ($3)); int d = scm_to_int (ly_cdr ($3)); + int n = scm_to_int (scm_car ($3)); int d = scm_to_int (scm_cdr ($3)); Music *mp = $4; $$= MY_MAKE_MUSIC ("TimeScaledMusic"); @@ -1247,9 +1247,9 @@ re_rhythmed_music: Music *all = MY_MAKE_MUSIC ("SimultaneousMusic"); SCM lst = SCM_EOL; - for (SCM s = $2; ly_c_pair_p (s); s = ly_cdr (s)) + for (SCM s = $2; ly_c_pair_p (s); s = scm_cdr (s)) { - Music *music = unsmob_music (ly_car (s)); + Music *music = unsmob_music (scm_car (s)); Music *com = make_lyric_combine_music (name, music); Music *csm = context_spec_music (context, get_next_unique_context (), com, SCM_EOL); @@ -1343,30 +1343,30 @@ music_property_def: OVERRIDE context_prop_spec embedded_scm '=' scalar { $$ = property_op_to_music (scm_list_4 ( ly_symbol2scm ("poppush"), - ly_cadr ($2), + scm_cadr ($2), $3, $5)); - $$= context_spec_music (ly_car ($2), SCM_UNDEFINED, $$, SCM_EOL); + $$= context_spec_music (scm_car ($2), SCM_UNDEFINED, $$, SCM_EOL); } | REVERT context_prop_spec embedded_scm { $$ = property_op_to_music (scm_list_3 ( ly_symbol2scm ("pop"), - ly_cadr ($2), + scm_cadr ($2), $3)); - $$= context_spec_music (ly_car ($2), SCM_UNDEFINED, $$, SCM_EOL); + $$= context_spec_music (scm_car ($2), SCM_UNDEFINED, $$, SCM_EOL); } | SET context_prop_spec '=' scalar { $$ = property_op_to_music (scm_list_3 ( ly_symbol2scm ("assign"), - ly_cadr ($2), + scm_cadr ($2), $4)); - $$= context_spec_music (ly_car ($2), SCM_UNDEFINED, $$, SCM_EOL); + $$= context_spec_music (scm_car ($2), SCM_UNDEFINED, $$, SCM_EOL); } | UNSET context_prop_spec { $$ = property_op_to_music (scm_list_2 ( ly_symbol2scm ("unset"), - ly_cadr ($2))); - $$= context_spec_music (ly_car ($2), SCM_UNDEFINED, $$, SCM_EOL); + scm_cadr ($2))); + $$= context_spec_music (scm_car ($2), SCM_UNDEFINED, $$, SCM_EOL); } | ONCE music_property_def { SCM e = $2->get_property ("element"); @@ -1462,8 +1462,8 @@ note_chord_element: SCM es = $1->get_property ("elements"); SCM postevs = scm_reverse_x ($3, SCM_EOL); - for (SCM s = es; ly_c_pair_p (s); s = ly_cdr (s)) - unsmob_music (ly_car (s))->set_property ("duration", dur); + for (SCM s = es; ly_c_pair_p (s); s = scm_cdr (s)) + unsmob_music (scm_car (s))->set_property ("duration", dur); es = ly_append2 (es, postevs); $1-> set_property ("elements", es); @@ -1651,7 +1651,7 @@ command_element: | TIME_T fraction { SCM proc= ly_scheme_function ("make-time-signature-set"); - SCM result = scm_apply_2 (proc, ly_car ($2), ly_cdr ($2), SCM_EOL); + SCM result = scm_apply_2 (proc, scm_car ($2), scm_cdr ($2), SCM_EOL); scm_gc_protect_object (result); $$ = unsmob_music (result); } @@ -2008,7 +2008,7 @@ multiplied_duration: $$ = unsmob_duration ($$)->compressed ( $3) .smobbed_copy (); } | multiplied_duration '*' FRACTION { - Rational m (scm_to_int (ly_car ($3)), scm_to_int (ly_cdr ($3))); + Rational m (scm_to_int (scm_car ($3)), scm_to_int (scm_cdr ($3))); $$ = unsmob_duration ($$)->compressed (m).smobbed_copy (); } @@ -2180,9 +2180,9 @@ simple_element: Music *m = unsmob_music ($1); Input i = THIS->pop_spot (); m->set_spot (i); - for (SCM s = m->get_property ("elements"); ly_c_pair_p (s); s = ly_cdr (s)) + for (SCM s = m->get_property ("elements"); ly_c_pair_p (s); s = scm_cdr (s)) { - unsmob_music (ly_car (s))->set_property ("duration", $2); + unsmob_music (scm_car (s))->set_property ("duration", $2); } $$ = m; } @@ -2589,9 +2589,9 @@ Music * property_op_to_music (SCM op) { Music *m = 0; - SCM tag = ly_car (op); - SCM symbol = ly_cadr (op); - SCM args = ly_cddr (op); + SCM tag = scm_car (op); + SCM symbol = scm_cadr (op); + SCM args = scm_cddr (op); SCM grob_val = SCM_UNDEFINED; SCM grob_sym = SCM_UNDEFINED; SCM val = SCM_UNDEFINED; @@ -2599,7 +2599,7 @@ property_op_to_music (SCM op) if (tag == ly_symbol2scm ("assign")) { m = MY_MAKE_MUSIC ("PropertySet"); - val = ly_car (args); + val = scm_car (args); } else if (tag == ly_symbol2scm ("unset")) m = MY_MAKE_MUSIC ("PropertyUnset"); @@ -2607,12 +2607,12 @@ property_op_to_music (SCM op) || tag == ly_symbol2scm ("push")) { m = MY_MAKE_MUSIC ("OverrideProperty"); - grob_sym = ly_car (args); - grob_val = ly_cadr (args); + grob_sym = scm_car (args); + grob_val = scm_cadr (args); } else if (tag == ly_symbol2scm ("pop")) { m = MY_MAKE_MUSIC ("RevertProperty"); - grob_sym = ly_car (args); + grob_sym = scm_car (args); } m->set_property ("symbol", symbol); diff --git a/lily/part-combine-iterator.cc b/lily/part-combine-iterator.cc index 092beed8b7..3e70e5b55c 100644 --- a/lily/part-combine-iterator.cc +++ b/lily/part-combine-iterator.cc @@ -351,14 +351,14 @@ Part_combine_iterator::construct_children () one_.set_translator (one); set_translator (one); - first_iter_ = unsmob_iterator (get_iterator (unsmob_music (ly_car (lst)))); + first_iter_ = unsmob_iterator (get_iterator (unsmob_music (scm_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 (ly_cadr (lst)))); + second_iter_ = unsmob_iterator (get_iterator (unsmob_music (scm_cadr (lst)))); set_translator (tr); @@ -394,13 +394,13 @@ Part_combine_iterator::process (Moment m) Moment now = get_outlet ()->now_mom (); Moment *splitm = 0; - for (; ly_c_pair_p (split_list_); split_list_ = ly_cdr (split_list_)) + for (; scm_is_pair (split_list_); split_list_ = scm_cdr (split_list_)) { - splitm = unsmob_moment (ly_caar (split_list_)); + splitm = unsmob_moment (scm_caar (split_list_)); if (splitm && *splitm + start_moment_ > now) break ; - SCM tag = ly_cdar (split_list_); + SCM tag = scm_cdar (split_list_); if (tag == ly_symbol2scm ("chords")) chords_together (); diff --git a/lily/performer-group-performer.cc b/lily/performer-group-performer.cc index b776432de1..f93defe07c 100644 --- a/lily/performer-group-performer.cc +++ b/lily/performer-group-performer.cc @@ -41,9 +41,9 @@ Performer_group_performer::acknowledge_audio_elements () { Audio_element_info info = announce_infos_[j]; - for (SCM p = get_simple_trans_list (); ly_c_pair_p (p); p = ly_cdr (p)) + for (SCM p = get_simple_trans_list (); scm_is_pair (p); p = scm_cdr (p)) { - Translator * t = unsmob_translator (ly_car (p)); + Translator * t = unsmob_translator (scm_car (p)); Performer * eng = dynamic_cast<Performer*> (t); if (eng && eng!= info.origin_trans_) eng->acknowledge_audio_element (info); @@ -76,9 +76,9 @@ Performer_group_performer::Performer_group_performer () void performer_each (SCM list, Performer_method method) { - for (SCM p = list; ly_c_pair_p (p); p = ly_cdr (p)) + for (SCM p = list; scm_is_pair (p); p = scm_cdr (p)) { - Performer * e = dynamic_cast<Performer*>(unsmob_translator (ly_car (p))); + Performer * e = dynamic_cast<Performer*>(unsmob_translator (scm_car (p))); if (e) (e->*method) (); } diff --git a/lily/piano-pedal-engraver.cc b/lily/piano-pedal-engraver.cc index 0ff11c4b58..09c6afce2a 100644 --- a/lily/piano-pedal-engraver.cc +++ b/lily/piano-pedal-engraver.cc @@ -253,7 +253,7 @@ Piano_pedal_engraver::create_text_grobs (Pedal_info *p, bool mixed) } else { - s = ly_cadr (strings); + s = scm_cadr (strings); } p->start_ev_ = p->event_drul_[START]; } @@ -268,7 +268,7 @@ Piano_pedal_engraver::create_text_grobs (Pedal_info *p, bool mixed) } else { - s = ly_caddr (strings); + s = scm_caddr (strings); } p->start_ev_ = 0; } @@ -276,7 +276,7 @@ Piano_pedal_engraver::create_text_grobs (Pedal_info *p, bool mixed) else if (p->event_drul_[START]) { p->start_ev_ = p->event_drul_[START]; - s = ly_car (strings); + s = scm_car (strings); if (!mixed) { /* @@ -337,7 +337,7 @@ 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 (ly_car (flare), + p->bracket_->set_property ("bracket-flare", scm_cons (scm_car (flare), scm_make_real (0))); } @@ -361,7 +361,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 (scm_make_real (0),ly_cdr (flare))); + p->bracket_->set_property ("bracket-flare", scm_cons (scm_make_real (0),scm_cdr (flare))); } diff --git a/lily/pitch.cc b/lily/pitch.cc index 5dc46f97e6..8e8cd0ebfd 100644 --- a/lily/pitch.cc +++ b/lily/pitch.cc @@ -257,7 +257,7 @@ IMPLEMENT_SIMPLE_SMOBS (Pitch); int Pitch::print_smob (SCM s, SCM port, scm_print_state *) { - Pitch *r = (Pitch *) ly_cdr (s); + Pitch *r = (Pitch *) scm_cdr (s); scm_puts ("#<Pitch ", port); scm_display (scm_makfrom0str (r->to_string ().to_str0 ()), port); scm_puts (" >", port); @@ -267,8 +267,8 @@ Pitch::print_smob (SCM s, SCM port, scm_print_state *) SCM Pitch::equal_p (SCM a , SCM b) { - Pitch *p = (Pitch *) ly_cdr (a); - Pitch *q = (Pitch *) ly_cdr (b); + Pitch *p = (Pitch *) scm_cdr (a); + Pitch *q = (Pitch *) scm_cdr (b); bool eq = p->notename_ == q->notename_ && p->octave_ == q->octave_ diff --git a/lily/quote-iterator.cc b/lily/quote-iterator.cc index aca188b52f..13c55da975 100644 --- a/lily/quote-iterator.cc +++ b/lily/quote-iterator.cc @@ -45,9 +45,9 @@ Quote_iterator::accept_music_type (Music *mus) const { SCM accept = get_outlet()->get_property ("quotedEventTypes"); for (SCM s = mus->get_property ("types"); - ly_c_pair_p (s); s = ly_cdr (s)) + scm_is_pair (s); s = scm_cdr (s)) { - if (scm_memq (ly_car (s), accept) != SCM_BOOL_F) + if (scm_memq (scm_car (s), accept) != SCM_BOOL_F) return true; } @@ -87,7 +87,7 @@ binsearch_scm_vector (SCM vec, SCM key, bool (*is_less)(SCM a,SCM b)) { int cmp = (lo + hi) / 2; - SCM when = ly_caar (SCM_VECTOR_REF (vec, cmp)); + SCM when = scm_caar (SCM_VECTOR_REF (vec, cmp)); bool result = (*is_less) (key, when); if (result) hi = cmp; @@ -137,7 +137,7 @@ Moment Quote_iterator::pending_moment () const { SCM entry = SCM_VECTOR_REF (event_vector_, event_idx_); - return *unsmob_moment (ly_caar (entry)) - start_moment_; + return *unsmob_moment (scm_caar (entry)) - start_moment_; } void @@ -150,7 +150,7 @@ Quote_iterator::process (Moment m) { entry = SCM_VECTOR_REF (event_vector_, event_idx_); - Moment em = *unsmob_moment (ly_caar (entry)); + Moment em = *unsmob_moment (scm_caar (entry)); if (em > m) return ; @@ -161,16 +161,16 @@ Quote_iterator::process (Moment m) event_idx_++; } - if (ly_c_pair_p (entry)) + if (scm_is_pair (entry)) { - Pitch * quote_pitch = unsmob_pitch (ly_cdar (entry)); + Pitch * quote_pitch = unsmob_pitch (scm_cdar (entry)); Pitch * me_pitch = unsmob_pitch (get_outlet ()->get_property ("instrumentTransposition")); - for (SCM s = ly_cdr (entry); ly_c_pair_p (s); s = ly_cdr (s)) + for (SCM s = scm_cdr (entry); scm_is_pair (s); s = scm_cdr (s)) { - SCM ev_acc = ly_car (s); + SCM ev_acc = scm_car (s); - Music * mus = unsmob_music (ly_car (ev_acc)); + Music * mus = unsmob_music (scm_car (ev_acc)); if (!mus) programming_error ("need music in quote."); else if (accept_music_type (mus)) diff --git a/lily/recording-group-engraver.cc b/lily/recording-group-engraver.cc index 1852b26372..c9d3bbb2d3 100644 --- a/lily/recording-group-engraver.cc +++ b/lily/recording-group-engraver.cc @@ -61,9 +61,9 @@ Recording_group_engraver::start_translation_timestep () void Recording_group_engraver::start () { - if (!ly_c_pair_p (accumulator_)) + if (!scm_is_pair (accumulator_)) accumulator_ = scm_cons (SCM_EOL, SCM_EOL); - if (!ly_c_pair_p (ly_car (accumulator_))) + if (!scm_is_pair (scm_car (accumulator_))) { /* Need to store transposition for every moment; transposition changes during pieces. @@ -78,7 +78,7 @@ void Recording_group_engraver::stop_translation_timestep () { Engraver_group_engraver::stop_translation_timestep (); - scm_set_cdr_x (accumulator_, scm_cons (ly_car (accumulator_), ly_cdr (accumulator_))); + scm_set_cdr_x (accumulator_, scm_cons (scm_car (accumulator_), scm_cdr (accumulator_))); scm_set_car_x (accumulator_, SCM_EOL); } @@ -90,7 +90,7 @@ Recording_group_engraver::finalize () SCM proc = get_property ("recordEventSequence"); if (ly_c_procedure_p (proc)) - scm_call_2 (proc, context ()->self_scm (), ly_cdr (accumulator_)); + scm_call_2 (proc, context ()->self_scm (), scm_cdr (accumulator_)); accumulator_ = SCM_EOL; } @@ -100,11 +100,11 @@ Recording_group_engraver::try_music (Music *m) { bool retval = Translator_group::try_music (m); - SCM seq = ly_cdar (accumulator_); + SCM seq = scm_cdar (accumulator_); seq = scm_cons (scm_cons (m->self_scm (), ly_bool2scm (retval)), seq); - scm_set_cdr_x (ly_car (accumulator_), seq); + scm_set_cdr_x (scm_car (accumulator_), seq); return retval; } diff --git a/lily/repeat-acknowledge-engraver.cc b/lily/repeat-acknowledge-engraver.cc index b70abed220..c1c77892ca 100644 --- a/lily/repeat-acknowledge-engraver.cc +++ b/lily/repeat-acknowledge-engraver.cc @@ -72,16 +72,16 @@ Repeat_acknowledge_engraver::process_music () bool start = false; bool end = false; bool volta_found = false; - while (ly_c_pair_p (cs)) + while (scm_is_pair (cs)) { - SCM command = ly_car (cs); + SCM command = scm_car (cs); if (command == ly_symbol2scm ("start-repeat")) start = true; else if (command == ly_symbol2scm ("end-repeat")) end = true; - else if (ly_c_pair_p (command) && ly_car (command) == ly_symbol2scm ("volta")) + else if (scm_is_pair (command) && scm_car (command) == ly_symbol2scm ("volta")) volta_found = true; - cs = ly_cdr (cs); + cs = scm_cdr (cs); } if (start && end) diff --git a/lily/repeated-music.cc b/lily/repeated-music.cc index 9f3010b407..8d76ae78a8 100644 --- a/lily/repeated-music.cc +++ b/lily/repeated-music.cc @@ -42,8 +42,8 @@ Repeated_music::to_relative_octave (Pitch p) { lily_1_8_compatibility_used = true; - for (SCM s = alternatives (); ly_c_pair_p (s); s = ly_cdr (s)) - unsmob_music (ly_car (s))->to_relative_octave (p); + for (SCM s = alternatives (); scm_is_pair (s); s = scm_cdr (s)) + unsmob_music (scm_car (s))->to_relative_octave (p); } return last; @@ -68,12 +68,12 @@ Repeated_music::alternatives_get_length (bool fold) const int done =0; SCM p = alternatives (); - while (ly_c_pair_p (p) && done < repeat_count ()) + while (scm_is_pair (p) && done < repeat_count ()) { - m = m + unsmob_music (ly_car (p))->get_length (); + m = m + unsmob_music (scm_car (p))->get_length (); done ++; if (repeat_count () - done < scm_ilength (alternatives ())) - p = ly_cdr (p); + p = scm_cdr (p); } return m; } @@ -90,10 +90,10 @@ Repeated_music::alternatives_volta_get_length () const Moment m; SCM p = alternatives (); - while (ly_c_pair_p (p)) + while (scm_is_pair (p)) { - m = m + unsmob_music (ly_car (p))->get_length (); - p = ly_cdr (p); + m = m + unsmob_music (scm_car (p))->get_length (); + p = scm_cdr (p); } return m; } diff --git a/lily/rest-collision.cc b/lily/rest-collision.cc index efbf31545c..74797b2d6c 100644 --- a/lily/rest-collision.cc +++ b/lily/rest-collision.cc @@ -74,9 +74,9 @@ Rest_collision::do_shift (Grob *me) Link_array<Grob> rests; Link_array<Grob> notes; - for (SCM s = elts; ly_c_pair_p (s); s = ly_cdr (s)) + for (SCM s = elts; scm_is_pair (s); s = scm_cdr (s)) { - Grob * e = unsmob_grob (ly_car (s)); + Grob * e = unsmob_grob (scm_car (s)); if (unsmob_grob (e->get_property ("rest"))) { /* diff --git a/lily/scm-hash.cc b/lily/scm-hash.cc index a0f66d0d7d..7497d699d4 100644 --- a/lily/scm-hash.cc +++ b/lily/scm-hash.cc @@ -19,9 +19,9 @@ copy_scm_hashes (SCM dest, SCM src) { int k = 0; for (int i = SCM_VECTOR_LENGTH (src); i--;) - for (SCM s = scm_vector_ref (src, scm_from_int (i)); ly_c_pair_p (s); s = ly_cdr (s)) + for (SCM s = scm_vector_ref (src, scm_from_int (i)); scm_is_pair (s); s = scm_cdr (s)) { - scm_hashq_set_x (dest, ly_caar (s), ly_cdar (s)); + scm_hashq_set_x (dest, scm_caar (s), scm_cdar (s)); k++; } return k ; @@ -82,9 +82,9 @@ bool Scheme_hash_table::try_retrieve (SCM k, SCM *v) { SCM handle = scm_hashq_get_handle (hash_tab_, k); - if (ly_c_pair_p (handle)) + if (scm_is_pair (handle)) { - *v = ly_cdr (handle); + *v = scm_cdr (handle); return true; } else @@ -95,7 +95,7 @@ Scheme_hash_table::try_retrieve (SCM k, SCM *v) bool Scheme_hash_table::contains (SCM k) const { - return ly_c_pair_p (scm_hashq_get_handle (hash_tab_, k)); + return scm_is_pair (scm_hashq_get_handle (hash_tab_, k)); } void @@ -103,7 +103,7 @@ Scheme_hash_table::set (SCM k, SCM v) { assert (scm_is_symbol (k)); SCM handle = scm_hashq_create_handle_x (hash_tab_, k, SCM_UNDEFINED); - if (ly_cdr (handle) == SCM_UNDEFINED) + if (scm_cdr (handle) == SCM_UNDEFINED) { elt_count_++; } @@ -150,9 +150,9 @@ 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_, scm_int2num (i)); ly_c_pair_p (s); s = ly_cdr (s)) + for (SCM s = scm_vector_ref (hash_tab_, scm_int2num (i)); scm_is_pair (s); s = scm_cdr (s)) { - l = scm_acons (ly_caar (s), ly_cdar (s), l); + l = scm_acons (scm_caar (s), scm_cdar (s), l); } return l; } diff --git a/lily/score.cc b/lily/score.cc index 4bfef72276..309c358f55 100644 --- a/lily/score.cc +++ b/lily/score.cc @@ -313,17 +313,16 @@ Score::set_music (SCM music, SCM parser) { /* URG? */ SCM check_funcs = ly_scheme_function ("toplevel-music-functions"); - for (; ly_c_pair_p (check_funcs); check_funcs = ly_cdr (check_funcs)) - music = scm_call_2 (ly_car (check_funcs), music, parser); + for (; scm_is_pair (check_funcs); check_funcs = scm_cdr (check_funcs)) + music = scm_call_2 (scm_car (check_funcs), music, parser); if (unsmob_music (music_)) { unsmob_music (music)->origin ()->error (_("Already have music in score")); unsmob_music (music_)->origin ()->error (_("This is the previous music")); } - - if (Music * m = unsmob_music (music) - && to_boolean (m->get_property ("error-found"))) + Music * m = unsmob_music (music); + if (m && to_boolean (m->get_property ("error-found"))) { m->origin()->error (_("Error found in this music expression. Ignoring it")); @@ -331,9 +330,11 @@ Score::set_music (SCM music, SCM parser) } - this->music_ = music; if (this->error_found_) this->music_ = SCM_EOL; + else + this->music_ = music; + } SCM diff --git a/lily/script-column.cc b/lily/script-column.cc index 697cf5ac7d..917122c9e6 100644 --- a/lily/script-column.cc +++ b/lily/script-column.cc @@ -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"); ly_c_pair_p (s); s = ly_cdr (s)) + for (SCM s = me->get_property ("scripts"); scm_is_pair (s); s = scm_cdr (s)) { - Grob *sc = unsmob_grob (ly_car (s)); + Grob *sc = unsmob_grob (scm_car (s)); /* Don't want to consider scripts horizontally next to notes. @@ -77,9 +77,9 @@ Script_column::before_line_breaking (SCM smob) ss = scm_stable_sort_x (ss, ly_grob_script_priority_less_proc); Grob * last = 0; - for (SCM s = ss; ly_c_pair_p (s); s = ly_cdr (s)) + for (SCM s = ss; scm_is_pair (s); s = scm_cdr (s)) { - Grob *g = unsmob_grob (ly_car (s)); + Grob *g = unsmob_grob (scm_car (s)); if (last) Side_position_interface::add_support (g,last); diff --git a/lily/script-engraver.cc b/lily/script-engraver.cc index 66fde4afc0..db1df11e9b 100644 --- a/lily/script-engraver.cc +++ b/lily/script-engraver.cc @@ -80,8 +80,8 @@ copy_property (Grob *g, SCM sym, SCM alist) if (g->internal_get_property (sym) == SCM_EOL) { SCM entry = scm_assoc (sym, alist); - if (ly_c_pair_p (entry)) - g->internal_set_property (sym, ly_cdr (entry)); + if (scm_is_pair (entry)) + g->internal_set_property (sym, scm_cdr (entry)); } } @@ -105,22 +105,22 @@ void make_script_from_event (Grob *p, bool * follow, Context *tg, return; } - art = ly_cdr (art); + art = scm_cdr (art); SCM follow_scm = scm_assoc (ly_symbol2scm ("follow-into-staff"), art); - *follow = ly_c_pair_p (follow_scm) && to_boolean (ly_cdr (follow_scm)); + *follow = scm_is_pair (follow_scm) && to_boolean (scm_cdr (follow_scm)); bool priority_found = false ; - for (SCM s = art ; ly_c_pair_p (s); s = ly_cdr (s)) + for (SCM s = art ; scm_is_pair (s); s = scm_cdr (s)) { - SCM sym = ly_caar (s); + SCM sym = scm_caar (s); SCM type = scm_object_property (sym, ly_symbol2scm ("backend-type?")); if (!ly_c_procedure_p (type)) continue; - SCM val = ly_cdar (s); + SCM val = scm_cdar (s); if (sym == ly_symbol2scm ("script-priority")) { diff --git a/lily/script-interface.cc b/lily/script-interface.cc index 2d5a386c10..0a92b4b161 100644 --- a/lily/script-interface.cc +++ b/lily/script-interface.cc @@ -23,19 +23,19 @@ Stencil Script_interface::get_stencil (Grob *me, Direction d) { SCM s = me->get_property ("script-stencil"); - assert (ly_c_pair_p (s)); + assert (scm_is_pair (s)); - SCM key = ly_car (s); + SCM key = scm_car (s); if (key == ly_symbol2scm ("feta")) { - SCM name_entry = ly_cdr (s); - SCM str = ((ly_c_pair_p (name_entry)) ? index_get_cell (name_entry, d) + SCM name_entry = scm_cdr (s); + SCM str = ((scm_is_pair (name_entry)) ? index_get_cell (name_entry, d) : name_entry); return Font_interface::get_default_font (me) ->find_by_name ("scripts-" + ly_scm2string (str)); } else if (key == ly_symbol2scm ("accordion")) - return Lookup::accordion (ly_cdr (s), 1.0, + return Lookup::accordion (scm_cdr (s), 1.0, Font_interface::get_default_font (me)); else assert (false); diff --git a/lily/separating-group-spanner.cc b/lily/separating-group-spanner.cc index 250fcade92..7f692ef644 100644 --- a/lily/separating-group-spanner.cc +++ b/lily/separating-group-spanner.cc @@ -28,9 +28,9 @@ Separating_group_spanner::find_rods (Item * r, SCM next, Real padding) return; - for (; ly_c_pair_p (next); next = ly_cdr (next)) + for (; scm_is_pair (next); next = scm_cdr (next)) { - Item *l = dynamic_cast<Item*> (unsmob_grob (ly_car ( next))); + Item *l = dynamic_cast<Item*> (unsmob_grob (scm_car ( next))); Item *lb = l->find_prebroken_piece (RIGHT); if (lb) @@ -83,12 +83,12 @@ 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"); ly_c_pair_p (s) && ly_c_pair_p (ly_cdr (s)); s = ly_cdr (s)) + for (SCM s = me->get_property ("elements"); scm_is_pair (s) && scm_is_pair (scm_cdr (s)); s = scm_cdr (s)) { /* Order of elements is reversed! */ - SCM elt = ly_car (s); + SCM elt = scm_car (s); Item *r = unsmob_item (elt); if (!r) @@ -97,9 +97,9 @@ Separating_group_spanner::set_spacing_rods (SCM smob) Item *rb = dynamic_cast<Item*> (r->find_prebroken_piece (LEFT)); - find_rods (r, ly_cdr (s), padding); + find_rods (r, scm_cdr (s), padding); if (rb) - find_rods (rb, ly_cdr (s), padding); + find_rods (rb, scm_cdr (s), padding); } return SCM_UNSPECIFIED ; diff --git a/lily/separation-item.cc b/lily/separation-item.cc index b528ae7c51..49469946d9 100644 --- a/lily/separation-item.cc +++ b/lily/separation-item.cc @@ -40,9 +40,9 @@ Separation_item::conditional_width (Grob * me, Grob * left) Paper_column * pc = item->get_column (); - for (SCM s = me->get_property ("conditional-elements"); ly_c_pair_p (s); s = ly_cdr (s)) + for (SCM s = me->get_property ("conditional-elements"); scm_is_pair (s); s = scm_cdr (s)) { - SCM elt = ly_car (s); + SCM elt = scm_car (s); if (!unsmob_grob (elt)) continue; @@ -84,9 +84,9 @@ Separation_item::width (Grob *me) Paper_column * pc = item->get_column (); Interval w; - for (SCM s = me->get_property ("elements"); ly_c_pair_p (s); s = ly_cdr (s)) + for (SCM s = me->get_property ("elements"); scm_is_pair (s); s = scm_cdr (s)) { - SCM elt = ly_car (s); + SCM elt = scm_car (s); if (!unsmob_grob (elt)) continue; @@ -140,9 +140,9 @@ 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"); - ly_c_pair_p (s); s = ly_cdr (s)) + scm_is_pair (s); s = scm_cdr (s)) { - Grob * break_item = unsmob_grob (ly_car (s)); + Grob * break_item = unsmob_grob (scm_car (s)); if (!scm_is_symbol (break_item->get_property ("break-align-symbol"))) continue; diff --git a/lily/sequential-iterator.cc b/lily/sequential-iterator.cc index 105126cc75..6cc4f61a9c 100644 --- a/lily/sequential-iterator.cc +++ b/lily/sequential-iterator.cc @@ -23,8 +23,8 @@ Invariant for the data structure. - if (ly_c_pair_p (cursor_)) - iter_->music_ == unsmob_music (ly_car (cursor_)) + if (scm_is_pair (cursor_)) + iter_->music_ == unsmob_music (scm_car (cursor_)) else iter_ == 0; @@ -85,9 +85,9 @@ create_grace_fixup_list (SCM cursor) Grace_fixup *head = 0; Grace_fixup **tail = &head; - for (; ly_c_pair_p (cursor); cursor = ly_cdr (cursor)) + for (; scm_is_pair (cursor); cursor = scm_cdr (cursor)) { - Music *mus = unsmob_music (ly_car (cursor)); + Music *mus = unsmob_music (scm_car (cursor)); Moment s = mus->start_mom (); Moment l = mus->get_length () - s; @@ -123,9 +123,9 @@ Sequential_iterator::construct_children () cursor_ = get_music_list (); iter_ = 0; - if (ly_c_pair_p (cursor_)) + if (scm_is_pair (cursor_)) { - Music *m = unsmob_music (ly_car (cursor_)); + Music *m = unsmob_music (scm_car (cursor_)); iter_ = unsmob_iterator (get_iterator (m)); } @@ -185,11 +185,11 @@ Sequential_iterator::next_element (bool) here_mom_ += len; } - cursor_ = ly_cdr (cursor_); + cursor_ = scm_cdr (cursor_); iter_->quit (); - if (ly_c_pair_p (cursor_)) - iter_ = unsmob_iterator (get_iterator (unsmob_music (ly_car (cursor_)))); + if (scm_is_pair (cursor_)) + iter_ = unsmob_iterator (get_iterator (unsmob_music (scm_car (cursor_)))); else iter_ = 0; } diff --git a/lily/side-position-interface.cc b/lily/side-position-interface.cc index 54ff667d6e..7ff38d6e4e 100644 --- a/lily/side-position-interface.cc +++ b/lily/side-position-interface.cc @@ -82,9 +82,9 @@ Side_position_interface::general_side_position (Grob * me, Axis a, bool use_exte dim = st->extent (common, Y_AXIS); } - for (SCM s = support; s != SCM_EOL; s = ly_cdr (s)) + for (SCM s = support; s != SCM_EOL; s = scm_cdr (s)) { - Grob * e = unsmob_grob (ly_car (s)); + Grob * e = unsmob_grob (scm_car (s)); if (e) if (use_extents) dim.unite (e->extent (common, a)); diff --git a/lily/simple-spacer.cc b/lily/simple-spacer.cc index fba6daeab0..74ed5f0fb2 100644 --- a/lily/simple-spacer.cc +++ b/lily/simple-spacer.cc @@ -263,22 +263,22 @@ LY_DEFINE(ly_solve_spring_rod_problem, "ly:solve-spring-rod-problem", bool is_ragged = ragged == SCM_BOOL_T; Simple_spacer spacer; - for (SCM s = springs; ly_c_pair_p (s); s = ly_cdr (s)) + for (SCM s = springs; scm_is_pair (s); s = scm_cdr (s)) { - Real ideal = scm_to_double (ly_caar (s)); - Real hooke = scm_to_double (ly_cadar (s)); + Real ideal = scm_to_double (scm_caar (s)); + Real hooke = scm_to_double (scm_cadar (s)); spacer.add_spring (ideal, hooke); } - for (SCM s = rods; ly_c_pair_p (s); s = ly_cdr (s)) + for (SCM s = rods; scm_is_pair (s); s = scm_cdr (s)) { - SCM entry = ly_car (s); - int l = scm_to_int (ly_car (entry)); - int r = scm_to_int (ly_cadr (entry)); - entry = ly_cddr (entry); + SCM entry = scm_car (s); + int l = scm_to_int (scm_car (entry)); + int r = scm_to_int (scm_cadr (entry)); + entry = scm_cddr (entry); - Real distance = scm_to_double (ly_car (entry)); + Real distance = scm_to_double (scm_car (entry)); spacer.add_rod (l, r, distance); } @@ -458,7 +458,7 @@ Simple_spacer_wrapper::add_columns (Link_array<Grob> const &icols) Link_array<Grob> cols (icols); for (int i = cols.size (); i--;) - if (ly_c_pair_p (cols[i]->get_property ("between-cols"))) + if (scm_is_pair (cols[i]->get_property ("between-cols"))) { loose_cols_.push (cols[i]); cols.del (i); @@ -470,10 +470,10 @@ Simple_spacer_wrapper::add_columns (Link_array<Grob> const &icols) Spring_smob *spring = 0; for (SCM s = cols[i]->get_property ("ideal-distances"); - !spring && ly_c_pair_p (s); - s = ly_cdr (s)) + !spring && scm_is_pair (s); + s = scm_cdr (s)) { - Spring_smob *sp = unsmob_spring (ly_car (s)); + Spring_smob *sp = unsmob_spring (scm_car (s)); if (sp->other_ == cols[i+1]) @@ -494,13 +494,13 @@ Simple_spacer_wrapper::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]); - ly_c_pair_p (s); s = ly_cdr (s)) + scm_is_pair (s); s = scm_cdr (s)) { - Grob * other = unsmob_grob (ly_caar (s)); + Grob * other = unsmob_grob (scm_caar (s)); int oi = cols.find_index (other); if (oi >= 0) { - spacer_->add_rod (i, oi, scm_to_double (ly_cdar (s))); + spacer_->add_rod (i, oi, scm_to_double (scm_cdar (s))); } } } diff --git a/lily/simultaneous-music-iterator.cc b/lily/simultaneous-music-iterator.cc index c90cd21767..31f591faf3 100644 --- a/lily/simultaneous-music-iterator.cc +++ b/lily/simultaneous-music-iterator.cc @@ -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_; ly_c_pair_p (s); s = ly_cdr (s)) - unsmob_iterator (ly_car (s))-> substitute_outlet (f,t); + for (SCM s = children_list_; scm_is_pair (s); s = scm_cdr (s)) + unsmob_iterator (scm_car (s))-> substitute_outlet (f,t); } void @@ -42,9 +42,9 @@ Simultaneous_music_iterator::construct_children () children_list_ = SCM_EOL; SCM * tail = &children_list_; - for (; ly_c_pair_p (i); i = ly_cdr (i), j++) + for (; scm_is_pair (i); i = scm_cdr (i), j++) { - Music *mus = unsmob_music (ly_car (i)); + Music *mus = unsmob_music (scm_car (i)); SCM scm_iter = get_static_get_iterator (mus); Music_iterator * mi = unsmob_iterator (scm_iter); @@ -77,9 +77,9 @@ void Simultaneous_music_iterator::process (Moment until) { SCM *proc = &children_list_; - while (ly_c_pair_p (*proc)) + while (scm_is_pair (*proc)) { - Music_iterator * i = unsmob_iterator (ly_car (*proc)); + Music_iterator * i = unsmob_iterator (scm_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 = ly_cdr (*proc); + *proc = scm_cdr (*proc); } else { @@ -103,9 +103,9 @@ Simultaneous_music_iterator::pending_moment () const Moment next; next.set_infinite (1); - for (SCM s = children_list_; ly_c_pair_p (s); s = ly_cdr (s)) + for (SCM s = children_list_; scm_is_pair (s); s = scm_cdr (s)) { - Music_iterator * it = unsmob_iterator (ly_car (s)); + Music_iterator * it = unsmob_iterator (scm_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_; ly_c_pair_p (s); s = ly_cdr (s)) + for (SCM s = children_list_; scm_is_pair (s); s = scm_cdr (s)) { - Music_iterator * it = unsmob_iterator (ly_car (s)); + Music_iterator * it = unsmob_iterator (scm_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_; ly_c_pair_p (s); s = ly_cdr (s)) + for (SCM s = children_list_; scm_is_pair (s); s = scm_cdr (s)) { - Music_iterator * it = unsmob_iterator (ly_car (s)); + Music_iterator * it = unsmob_iterator (scm_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 && ly_c_pair_p (s); s = ly_cdr (s)) - b =unsmob_iterator (ly_car (s))->try_music (m); + for (SCM s = children_list_; !b && scm_is_pair (s); s = scm_cdr (s)) + b =unsmob_iterator (scm_car (s))->try_music (m); return b; } void Simultaneous_music_iterator::do_quit () { - for (SCM s = children_list_; ly_c_pair_p (s); s = ly_cdr (s)) - unsmob_iterator (ly_car (s))->quit (); + for (SCM s = children_list_; scm_is_pair (s); s = scm_cdr (s)) + unsmob_iterator (scm_car (s))->quit (); } IMPLEMENT_CTOR_CALLBACK (Simultaneous_music_iterator); diff --git a/lily/slur-scoring.cc b/lily/slur-scoring.cc index 6d5238a330..a4b1164c18 100644 --- a/lily/slur-scoring.cc +++ b/lily/slur-scoring.cc @@ -204,8 +204,8 @@ Real get_detail (SCM alist, SCM sym) { SCM entry = scm_assq (sym, alist); - return robust_scm2double (ly_c_pair_p (entry) - ? ly_cdr (entry) + return robust_scm2double (scm_is_pair (entry) + ? scm_cdr (entry) : SCM_EOL, 0.0); } @@ -517,7 +517,7 @@ set_end_points (Grob *me) SCM inspect_quants = me->get_property ("inspect-quants"); if (to_boolean (me->get_paper () ->lookup_variable (ly_symbol2scm ("debug-slur-scoring"))) - && ly_c_pair_p (inspect_quants)) + && scm_is_pair (inspect_quants)) { Drul_array<Real> ins = ly_scm2interval (inspect_quants); Real mindist = 1e6; @@ -1135,7 +1135,7 @@ score_extra_encompass (Grob *me, Grob *common[], && scm_ilength (accs) == 1) { /* End copy accidental.cc */ - switch (scm_to_int (ly_car (accs))) + switch (scm_to_int (scm_car (accs))) { case FLAT: case DOUBLE_FLAT: diff --git a/lily/slur.cc b/lily/slur.cc index 7be89976d8..0febab202d 100644 --- a/lily/slur.cc +++ b/lily/slur.cc @@ -104,8 +104,8 @@ Slur::get_curve (Grob*me) Bezier b; int i = 0; for (SCM s = me->get_property ("control-points"); s != SCM_EOL; - s = ly_cdr (s)) - b.control_[i++] = ly_scm2offset (ly_car (s)); + s = scm_cdr (s)) + b.control_[i++] = ly_scm2offset (scm_car (s)); return b; } diff --git a/lily/spaceable-grob.cc b/lily/spaceable-grob.cc index ffc3545751..d90297d4e7 100644 --- a/lily/spaceable-grob.cc +++ b/lily/spaceable-grob.cc @@ -31,12 +31,12 @@ Spaceable_grob::add_rod (Grob *me , Grob * p, Real d) SCM mins = get_minimum_distances (me); SCM newdist = scm_make_real (d); - for (SCM s = mins; ly_c_pair_p (s); s = ly_cdr (s)) + for (SCM s = mins; scm_is_pair (s); s = scm_cdr (s)) { - SCM dist = ly_car (s); - if (ly_car (dist) == p->self_scm ()) + SCM dist = scm_car (s); + if (scm_car (dist) == p->self_scm ()) { - scm_set_cdr_x (dist, scm_max (ly_cdr (dist), + scm_set_cdr_x (dist, scm_max (scm_cdr (dist), newdist)); return ; } @@ -70,9 +70,9 @@ Spaceable_grob::add_spring (Grob*me, Grob * p, Real d, Real strength) #ifndef NDEBUG SCM mins = me->get_property ("ideal-distances"); - for (SCM s = mins; ly_c_pair_p (s); s = ly_cdr (s)) + for (SCM s = mins; scm_is_pair (s); s = scm_cdr (s)) { - Spring_smob * sp = unsmob_spring(ly_car (s)); + Spring_smob * sp = unsmob_spring(scm_car (s)); if (sp->other_ == p) { programming_error ("already have that spring"); diff --git a/lily/spacing-spanner.cc b/lily/spacing-spanner.cc index 4c6622b0b1..d2309ca776 100644 --- a/lily/spacing-spanner.cc +++ b/lily/spacing-spanner.cc @@ -96,11 +96,11 @@ loose_column (Grob *l, Grob *c, Grob *r) such a borderline case.) */ - if (!ly_c_pair_p (lns) || !ly_c_pair_p (rns)) + if (!scm_is_pair (lns) || !scm_is_pair (rns)) return false; - Item * l_neighbor = dynamic_cast<Item*> (unsmob_grob (ly_car (lns))); - Item * r_neighbor = dynamic_cast<Item*> (unsmob_grob (ly_car (rns))); + Item * l_neighbor = dynamic_cast<Item*> (unsmob_grob (scm_car (lns))); + Item * r_neighbor = dynamic_cast<Item*> (unsmob_grob (scm_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"); ly_c_pair_p (e); e = ly_cdr (e)) + for (SCM e = c->get_property ("elements"); scm_is_pair (e); e = scm_cdr (e)) { - Grob * g = unsmob_grob (ly_car (e)); + Grob * g = unsmob_grob (scm_car (e)); if (g && Break_align_interface::has_interface (g)) { - for (SCM s = g->get_property ("elements"); ly_c_pair_p (s); - s = ly_cdr (s)) + for (SCM s = g->get_property ("elements"); scm_is_pair (s); + s = scm_cdr (s)) { - Grob *h = unsmob_grob (ly_car (s)); + Grob *h = unsmob_grob (scm_car (s)); /* ugh. -- fix staff-bar name? @@ -177,16 +177,16 @@ 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 = ly_c_pair_p (lns) ? ly_car (lns) : SCM_BOOL_F; + lns = scm_is_pair (lns) ? scm_car (lns) : SCM_BOOL_F; SCM rns = c->get_property ("right-neighbors"); - rns = ly_c_pair_p (rns) ? ly_car (rns) : SCM_BOOL_F; + rns = scm_is_pair (rns) ? scm_car (rns) : SCM_BOOL_F; /* Either object can be non existent, if the score ends prematurely. */ - rns = ly_car (unsmob_grob (rns)->get_property ("right-items")); + rns = scm_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"); - ly_c_pair_p (s); s = ly_cdr (s)) + scm_is_pair (s); s = scm_cdr (s)) { - Grob *sp = unsmob_grob (ly_car (s)); + Grob *sp = unsmob_grob (scm_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; ly_c_pair_p (s); s = ly_cdr (s)) + for (SCM s =wishes; scm_is_pair (s); s = scm_cdr (s)) { - Item * wish = dynamic_cast<Item*> (unsmob_grob (ly_car (s))); + Item * wish = dynamic_cast<Item*> (unsmob_grob (scm_car (s))); Item * lc = wish->get_column (); Grob * right = Note_spacing::right_column (wish); @@ -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 (ly_c_pair_p (left_neighs) - && unsmob_grob (ly_car (left_neighs))) + if (scm_is_pair (left_neighs) + && unsmob_grob (scm_car (left_neighs))) { - Item * it = dynamic_cast<Item*> (unsmob_grob (ly_car (left_neighs))); + Item * it = dynamic_cast<Item*> (unsmob_grob (scm_car (left_neighs))); maxrank = Paper_column::get_rank (it->get_column ()); } @@ -322,7 +322,7 @@ Spacing_spanner::set_explicit_neighbor_columns (Link_array<Grob> cols) } } - if (ly_c_pair_p (right_neighbors)) + if (scm_is_pair (right_neighbors)) { cols[i]->set_property ("right-neighbors", right_neighbors); } @@ -348,13 +348,13 @@ 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 (!ly_c_pair_p (ln) && i ) + if (!scm_is_pair (ln) && i ) { cols[i]->set_property ("left-neighbors", scm_cons (cols[i-1]->self_scm (), SCM_EOL)); } SCM rn = cols[i] ->get_property ("right-neighbors"); - if (!ly_c_pair_p (rn) && i < cols.size () - 1) + if (!scm_is_pair (rn) && i < cols.size () - 1) { cols[i]->set_property ("right-neighbors", scm_cons (cols[i + 1]->self_scm (), SCM_EOL)); } @@ -572,9 +572,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; ly_c_pair_p (s); s = ly_cdr (s)) + for (SCM s = seq; scm_is_pair (s); s = scm_cdr (s)) { - Grob * wish = unsmob_grob (ly_car (s)); + Grob * wish = unsmob_grob (scm_car (s)); Item *wish_rcol = Note_spacing::right_column (wish); if (Note_spacing::left_column (wish) != lc @@ -734,9 +734,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"); - ly_c_pair_p (s); s = ly_cdr (s)) + scm_is_pair (s); s = scm_cdr (s)) { - Item * spacing_grob = dynamic_cast<Item*> (unsmob_grob (ly_car (s))); + Item * spacing_grob = dynamic_cast<Item*> (unsmob_grob (scm_car (s))); if (!spacing_grob || !Staff_spacing::has_interface (spacing_grob)) continue; diff --git a/lily/span-arpeggio-engraver.cc b/lily/span-arpeggio-engraver.cc index 50c7be72c8..51151a4b22 100644 --- a/lily/span-arpeggio-engraver.cc +++ b/lily/span-arpeggio-engraver.cc @@ -82,11 +82,11 @@ Span_arpeggio_engraver::stop_translation_timestep () for (int i=0; i < arpeggios_.size (); i ++) { for (SCM s = arpeggios_[i]->get_property ("stems"); - ly_c_pair_p (s); s = ly_cdr (s)) - Group_interface::add_thing (span_arpeggio_, ly_symbol2scm ("stems"), ly_car (s)); + scm_is_pair (s); s = scm_cdr (s)) + Group_interface::add_thing (span_arpeggio_, ly_symbol2scm ("stems"), scm_car (s)); for (SCM s = arpeggios_[i]->get_property ("side-support-elements"); - ly_c_pair_p (s); s = ly_cdr (s)) - Group_interface::add_thing (span_arpeggio_, ly_symbol2scm ("side-support-elements"), ly_car (s)); + scm_is_pair (s); s = scm_cdr (s)) + Group_interface::add_thing (span_arpeggio_, ly_symbol2scm ("side-support-elements"), scm_car (s)); /* we can't kill the children, since we don't want to the diff --git a/lily/span-bar.cc b/lily/span-bar.cc index 869c1d1681..e806a0dd2d 100644 --- a/lily/span-bar.cc +++ b/lily/span-bar.cc @@ -53,9 +53,9 @@ Span_bar::print (SCM smobbed_me) /* compute common refpoint of elements */ Grob *refp = me; - for (SCM elts = first_elt; ly_c_pair_p (elts); elts = ly_cdr (elts)) + for (SCM elts = first_elt; scm_is_pair (elts); elts = scm_cdr (elts)) { - SCM smobbed_staff_bar = ly_car (elts); + SCM smobbed_staff_bar = scm_car (elts); Grob *staff_bar = unsmob_grob (smobbed_staff_bar); refp = staff_bar->common_refpoint (refp, Y_AXIS); } @@ -74,9 +74,9 @@ Span_bar::print (SCM smobbed_me) Stencil span_bar_mol; Interval prev_extent; - for (SCM elts = first_elt; ly_c_pair_p (elts); elts = ly_cdr (elts)) + for (SCM elts = first_elt; scm_is_pair (elts); elts = scm_cdr (elts)) { - SCM smobbed_staff_bar = ly_car (elts); + SCM smobbed_staff_bar = scm_car (elts); Grob *staff_bar = unsmob_grob (smobbed_staff_bar); Interval ext = staff_bar->extent (refp, Y_AXIS); if (ext.is_empty ()) @@ -168,7 +168,7 @@ Span_bar::evaluate_empty (Grob*me) /* TODO: filter all hara-kiried out of ELEMENS list, and then optionally do suicide. Call this cleanage function from center_on_spanned_callback () as well. */ - if (!ly_c_pair_p (me->get_property ("elements"))) + if (!scm_is_pair (me->get_property ("elements"))) { me->suicide (); } @@ -183,9 +183,9 @@ Span_bar::evaluate_glyph (Grob*me) return ; for (SCM s = me->get_property ("elements"); - !scm_is_string (gl) && ly_c_pair_p (s); s = ly_cdr (s)) + !scm_is_string (gl) && scm_is_pair (s); s = scm_cdr (s)) { - gl = unsmob_grob (ly_car (s)) + gl = unsmob_grob (scm_car (s)) ->get_property ("glyph"); } diff --git a/lily/staff-spacing.cc b/lily/staff-spacing.cc index 4e0e0497cf..6e4ba374c0 100644 --- a/lily/staff-spacing.cc +++ b/lily/staff-spacing.cc @@ -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"); - ly_c_pair_p (s); s = ly_cdr (s)) + scm_is_pair (s); s = scm_cdr (s)) { - Grob * g = unsmob_grob (ly_car (s)); + Grob * g = unsmob_grob (scm_car (s)); max_corr = max_corr >? next_note_correction (me, g, bar_size); for (SCM t = g->get_property ("elements"); - ly_c_pair_p (t); t = ly_cdr (t)) - max_corr = max_corr >? next_note_correction (me, unsmob_grob (ly_car (t)), bar_size); + scm_is_pair (t); t = scm_cdr (t)) + max_corr = max_corr >? next_note_correction (me, unsmob_grob (scm_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"); - ly_c_pair_p (s); s = ly_cdr (s)) + scm_is_pair (s); s = scm_cdr (s)) { - Grob * cand = unsmob_grob (ly_car (s)); + Grob * cand = unsmob_grob (scm_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 (ly_c_pair_p (nndef)) + if (scm_is_pair (nndef)) space_def = nndef; } - if (!ly_c_pair_p (space_def)) + if (!scm_is_pair (space_def)) { programming_error ("Unknown prefatory spacing. "); return; } - space_def = ly_cdr (space_def); - Real distance = scm_to_double (ly_cdr (space_def)); - SCM type = ly_car (space_def) ; + space_def = scm_cdr (space_def); + Real distance = scm_to_double (scm_cdr (space_def)); + SCM type = scm_car (space_def) ; *fixed = last_ext[RIGHT]; if (type == ly_symbol2scm ("fixed-space")) diff --git a/lily/stem-tremolo.cc b/lily/stem-tremolo.cc index b4bb45f694..8f275069d4 100644 --- a/lily/stem-tremolo.cc +++ b/lily/stem-tremolo.cc @@ -59,7 +59,7 @@ Stem_tremolo::raw_stencil (Grob *me) Real dy = 0; SCM s = beam->get_property ("positions"); if (is_number_pair (s)) - dy = -scm_to_double (ly_car (s)) +scm_to_double (ly_cdr (s)); + dy = -scm_to_double (scm_car (s)) +scm_to_double (scm_cdr (s)); Real dx = Beam::last_visible_stem (beam)->relative_coordinate (0, X_AXIS) - Beam::first_visible_stem (beam)->relative_coordinate (0, X_AXIS); diff --git a/lily/stem.cc b/lily/stem.cc index 7024c3dab9..1039631a39 100644 --- a/lily/stem.cc +++ b/lily/stem.cc @@ -40,7 +40,7 @@ Stem::set_beaming (Grob *me, int beam_count, Direction d) { SCM pair = me->get_property ("beaming"); - if (!ly_c_pair_p (pair)) + if (!scm_is_pair (pair)) { pair = scm_cons (SCM_EOL, SCM_EOL); me->set_property ("beaming", pair); @@ -56,7 +56,7 @@ int Stem::get_beaming (Grob *me, Direction d) { SCM pair = me->get_property ("beaming"); - if (!ly_c_pair_p (pair)) + if (!scm_is_pair (pair)) return 0; SCM lst = index_get_cell (pair, d); @@ -135,7 +135,7 @@ Stem::support_head (Grob *me) { if (head_count (me) == 1) /* UGH. */ - return unsmob_grob (ly_car (me->get_property ("note-heads"))); + return unsmob_grob (scm_car (me->get_property ("note-heads"))); return first_head (me); } @@ -182,10 +182,10 @@ Stem::extremal_heads (Grob *me) Drul_array<Grob *> exthead; exthead[LEFT] = exthead[RIGHT] =0; - for (SCM s = me->get_property ("note-heads"); ly_c_pair_p (s); - s = ly_cdr (s)) + for (SCM s = me->get_property ("note-heads"); scm_is_pair (s); + s = scm_cdr (s)) { - Grob *n = unsmob_grob (ly_car (s)); + Grob *n = unsmob_grob (scm_car (s)); int p = Staff_symbol_referencer::get_rounded_position (n); Direction d = LEFT; @@ -212,10 +212,10 @@ Array<int> Stem::note_head_positions (Grob *me) { Array<int> ps ; - for (SCM s = me->get_property ("note-heads"); ly_c_pair_p (s); - s = ly_cdr (s)) + for (SCM s = me->get_property ("note-heads"); scm_is_pair (s); + s = scm_cdr (s)) { - Grob *n = unsmob_grob (ly_car (s)); + Grob *n = unsmob_grob (scm_car (s)); int p = Staff_symbol_referencer::get_rounded_position (n); ps.push (p); @@ -276,7 +276,7 @@ Stem::get_default_stem_end_position (Grob *me) else { s = me->get_property ("lengths"); - if (ly_c_pair_p (s)) + if (scm_is_pair (s)) length = 2 * scm_to_double (robust_list_ref (durlog - 2, s)); } @@ -295,7 +295,7 @@ Stem::get_default_stem_end_position (Grob *me) if (dir && dir * hp[dir] >= 0) { SCM sshorten = me->get_property ("stem-shorten"); - SCM scm_shorten = ly_c_pair_p (sshorten) ? + SCM scm_shorten = scm_is_pair (sshorten) ? robust_list_ref ((duration_log (me) - 2) >? 0, sshorten): SCM_EOL; Real shorten = 2* robust_scm2double (scm_shorten,0); @@ -734,7 +734,7 @@ Stem::get_stem_info (Grob *me) { /* Return cached info if available */ SCM scm_info = me->get_property ("stem-info"); - if (!ly_c_pair_p (scm_info)) + if (!scm_is_pair (scm_info)) { calc_stem_info (me); scm_info = me->get_property ("stem-info"); @@ -742,8 +742,8 @@ Stem::get_stem_info (Grob *me) Stem_info si; si.dir_ = get_grob_direction (me); - si.ideal_y_ = scm_to_double (ly_car (scm_info)); - si.shortest_y_ = scm_to_double (ly_cadr (scm_info)); + si.ideal_y_ = scm_to_double (scm_car (scm_info)); + si.shortest_y_ = scm_to_double (scm_cadr (scm_info)); return si; } @@ -865,8 +865,8 @@ Slice Stem::beam_multiplicity (Grob *stem) { SCM beaming= stem->get_property ("beaming"); - Slice le = int_list_to_slice (ly_car (beaming)); - Slice ri = int_list_to_slice (ly_cdr (beaming)); + Slice le = int_list_to_slice (scm_car (beaming)); + Slice ri = int_list_to_slice (scm_cdr (beaming)); le.unite (ri); return le; } diff --git a/lily/stencil-scheme.cc b/lily/stencil-scheme.cc index 1577f52758..310bb5a176 100644 --- a/lily/stencil-scheme.cc +++ b/lily/stencil-scheme.cc @@ -186,12 +186,12 @@ LY_DEFINE (ly_stencil_add , "ly:stencil-add", while (!SCM_NULLP (args)) { - Stencil *s = unsmob_stencil (ly_car (args)); + Stencil *s = unsmob_stencil (scm_car (args)); if (!s) - SCM_ASSERT_TYPE (s, ly_car (args), SCM_ARGn, __FUNCTION__, "Stencil"); + SCM_ASSERT_TYPE (s, scm_car (args), SCM_ARGn, __FUNCTION__, "Stencil"); result.add_stencil (*s); - args = ly_cdr (args); + args = scm_cdr (args); } return result.smobbed_copy (); diff --git a/lily/stencil.cc b/lily/stencil.cc index 14d7961b8a..681ba6e2be 100644 --- a/lily/stencil.cc +++ b/lily/stencil.cc @@ -42,7 +42,7 @@ Stencil::print_smob (SCM, SCM port, scm_print_state *) SCM Stencil::mark_smob (SCM smob) { - Stencil *s = (Stencil*) ly_cdr (smob); + Stencil *s = (Stencil*) scm_cdr (smob); return s->expr_; } @@ -198,28 +198,28 @@ interpret_stencil_expression (SCM expr, { while (1) { - if (!ly_c_pair_p (expr)) + if (!scm_is_pair (expr)) return; - SCM head = ly_car (expr); + SCM head = scm_car (expr); if (head == ly_symbol2scm ("translate-stencil")) { - o += ly_scm2offset (ly_cadr (expr)); - expr = ly_caddr (expr); + o += ly_scm2offset (scm_cadr (expr)); + expr = scm_caddr (expr); } else if (head == ly_symbol2scm ("combine-stencil")) { - for (SCM x = ly_cdr (expr); ly_c_pair_p (x); x = ly_cdr (x)) - interpret_stencil_expression (ly_car (x), func, func_arg, o); + for (SCM x = scm_cdr (expr); scm_is_pair (x); x = scm_cdr (x)) + interpret_stencil_expression (scm_car (x), func, func_arg, o); return; } else if (head == ly_symbol2scm ("grob-cause")) { - SCM grob = ly_cadr (expr); + SCM grob = scm_cadr (expr); (*func) (func_arg, scm_list_2 (head, grob)); - interpret_stencil_expression (ly_caddr (expr), func, func_arg, o); + interpret_stencil_expression (scm_caddr (expr), func, func_arg, o); (*func) (func_arg, scm_list_1 (ly_symbol2scm ("no-origin"))); return ; @@ -247,18 +247,18 @@ find_font_function (void *fs, SCM x) { Font_list *me = (Font_list*) fs; - if (ly_car (x) == ly_symbol2scm ("placebox")) + if (scm_car (x) == ly_symbol2scm ("placebox")) { - SCM args = ly_cdr (x); - SCM what = ly_caddr (args); + SCM args = scm_cdr (x); + SCM what = scm_caddr (args); - if (ly_c_pair_p (what)) + if (scm_is_pair (what)) { - SCM head = ly_car (what); + SCM head = scm_car (what); if (ly_symbol2scm ("text") == head) - me->fonts_ = scm_cons (ly_cadr (what), me->fonts_); + me->fonts_ = scm_cons (scm_cadr (what), me->fonts_); else if (head == ly_symbol2scm ("char")) - me->fonts_ = scm_cons (ly_cadr (what), me->fonts_); + me->fonts_ = scm_cons (scm_cadr (what), me->fonts_); } } } diff --git a/lily/system-start-delimiter.cc b/lily/system-start-delimiter.cc index 0127310b01..1b04631d10 100644 --- a/lily/system-start-delimiter.cc +++ b/lily/system-start-delimiter.cc @@ -85,9 +85,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; ly_c_pair_p (s); s = ly_cdr (s)) + for (SCM s = elts; scm_is_pair (s); s = scm_cdr (s)) { - Interval v = unsmob_grob (ly_car (s))->extent (common, Y_AXIS); + Interval v = unsmob_grob (scm_car (s))->extent (common, Y_AXIS); if (!v.is_empty ()) count ++; @@ -122,9 +122,9 @@ System_start_delimiter::print (SCM smob) Grob * common = common_refpoint_of_list (elts, me, Y_AXIS); Interval ext; - for (SCM s = elts; ly_c_pair_p (s); s = ly_cdr (s)) + for (SCM s = elts; scm_is_pair (s); s = scm_cdr (s)) { - Spanner * sp = unsmob_spanner (ly_car (s)); + Spanner * sp = unsmob_spanner (scm_car (s)); if (sp && sp->get_bound (LEFT) == me->get_bound (LEFT)) { diff --git a/lily/system.cc b/lily/system.cc index a9161074de..b727207568 100644 --- a/lily/system.cc +++ b/lily/system.cc @@ -42,8 +42,8 @@ int System::spanner_count () const { int k = 0; - for (SCM s = get_property ("all-elements"); ly_c_pair_p (s); s = ly_cdr (s)) - if (dynamic_cast<Spanner*> (unsmob_grob (ly_car (s)))) + for (SCM s = get_property ("all-elements"); scm_is_pair (s); s = scm_cdr (s)) + if (dynamic_cast<Spanner*> (unsmob_grob (scm_car (s)))) k++; return k; } @@ -65,18 +65,18 @@ System::typeset_grob (Grob * elem) static void fixup_refpoints (SCM s) { - for (; ly_c_pair_p (s); s = ly_cdr (s)) + for (; scm_is_pair (s); s = scm_cdr (s)) { - Grob::fixup_refpoint (ly_car (s)); + Grob::fixup_refpoint (scm_car (s)); } } SCM System::get_lines () { - for (SCM s = get_property ("all-elements"); ly_c_pair_p (s); s = ly_cdr (s)) + for (SCM s = get_property ("all-elements"); scm_is_pair (s); s = scm_cdr (s)) { - Grob *g = unsmob_grob (ly_car (s)); + Grob *g = unsmob_grob (scm_car (s)); if (g->internal_has_interface (ly_symbol2scm ("only-prebreak-interface"))) { /* @@ -102,8 +102,8 @@ System::get_lines () { Grob *se = broken_intos_[i]; SCM all = se->get_property ("all-elements"); - for (SCM s = all; ly_c_pair_p (s); s = ly_cdr (s)) - fixup_refpoint (ly_car (s)); + for (SCM s = all; scm_is_pair (s); s = scm_cdr (s)) + fixup_refpoint (scm_car (s)); count += scm_ilength (all); } @@ -112,8 +112,8 @@ System::get_lines () */ fixup_refpoints (get_property ("all-elements")); - for (SCM s = get_property ("all-elements"); ly_c_pair_p (s); s = ly_cdr (s)) - unsmob_grob (ly_car (s))->handle_broken_dependencies (); + for (SCM s = get_property ("all-elements"); scm_is_pair (s); s = scm_cdr (s)) + unsmob_grob (scm_car (s))->handle_broken_dependencies (); handle_broken_dependencies (); #if 0 /* don't do this: strange side effects. */ @@ -171,11 +171,11 @@ set_loose_columns (System* which, Column_x_positions const *posns) while (1) { SCM between = loose->get_property ("between-cols"); - if (!ly_c_pair_p (between)) + if (!scm_is_pair (between)) break; - Item *le = dynamic_cast<Item*> (unsmob_grob (ly_car (between))); - Item *re = dynamic_cast<Item*> (unsmob_grob (ly_cdr (between))); + Item *le = dynamic_cast<Item*> (unsmob_grob (scm_car (between))); + Item *re = dynamic_cast<Item*> (unsmob_grob (scm_cdr (between))); if (!(le && re)) break; @@ -253,7 +253,7 @@ System::add_column (Paper_column*p) { Grob *me = this; SCM cs = me->get_property ("columns"); - Grob *prev = ly_c_pair_p (cs) ? unsmob_grob (ly_car (cs)) : 0; + Grob *prev = scm_is_pair (cs) ? unsmob_grob (scm_car (cs)) : 0; p->rank_ = prev ? Paper_column::get_rank (prev) + 1 : 0; @@ -265,29 +265,29 @@ System::add_column (Paper_column*p) void System::pre_processing () { - for (SCM s = get_property ("all-elements"); ly_c_pair_p (s); s = ly_cdr (s)) - unsmob_grob (ly_car (s))->discretionary_processing (); + for (SCM s = get_property ("all-elements"); scm_is_pair (s); s = scm_cdr (s)) + unsmob_grob (scm_car (s))->discretionary_processing (); if (verbose_global_b) progress_indication (_f ("Grob count %d", element_count ())); - for (SCM s = get_property ("all-elements"); ly_c_pair_p (s); s = ly_cdr (s)) - unsmob_grob (ly_car (s))->handle_prebroken_dependencies (); + for (SCM s = get_property ("all-elements"); scm_is_pair (s); s = scm_cdr (s)) + unsmob_grob (scm_car (s))->handle_prebroken_dependencies (); fixup_refpoints (get_property ("all-elements")); - for (SCM s = get_property ("all-elements"); ly_c_pair_p (s); s = ly_cdr (s)) + for (SCM s = get_property ("all-elements"); scm_is_pair (s); s = scm_cdr (s)) { - Grob *sc = unsmob_grob (ly_car (s)); + Grob *sc = unsmob_grob (scm_car (s)); sc->calculate_dependencies (PRECALCED, PRECALCING, ly_symbol2scm ("before-line-breaking-callback")); } progress_indication ("\n"); progress_indication (_ ("Calculating line breaks...")); progress_indication (" "); - for (SCM s = get_property ("all-elements"); ly_c_pair_p (s); s = ly_cdr (s)) + for (SCM s = get_property ("all-elements"); scm_is_pair (s); s = scm_cdr (s)) { - Grob *e = unsmob_grob (ly_car (s)); + Grob *e = unsmob_grob (scm_car (s)); SCM proc = e->get_property ("spacing-procedure"); if (ly_c_procedure_p (proc)) scm_call_1 (proc, e->self_scm ()); @@ -297,9 +297,9 @@ System::pre_processing () void System::post_processing () { - for (SCM s = get_property ("all-elements"); ly_c_pair_p (s); s = ly_cdr (s)) + for (SCM s = get_property ("all-elements"); scm_is_pair (s); s = scm_cdr (s)) { - Grob *g = unsmob_grob (ly_car (s)); + Grob *g = unsmob_grob (scm_car (s)); g->calculate_dependencies (POSTCALCED, POSTCALCING, ly_symbol2scm ("after-line-breaking-callback")); } @@ -317,9 +317,9 @@ System::post_processing () all = ly_list_qsort_uniq_x (all); this->get_stencil (); - for (SCM s = all; ly_c_pair_p (s); s = ly_cdr (s)) + for (SCM s = all; scm_is_pair (s); s = scm_cdr (s)) { - Grob *g = unsmob_grob (ly_car (s)); + Grob *g = unsmob_grob (scm_car (s)); g->get_stencil (); } } @@ -340,9 +340,9 @@ System::get_line () staff_refpoints.set_empty(); for (int i = LAYER_COUNT; i--;) - for (SCM s = all; ly_c_pair_p (s); s = ly_cdr (s)) + for (SCM s = all; scm_is_pair (s); s = scm_cdr (s)) { - Grob *g = unsmob_grob (ly_car (s)); + Grob *g = unsmob_grob (scm_car (s)); Stencil *stil = g->get_stencil (); if (i == 0 @@ -407,19 +407,19 @@ System::broken_col_range (Item const *left, Item const *right) const right = right->get_column (); SCM s = get_property ("columns"); - while (ly_c_pair_p (s) && ly_car (s) != right->self_scm ()) - s = ly_cdr (s); + while (scm_is_pair (s) && scm_car (s) != right->self_scm ()) + s = scm_cdr (s); - if (ly_c_pair_p (s)) - s = ly_cdr (s); + if (scm_is_pair (s)) + s = scm_cdr (s); - while (ly_c_pair_p (s) && ly_car (s) != left->self_scm ()) + while (scm_is_pair (s) && scm_car (s) != left->self_scm ()) { - Paper_column*c = dynamic_cast<Paper_column*> (unsmob_grob (ly_car (s))); + Paper_column*c = dynamic_cast<Paper_column*> (unsmob_grob (scm_car (s))); if (Item::is_breakable (c) && !c->system_) ret.push (c); - s = ly_cdr (s); + s = scm_cdr (s); } ret.reverse (); diff --git a/lily/tab-note-heads-engraver.cc b/lily/tab-note-heads-engraver.cc index 883108f8c8..f40fddbead 100644 --- a/lily/tab-note-heads-engraver.cc +++ b/lily/tab-note-heads-engraver.cc @@ -81,9 +81,9 @@ Tab_note_heads_engraver::process_music () Music * tabstring_event=0; for (SCM s =event->get_property ("articulations"); - !tabstring_event && ly_c_pair_p (s); s = ly_cdr (s)) + !tabstring_event && scm_is_pair (s); s = scm_cdr (s)) { - Music * art = unsmob_music (ly_car (s)); + Music * art = unsmob_music (scm_car (s)); if (art->is_mus_type ("string-number-event")) tabstring_event = art; diff --git a/lily/text-item.cc b/lily/text-item.cc index 4f565f53f9..f0ec373d60 100644 --- a/lily/text-item.cc +++ b/lily/text-item.cc @@ -71,10 +71,10 @@ Text_interface::interpret_markup (SCM paper_smob, SCM props, SCM markup) { if (scm_is_string (markup)) return interpret_string (paper_smob, props, SCM_EOL, markup); - else if (ly_c_pair_p (markup)) + else if (scm_is_pair (markup)) { - SCM func = ly_car (markup); - SCM args = ly_cdr (markup); + SCM func = scm_car (markup); + SCM args = scm_cdr (markup); if (!markup_p (markup)) programming_error ("Markup head has no markup signature."); @@ -99,9 +99,9 @@ bool Text_interface::markup_p (SCM x) { return (scm_is_string (x) - || (ly_c_pair_p (x) + || (scm_is_pair (x) && SCM_BOOL_F - != scm_object_property (ly_car (x), + != scm_object_property (scm_car (x), ly_symbol2scm ("markup-signature")))); } diff --git a/lily/text-spanner.cc b/lily/text-spanner.cc index 930fe499e0..dd216a5d0d 100644 --- a/lily/text-spanner.cc +++ b/lily/text-spanner.cc @@ -83,7 +83,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 (ly_c_pair_p (edge_text)) + if (scm_is_pair (edge_text)) { Direction d = LEFT; do diff --git a/lily/tie.cc b/lily/tie.cc index 1f4d4a58b0..855891f07d 100644 --- a/lily/tie.cc +++ b/lily/tie.cc @@ -59,7 +59,7 @@ Tie::head (Grob*me, Direction d) { SCM c = me->get_property ("head-pair"); - if (ly_c_pair_p (c)) + if (scm_is_pair (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 = scm_to_double (ly_cdr (lim)) * staff_space; - Real r_0 = scm_to_double (ly_cdr (scm_assq (ly_symbol2scm ("ratio"),details))); + Real h_inf = scm_to_double (scm_cdr (lim)) * staff_space; + Real r_0 = scm_to_double (scm_cdr (scm_assq (ly_symbol2scm ("ratio"),details))); Bezier b = slur_shape (width, h_inf, r_0); @@ -326,13 +326,13 @@ Tie::print (SCM smob) Grob*me = unsmob_grob (smob); SCM cp = me->get_property ("control-points"); - if (!ly_c_pair_p (cp)) // list is more accurate + if (!scm_is_pair (cp)) // list is more accurate { cp = get_control_points (smob); me->set_property ("control-points", cp); } - if (!ly_c_pair_p (cp)) + if (!scm_is_pair (cp)) return Stencil ().smobbed_copy (); Real thick @@ -341,9 +341,9 @@ Tie::print (SCM smob) Bezier b; int i = 0; - for (SCM s= cp; s != SCM_EOL; s = ly_cdr (s)) + for (SCM s= cp; s != SCM_EOL; s = scm_cdr (s)) { - b.control_[i] = ly_scm2offset (ly_car (s)); + b.control_[i] = ly_scm2offset (scm_car (s)); i++; } diff --git a/lily/time-signature-engraver.cc b/lily/time-signature-engraver.cc index d41d0bb0c4..a66068e1d6 100644 --- a/lily/time-signature-engraver.cc +++ b/lily/time-signature-engraver.cc @@ -44,9 +44,9 @@ Time_signature_engraver::process_music () SCM fr = get_property ("timeSignatureFraction"); if (!time_signature_ && last_time_fraction_ != fr - && ly_c_pair_p (fr)) + && scm_is_pair (fr)) { - int den = scm_to_int (ly_cdr (fr)); + int den = scm_to_int (scm_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, - scm_to_int (ly_car (fr)) + scm_to_int (scm_car (fr)) )); } diff --git a/lily/time-signature-performer.cc b/lily/time-signature-performer.cc index 30627f2b3c..d6226e725a 100644 --- a/lily/time-signature-performer.cc +++ b/lily/time-signature-performer.cc @@ -44,11 +44,11 @@ void Time_signature_performer::create_audio_elements () { SCM fr = get_property ("timeSignatureFraction"); - if (ly_c_pair_p (fr) && !ly_c_equal_p (fr, prev_fraction_)) + if (scm_is_pair (fr) && !ly_c_equal_p (fr, prev_fraction_)) { prev_fraction_ = fr; - int b = scm_to_int (ly_car (fr)); - int o = scm_to_int (ly_cdr (fr)); + int b = scm_to_int (scm_car (fr)); + int o = scm_to_int (scm_cdr (fr)); audio_ = new Audio_time_signature (b,o); Audio_element_info info (audio_, 0); diff --git a/lily/time-signature.cc b/lily/time-signature.cc index 66a57b54a8..40976eb311 100644 --- a/lily/time-signature.cc +++ b/lily/time-signature.cc @@ -34,10 +34,10 @@ Time_signature::print (SCM smob) SCM frac = me->get_property ("fraction"); int n = 4; int d = 4; - if (ly_c_pair_p (frac)) + if (scm_is_pair (frac)) { - n = scm_to_int (ly_car (frac)); - d = scm_to_int (ly_cdr (frac)); + n = scm_to_int (scm_car (frac)); + d = scm_to_int (scm_cdr (frac)); } Stencil m; diff --git a/lily/translator-ctors.cc b/lily/translator-ctors.cc index 5998b4f234..3b08edc159 100644 --- a/lily/translator-ctors.cc +++ b/lily/translator-ctors.cc @@ -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; ly_c_pair_p (s); s = ly_cdr (s)) + for (SCM s =l; scm_is_pair (s); s = scm_cdr (s)) { - scm_set_car_x (s, ly_cdar (s)); + scm_set_car_x (s, scm_cdar (s)); } return l; diff --git a/lily/translator-group.cc b/lily/translator-group.cc index 7a75736946..113a4595a8 100644 --- a/lily/translator-group.cc +++ b/lily/translator-group.cc @@ -27,8 +27,8 @@ Translator_group::get_daddy_translator () const void translator_each (SCM list, Translator_method method) { - for (SCM p = list; ly_c_pair_p (p); p = ly_cdr (p)) - (unsmob_translator (ly_car (p))->*method) (); + for (SCM p = list; scm_is_pair (p); p = scm_cdr (p)) + (unsmob_translator (scm_car (p))->*method) (); } @@ -45,9 +45,9 @@ translator_accepts_any_of (Translator*tr, SCM ifaces) { SCM ack_ifs = scm_assoc (ly_symbol2scm ("events-accepted"), tr->translator_description ()); - ack_ifs = ly_cdr (ack_ifs); - for (SCM s = ifaces; ly_c_pair_p (s); s = ly_cdr (s)) - if (scm_c_memq (ly_car (s), ack_ifs) != SCM_BOOL_F) + ack_ifs = scm_cdr (ack_ifs); + for (SCM s = ifaces; scm_is_pair (s); s = scm_cdr (s)) + if (scm_c_memq (scm_car (s), ack_ifs) != SCM_BOOL_F) return true; return false; } @@ -56,9 +56,9 @@ SCM find_accept_translators (SCM gravlist, SCM ifaces) { SCM l = SCM_EOL; - for (SCM s = gravlist; ly_c_pair_p (s); s = ly_cdr (s)) + for (SCM s = gravlist; scm_is_pair (s); s = scm_cdr (s)) { - Translator* tr = unsmob_translator (ly_car (s)); + Translator* tr = unsmob_translator (scm_car (s)); if (translator_accepts_any_of (tr, ifaces)) l = scm_cons (tr->self_scm (), l); } @@ -74,10 +74,10 @@ Translator_group::try_music (Music* m) SCM name = scm_sloppy_assq (ly_symbol2scm ("name"), m->get_property_alist (false)); - if (!ly_c_pair_p (name)) + if (!scm_is_pair (name)) return false; - name = ly_cdr (name); + name = scm_cdr (name); SCM accept_list = scm_hashq_ref (tab, name, SCM_UNDEFINED); if (accept_list == SCM_BOOL_F) { @@ -86,9 +86,9 @@ Translator_group::try_music (Music* m) scm_hashq_set_x (tab, name, accept_list); } - for (SCM p = accept_list; ly_c_pair_p (p); p = ly_cdr (p)) + for (SCM p = accept_list; scm_is_pair (p); p = scm_cdr (p)) { - Translator * t = unsmob_translator (ly_car (p)); + Translator * t = unsmob_translator (scm_car (p)); if (t && t->try_music (m)) return true; } @@ -120,10 +120,10 @@ recurse_over_translators (Context * c, Translator_method ptr, Direction dir) (tg->*ptr) (); } - for (SCM s = c->children_contexts () ; ly_c_pair_p (s); - s =ly_cdr (s)) + for (SCM s = c->children_contexts () ; scm_is_pair (s); + s =scm_cdr (s)) { - recurse_over_translators (unsmob_context (ly_car (s)), ptr, dir); + recurse_over_translators (unsmob_context (scm_car (s)), ptr, dir); } if (dir == UP) diff --git a/lily/translator-property.cc b/lily/translator-property.cc index 735c22b2ab..8d61674d8e 100644 --- a/lily/translator-property.cc +++ b/lily/translator-property.cc @@ -55,15 +55,15 @@ execute_pushpop_property (Context * trg, else prev = trg->internal_get_property (prop); - if (!ly_c_pair_p (prev)) + if (!scm_is_pair (prev)) { programming_error ("Grob definition should be cons."); return ; } - SCM prev_alist = ly_car (prev); + SCM prev_alist = scm_car (prev); - if (ly_c_pair_p (prev_alist) || prev_alist == SCM_EOL) + if (scm_is_pair (prev_alist) || prev_alist == SCM_EOL) { bool ok = type_check_assignment (eltprop, val, ly_symbol2scm ("backend-type?")); @@ -81,24 +81,24 @@ execute_pushpop_property (Context * trg, else if (trg->where_defined (prop) == trg) { SCM prev = trg->internal_get_property (prop); - SCM prev_alist = ly_car (prev); - SCM daddy = ly_cdr (prev); + SCM prev_alist = scm_car (prev); + SCM daddy = scm_cdr (prev); SCM new_alist = SCM_EOL; SCM *tail = &new_alist; while (prev_alist != daddy) { - if (ly_c_equal_p (ly_caar (prev_alist), eltprop)) + if (ly_c_equal_p (scm_caar (prev_alist), eltprop)) { - prev_alist = ly_cdr (prev_alist); + prev_alist = scm_cdr (prev_alist); break ; } - *tail = scm_cons (ly_car (prev_alist), SCM_EOL); + *tail = scm_cons (scm_car (prev_alist), SCM_EOL); tail = SCM_CDRLOC (*tail); - prev_alist = ly_cdr (prev_alist); + prev_alist = scm_cdr (prev_alist); } if (new_alist == SCM_EOL && prev_alist == daddy) @@ -125,22 +125,22 @@ void apply_property_operations (Context *tg, SCM pre_init_ops) { SCM correct_order = scm_reverse (pre_init_ops); - for (SCM s = correct_order; ly_c_pair_p (s); s = ly_cdr (s)) + for (SCM s = correct_order; scm_is_pair (s); s = scm_cdr (s)) { - SCM entry = ly_car (s); - SCM type = ly_car (entry); - entry = ly_cdr (entry); + SCM entry = scm_car (s); + SCM type = scm_car (entry); + entry = scm_cdr (entry); if (type == ly_symbol2scm ("push") || type == ly_symbol2scm ("poppush")) { - SCM val = ly_cddr (entry); - val = ly_c_pair_p (val) ? ly_car (val) : SCM_UNDEFINED; + SCM val = scm_cddr (entry); + val = scm_is_pair (val) ? scm_car (val) : SCM_UNDEFINED; - execute_pushpop_property (tg, ly_car (entry), ly_cadr (entry), val); + execute_pushpop_property (tg, scm_car (entry), scm_cadr (entry), val); } else if (type == ly_symbol2scm ("assign")) { - tg->internal_set_property (ly_car (entry), ly_cadr (entry)); + tg->internal_set_property (scm_car (entry), scm_cadr (entry)); } } } @@ -165,25 +165,25 @@ updated_grob_properties (Context * tg, SCM sym) SCM props = tg->internal_get_property (sym); - if (!ly_c_pair_p (props)) + if (!scm_is_pair (props)) { programming_error ("grob props not a pair?"); return SCM_EOL; } - SCM based_on = ly_cdr (props); + SCM based_on = scm_cdr (props); if (based_on == daddy_props) { - return ly_car (props); + return scm_car (props); } else { SCM copy = daddy_props; SCM * tail = © - SCM p = ly_car (props); + SCM p = scm_car (props); while (p != based_on) { - *tail = scm_cons (ly_car (p), daddy_props); + *tail = scm_cons (scm_car (p), daddy_props); tail = SCM_CDRLOC (*tail); p = SCM_CDR (p); } diff --git a/lily/translator-scheme.cc b/lily/translator-scheme.cc index a80b4c1661..4e1b7dfb4f 100644 --- a/lily/translator-scheme.cc +++ b/lily/translator-scheme.cc @@ -36,7 +36,7 @@ LY_DEFINE (ly_translator_description, "ly:translator-description", int Translator::print_smob (SCM s, SCM port, scm_print_state *) { - Translator *me = (Translator*) ly_cdr (s); + Translator *me = (Translator*) scm_cdr (s); scm_puts ("#<Translator ", port); scm_puts (classname (me), port); scm_puts (" >", port); diff --git a/lily/tuplet-bracket.cc b/lily/tuplet-bracket.cc index 46bf85d6b6..52550d2b7e 100644 --- a/lily/tuplet-bracket.cc +++ b/lily/tuplet-bracket.cc @@ -472,8 +472,8 @@ Tuplet_bracket::after_line_breaking (SCM smob) { SCM ps = par_beam->get_property ("positions"); - Real lp = scm_to_double (ly_car (ps)); - Real rp = scm_to_double (ly_cdr (ps)); + Real lp = scm_to_double (scm_car (ps)); + Real rp = scm_to_double (scm_cdr (ps)); /* duh. magic. @@ -514,9 +514,9 @@ Direction Tuplet_bracket::get_default_dir (Grob*me) { Drul_array<int> dirs (0,0); - for (SCM s = me->get_property ("note-columns"); ly_c_pair_p (s); s = ly_cdr (s)) + for (SCM s = me->get_property ("note-columns"); scm_is_pair (s); s = scm_cdr (s)) { - Grob * nc = unsmob_grob (ly_car (s)); + Grob * nc = unsmob_grob (scm_car (s)); Direction d = Note_column::dir (nc); if (d) dirs[d]++; diff --git a/lily/unfolded-repeat-iterator.cc b/lily/unfolded-repeat-iterator.cc index 4f7a4e3cd6..5c7be710e3 100644 --- a/lily/unfolded-repeat-iterator.cc +++ b/lily/unfolded-repeat-iterator.cc @@ -41,11 +41,11 @@ Unfolded_repeat_iterator::get_music_list () const if (alt_count) { - *tail = scm_cons (ly_car (alts), SCM_EOL); + *tail = scm_cons (scm_car (alts), SCM_EOL); tail = SCM_CDRLOC (*tail); if (i >= rep_count - alt_count) - alts = ly_cdr (alts); + alts = scm_cdr (alts); } } @@ -109,7 +109,7 @@ Volta_repeat_iterator::add_repeat_command (SCM what) Context * where = get_outlet ()->where_defined (reps); if (where - && current_reps == SCM_EOL || ly_c_pair_p (current_reps)) + && current_reps == SCM_EOL || scm_is_pair (current_reps)) { current_reps = scm_cons (what, current_reps); where->internal_set_property (reps, current_reps); diff --git a/lily/virtual-font-metric.cc b/lily/virtual-font-metric.cc index ab8015b7c7..6d21a71562 100644 --- a/lily/virtual-font-metric.cc +++ b/lily/virtual-font-metric.cc @@ -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; ly_c_pair_p (s); s = ly_cdr (s)) + for (SCM s = font_list; scm_is_pair (s); s = scm_cdr (s)) { - if (Font_metric *fm = unsmob_metrics (ly_car (s))) + if (Font_metric *fm = unsmob_metrics (scm_car (s))) { - *tail = scm_cons (ly_car (s),SCM_EOL); + *tail = scm_cons (scm_car (s),SCM_EOL); tail = SCM_CDRLOC (*tail); if (!scm_is_number (mag)) /* Ugh. */ - mag = ly_cdr (fm->description_); + mag = scm_cdr (fm->description_); - *name_tail = scm_cons (ly_car (fm->description_), SCM_EOL); + *name_tail = scm_cons (scm_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 (ly_car (font_list_))-> design_size (); + return unsmob_metrics (scm_car (font_list_))-> design_size (); } void @@ -61,8 +61,8 @@ int Virtual_font_metric::count () const { int k = 0; - for (SCM s = font_list_; ly_c_pair_p (s); s = ly_cdr (s)) - k += unsmob_metrics (ly_car (s))->count (); + for (SCM s = font_list_; scm_is_pair (s); s = scm_cdr (s)) + k += unsmob_metrics (scm_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 () && ly_c_pair_p (s); s = ly_cdr (s)) + for (SCM s = font_list_; m.is_empty () && scm_is_pair (s); s = scm_cdr (s)) { - m = unsmob_metrics (ly_car (s))->find_by_name (glyph); + m = unsmob_metrics (scm_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_; ly_c_pair_p (s); s = ly_cdr (s)) + for (SCM s = font_list_; scm_is_pair (s); s = scm_cdr (s)) { - Font_metric *fm = unsmob_metrics (ly_car (s)); + Font_metric *fm = unsmob_metrics (scm_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_; ly_c_pair_p (s); s = ly_cdr (s)) + for (SCM s = font_list_; scm_is_pair (s); s = scm_cdr (s)) { - Font_metric *fm = unsmob_metrics (ly_car (s)); + Font_metric *fm = unsmob_metrics (scm_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 () && ly_c_pair_p (s); s = ly_cdr (s)) + for (SCM s = font_list_; m.is_empty () && scm_is_pair (s); s = scm_cdr (s)) { - Font_metric *m =unsmob_metrics (ly_car (s)); + Font_metric *m =unsmob_metrics (scm_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_; ly_c_pair_p (s); s = ly_cdr (s)) + for (SCM s = font_list_; scm_is_pair (s); s = scm_cdr (s)) { - Font_metric *fm = unsmob_metrics (ly_car (s)); + Font_metric *fm = unsmob_metrics (scm_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 (ly_car (font_list_)); + Font_metric *fm = unsmob_metrics (scm_car (font_list_)); return fm->coding_scheme (); } diff --git a/lily/volta-bracket.cc b/lily/volta-bracket.cc index 94b331bc1b..8fd54a281a 100644 --- a/lily/volta-bracket.cc +++ b/lily/volta-bracket.cc @@ -46,7 +46,7 @@ Volta_bracket_interface::print (SCM smob) bool no_vertical_start = orig_span && !broken_first_bracket; bool no_vertical_end = orig_span && !broken_last_bracket; SCM s = me->get_property ("bars"); - Grob * endbar = ly_c_pair_p (s) ? unsmob_grob (ly_car (s)) : 0; + Grob * endbar = scm_is_pair (s) ? unsmob_grob (scm_car (s)) : 0; SCM glyph = endbar ? endbar->get_property ("glyph") : SCM_EOL; String str; diff --git a/lily/volta-engraver.cc b/lily/volta-engraver.cc index 5f6dcf1b6f..a988218ca0 100644 --- a/lily/volta-engraver.cc +++ b/lily/volta-engraver.cc @@ -83,12 +83,12 @@ Volta_engraver::staff_eligible () volta engraver in score context or somesuch. */ - if (!ly_c_pair_p (staffs)) + if (!scm_is_pair (staffs)) { programming_error ("Huh? Volta engraver can't find staffs?"); return false; } - else if (ly_car (scm_last_pair (staffs)) != staff_) + else if (scm_car (scm_last_pair (staffs)) != staff_) { return false; } @@ -107,21 +107,21 @@ Volta_engraver::process_music () bool end = false; start_string_ = SCM_EOL; - while (ly_c_pair_p (cs)) + while (scm_is_pair (cs)) { - SCM c = ly_car (cs); + SCM c = scm_car (cs); - if (ly_c_pair_p (c) - && ly_car (c) == ly_symbol2scm ("volta") - && ly_c_pair_p (ly_cdr (c))) + if (scm_is_pair (c) + && scm_car (c) == ly_symbol2scm ("volta") + && scm_is_pair (scm_cdr (c))) { - if (ly_cadr (c) == SCM_BOOL_F) + if (scm_cadr (c) == SCM_BOOL_F) end = true; else - start_string_ = ly_cadr (c); + start_string_ = scm_cadr (c); } - cs = ly_cdr (cs); + cs = scm_cdr (cs); } if (volta_span_) @@ -147,7 +147,7 @@ Volta_engraver::process_music () } if (volta_span_ && - (scm_is_string (start_string_) || ly_c_pair_p (start_string_))) + (scm_is_string (start_string_) || scm_is_pair (start_string_))) { warning (_ ("Already have a volta spanner. Stopping that one prematurely.")); @@ -162,7 +162,7 @@ Volta_engraver::process_music () } if (!volta_span_ && - (scm_is_string (start_string_) || ly_c_pair_p (start_string_))) + (scm_is_string (start_string_) || scm_is_pair (start_string_))) { started_mom_ = now_mom () ; |