+1.5.11.jcn1
+===========
+
+* Add -p flag to package-diff.py's diff invocation, to show changed function.
+
+* Add configure checks for python headers.
+
+* Make midi module.
+
+1.5.11.hwn1
+===========
+
+* Allow breaks at measures starting with grace notes.
+
+* Bugfix: don't give up when there is one entirely unspaceable
+measure/line.
+
+* Midi module: many bugfixes.
+
+* midi2ly python blurble.
+
+
+1.5.11
+======
+
1.5.10.jcn3
===========
return m;
}
- SCM at = (gh_list (ly_symbol2scm ("char"),
+ SCM at = (scm_list_n (ly_symbol2scm ("char"),
gh_int2scm (cm->code),
SCM_UNDEFINED));
bool
Auto_beam_engraver::test_moment (Direction dir, Moment test_mom)
{
- SCM wild = gh_list (ly_symbol2scm ("*"), ly_symbol2scm ("*"), SCM_UNDEFINED);
+ SCM wild = scm_list_n (ly_symbol2scm ("*"), ly_symbol2scm ("*"), SCM_UNDEFINED);
SCM function;
if (dir == START)
- function = gh_list (ly_symbol2scm ("begin"), SCM_UNDEFINED);
+ function = scm_list_n (ly_symbol2scm ("begin"), SCM_UNDEFINED);
else
- function = gh_list (ly_symbol2scm ("end"), SCM_UNDEFINED);
+ function = scm_list_n (ly_symbol2scm ("end"), SCM_UNDEFINED);
Moment one_beat = *unsmob_moment (get_property ("beatLength"));
int num = int ((*unsmob_moment (get_property ("measureLength")) / one_beat).main_part_);
int den = one_beat.den ();
- SCM time = gh_list (gh_int2scm (num), gh_int2scm (den), SCM_UNDEFINED);
+ SCM time = scm_list_n (gh_int2scm (num), gh_int2scm (den), SCM_UNDEFINED);
- SCM type = gh_list (gh_int2scm (test_mom.num ()),
+ SCM type = scm_list_n (gh_int2scm (test_mom.num ()),
gh_int2scm (test_mom.den ()), SCM_UNDEFINED);
SCM settings = get_property ("autoBeamSettings");
/* second guess: property generic time exception */
SCM m = gh_assoc (gh_append3 (function, wild, time), settings);
- if (m != SCM_BOOL_F && unsmob_moment (gh_cdr (m)))
- moment = * unsmob_moment (gh_cdr (m));
+ if (m != SCM_BOOL_F && unsmob_moment (ly_cdr (m)))
+ moment = * unsmob_moment (ly_cdr (m));
/* third guess: property time exception, specific for duration type */
m = gh_assoc (gh_append3 (function, type, time), settings);
- if (m != SCM_BOOL_F && unsmob_moment (gh_cdr (m)))
- moment = * unsmob_moment (gh_cdr (m));
+ if (m != SCM_BOOL_F && unsmob_moment (ly_cdr (m)))
+ moment = * unsmob_moment (ly_cdr (m));
/* fourth guess [user override]: property plain generic */
m = gh_assoc (gh_append3 (function, wild, wild), settings);
- if (m != SCM_BOOL_F && unsmob_moment (gh_cdr (m)))
- moment = * unsmob_moment (gh_cdr (m));
+ if (m != SCM_BOOL_F && unsmob_moment (ly_cdr (m)))
+ moment = * unsmob_moment (ly_cdr (m));
/* fifth guess [user override]: property plain, specific for duration type */
m = gh_assoc (gh_append3 (function, type, wild), settings);
- if (m != SCM_BOOL_F && unsmob_moment (gh_cdr (m)))
- moment = * unsmob_moment (gh_cdr (m));
+ if (m != SCM_BOOL_F && unsmob_moment (ly_cdr (m)))
+ moment = * unsmob_moment (ly_cdr (m));
Rational r;
if (moment.to_bool ())
Beam::get_multiplicity (Grob*me)
{
int m = 0;
- for (SCM s = me->get_grob_property ("stems"); gh_pair_p (s); s = gh_cdr (s))
+ for (SCM s = me->get_grob_property ("stems"); gh_pair_p (s); s = ly_cdr (s))
{
- Grob * sc = unsmob_grob (gh_car (s));
+ Grob * sc = unsmob_grob (ly_car (s));
if (Stem::has_interface (sc))
m = m >? Stem::beam_count (sc,LEFT) >? Stem::beam_count (sc,RIGHT);
somewhere (?), I guess, not by looping here. */
SCM list = me->get_grob_property ("y-dy-callbacks");
- for (SCM i = list; gh_pair_p (i); i = gh_cdr (i))
- gh_call1 (gh_car (i), smob);
+ for (SCM i = list; gh_pair_p (i); i = ly_cdr (i))
+ gh_call1 (ly_car (i), smob);
// UGH. Y is not in staff position unit?
// Ik dacht datwe daar juist van weg wilden?
gh_double2scm (me->paper_l ()->get_var ("stafflinethickness")
/ 1.0));
- for (SCM s = quants; gh_pair_p (s); s = gh_cdr (s))
- a.push (gh_scm2double (gh_car (s)));
+ for (SCM s = quants; gh_pair_p (s); s = ly_cdr (s))
+ a.push (gh_scm2double (ly_car (s)));
if (a.size () > 1)
{
SCM proc = me->get_grob_property ("vertical-position-quant-function");
SCM quants = scm_apply (proc,
me->self_scm (),
- gh_list (gh_int2scm (multiplicity),
+ scm_list_n (gh_int2scm (multiplicity),
gh_double2scm (dy/staff_space),
gh_double2scm (thick/staff_space),
SCM_EOL, SCM_UNDEFINED));
Array<Real> a;
- for (; gh_pair_p (quants); quants = gh_cdr (quants))
- a.push (gh_scm2double (gh_car (quants)));
+ for (; gh_pair_p (quants); quants = ly_cdr (quants))
+ a.push (gh_scm2double (ly_car (quants)));
if (a.size () <= 1)
return y;
ly_unique (SCM list)
{
SCM unique = SCM_EOL;
- for (SCM i = list; gh_pair_p (i); i = gh_cdr (i))
+ for (SCM i = list; gh_pair_p (i); i = ly_cdr (i))
{
- if (!gh_pair_p (gh_cdr (i))
- || !gh_equal_p (gh_car (i), gh_cadr (i)))
- unique = gh_cons (gh_car (i), unique);
+ if (!gh_pair_p (ly_cdr (i))
+ || !gh_equal_p (ly_car (i), gh_cadr (i)))
+ unique = gh_cons (ly_car (i), unique);
}
return gh_reverse (unique);
}
ly_remove_member (SCM s, SCM list)
{
SCM removed = SCM_EOL;
- for (SCM i = list; gh_pair_p (i); i = gh_cdr (i))
+ for (SCM i = list; gh_pair_p (i); i = ly_cdr (i))
{
- if (!gh_equal_p (gh_car (i), s))
- removed = gh_cons (gh_car (i), removed);
+ if (!gh_equal_p (ly_car (i), s))
+ removed = gh_cons (ly_car (i), removed);
}
return gh_reverse (removed);
}
SCM
ly_snoc (SCM s, SCM list)
{
- return gh_append2 (list, gh_list (s, SCM_UNDEFINED));
+ return gh_append2 (list, scm_list_n (s, SCM_UNDEFINED));
}
SCM after = list;
for (; gh_pair_p (after);)
{
- SCM i = gh_car (after);
- after = gh_cdr (after);
+ SCM i = ly_car (after);
+ after = ly_cdr (after);
if (gh_equal_p (i, s))
break;
before = gh_cons (i, before);
SCM minor = Pitch (0, 2, -1).smobbed_copy ();
base = gh_cons (tonic, base);
- base = gh_cons (Pitch::transpose (gh_car (base), major), base);
- base = gh_cons (Pitch::transpose (gh_car (base), minor), base);
+ base = gh_cons (Pitch::transpose (ly_car (base), major), base);
+ base = gh_cons (Pitch::transpose (ly_car (base), minor), base);
return gh_reverse (base);
}
hoe doe je lambda in C?
*/
SCM transposed = SCM_EOL;
- for (SCM i = pitches; gh_pair_p (i); i = gh_cdr (i))
+ for (SCM i = pitches; gh_pair_p (i); i = ly_cdr (i))
{
- transposed = gh_cons (Pitch::transpose (tonic, gh_car (i)),
+ transposed = gh_cons (Pitch::transpose (tonic, ly_car (i)),
transposed);
}
return gh_reverse (transposed);
Chord::lower_step (SCM tonic, SCM pitches, SCM step)
{
SCM lowered = SCM_EOL;
- for (SCM i = pitches; gh_pair_p (i); i = gh_cdr (i))
+ for (SCM i = pitches; gh_pair_p (i); i = ly_cdr (i))
{
- SCM p = gh_car (i);
- if (gh_equal_p (step_scm (tonic, gh_car (i)), step)
+ SCM p = ly_car (i);
+ if (gh_equal_p (step_scm (tonic, ly_car (i)), step)
|| gh_scm2int (step) == 0)
{
p = Pitch::transpose (p, Pitch (0, 0, -1).smobbed_copy ());
SCM member = gh_member (p, pitches);
if (member == SCM_BOOL_F)
{
- for (SCM i = pitches; gh_pair_p (i); i = gh_cdr (i))
+ for (SCM i = pitches; gh_pair_p (i); i = ly_cdr (i))
{
/*
Urg, eindelijk gevonden: () != #f, kan maar niet aan wennen.
Anders kon iets korter...
*/
if (unsmob_pitch (p)->notename_i_
- == unsmob_pitch (gh_car (i))->notename_i_)
+ == unsmob_pitch (ly_car (i))->notename_i_)
{
- member = gh_car (i);
+ member = ly_car (i);
break;
}
}
}
else
- member = gh_car (member);
+ member = ly_car (member);
return member;
}
SCM member = gh_member (p, pitches);
if (member == SCM_BOOL_F)
{
- for (SCM i = pitches; gh_pair_p (i); i = gh_cdr (i))
+ for (SCM i = pitches; gh_pair_p (i); i = ly_cdr (i))
{
if (unsmob_pitch (p)->notename_i_
- == unsmob_pitch (gh_car (i))->notename_i_
+ == unsmob_pitch (ly_car (i))->notename_i_
&& unsmob_pitch (p)->alteration_i_
- == unsmob_pitch (gh_car (i))->alteration_i_)
+ == unsmob_pitch (ly_car (i))->alteration_i_)
{
- member = gh_car (i);
+ member = ly_car (i);
break;
}
}
}
else
- member = gh_car (member);
+ member = ly_car (member);
return member;
}
thirds);
thirds = scm_vector (gh_reverse (thirds));
- SCM tonic = gh_car (pitches);
+ SCM tonic = ly_car (pitches);
SCM last = tonic;
SCM missing = SCM_EOL;
for (SCM i = pitches; gh_pair_p (i);)
{
- SCM p = gh_car (i);
+ SCM p = ly_car (i);
int step = gh_scm2int (step_scm (tonic, p));
if (unsmob_pitch (last)->notename_i_ == unsmob_pitch (p)->notename_i_)
}
else
{
- i = gh_cdr (i);
+ i = ly_cdr (i);
}
}
{
/* Should we maybe first make sure that PITCH is below tonic? */
if (pitches != SCM_EOL)
- while (Pitch::less_p (pitch, gh_car (pitches)) == SCM_BOOL_T)
+ while (Pitch::less_p (pitch, ly_car (pitches)) == SCM_BOOL_T)
pitch = Pitch::transpose (pitch, Pitch (1, 0, 0).smobbed_copy ());
pitches = gh_cons (pitch, pitches);
Chord::add_below_tonic (SCM pitch, SCM pitches)
{
if (pitches != SCM_EOL)
- while (Pitch::less_p (gh_car (pitches), pitch) == SCM_BOOL_T)
+ while (Pitch::less_p (ly_car (pitches), pitch) == SCM_BOOL_T)
pitch = Pitch::transpose (pitch, Pitch (-1, 0, 0).smobbed_copy ());
return gh_cons (pitch, pitches);
}
{
/* urg: catch dim modifier: 3rd, 5th, 7th, .. should be lowered */
bool dim_b = false;
- for (SCM i = add; gh_pair_p (i); i = gh_cdr (i))
+ for (SCM i = add; gh_pair_p (i); i = ly_cdr (i))
{
- Pitch* p = unsmob_pitch (gh_car (i));
+ Pitch* p = unsmob_pitch (ly_car (i));
/* Ugr
This chord modifier stuff should really be fixed
Cmaj7 yields C 7/7-
SCM pitches = SCM_EOL;
/* Add all that aren't subtracted */
- for (SCM i = add; gh_pair_p (i); i = gh_cdr (i))
+ for (SCM i = add; gh_pair_p (i); i = ly_cdr (i))
{
- SCM p = gh_car (i);
+ SCM p = ly_car (i);
SCM s = member_notename (p, sub);
if (s != SCM_BOOL_F)
sub = scm_delete (s, sub);
}
pitches = scm_sort_list (pitches, Pitch::less_p_proc);
- for (SCM i = sub; gh_pair_p (i); i = gh_cdr (i))
+ for (SCM i = sub; gh_pair_p (i); i = ly_cdr (i))
warning (_f ("invalid subtraction: not part of chord: %s",
- unsmob_pitch (gh_car (i))->str ()));
+ unsmob_pitch (ly_car (i))->str ()));
return pitches;
}
/* Then, delete and add as base note, ie: the inversion */
pitches = scm_delete (s, pitches);
Note_req* n = new Note_req;
- n->set_mus_property ("pitch", gh_car (add_below_tonic (s, pitches)));
+ n->set_mus_property ("pitch", ly_car (add_below_tonic (s, pitches)));
n->set_mus_property ("duration", dur);
n->set_mus_property ("inversion", SCM_BOOL_T);
list = gh_cons (n->self_scm (), list);
if (bass != SCM_EOL)
{
Note_req* n = new Note_req;
- n->set_mus_property ("pitch", gh_car (add_below_tonic (bass, pitches)));
+ n->set_mus_property ("pitch", ly_car (add_below_tonic (bass, pitches)));
n->set_mus_property ("duration", dur);
n->set_mus_property ("bass", SCM_BOOL_T);
list = gh_cons (n->self_scm (), list);
scm_gc_unprotect_object (n->self_scm ());
}
- for (SCM i = pitches; gh_pair_p (i); i = gh_cdr (i))
+ for (SCM i = pitches; gh_pair_p (i); i = ly_cdr (i))
{
Note_req* n = new Note_req;
- n->set_mus_property ("pitch", gh_car (i));
+ n->set_mus_property ("pitch", ly_car (i));
n->set_mus_property ("duration", dur);
list = gh_cons (n->self_scm (), list);
scm_gc_unprotect_object (n->self_scm ());
figure_->get_grob_property ("accidental-alist"));
if (gh_pair_p (alter))
{
- one_fig = gh_list (ly_symbol2scm ("columns"),
+ one_fig = scm_list_n (ly_symbol2scm ("columns"),
one_fig,
- gh_cdr(alter),
+ ly_cdr(alter),
SCM_UNDEFINED);
}
}
SCM
Font_interface::font_alist_chain (Grob *me)
{
- SCM defaults = gh_cdr (scm_assoc (ly_symbol2scm ("font-defaults"),
+ SCM defaults = ly_cdr (scm_assoc (ly_symbol2scm ("font-defaults"),
me->paper_l ()->style_sheet_));
- SCM ch = gh_list (me->mutable_property_alist_,
+ SCM ch = scm_list_n (me->mutable_property_alist_,
me->immutable_property_alist_,
defaults,
SCM_UNDEFINED);
SCM ss = me->paper_l ()->style_sheet_;
- SCM proc = gh_cdr (scm_assoc (ly_symbol2scm ("properties-to-font"),
+ SCM proc = ly_cdr (scm_assoc (ly_symbol2scm ("properties-to-font"),
ss));
- SCM fonts = gh_cdr (scm_assoc (ly_symbol2scm ("fonts"), ss));
+ SCM fonts = ly_cdr (scm_assoc (ly_symbol2scm ("fonts"), ss));
assert (gh_procedure_p (proc));
SCM font_name = gh_call2 (proc, fonts, chain);
SCM sheet = me->paper_l ()->style_sheet_;
- SCM style_alist = gh_cdr (scm_assoc (ly_symbol2scm ("style-alist"), sheet));
+ SCM style_alist = ly_cdr (scm_assoc (ly_symbol2scm ("style-alist"), sheet));
SCM entry = scm_assoc (style, style_alist);
if (gh_pair_p (entry))
{
- chain = gh_cons (gh_cdr (entry), chain);
+ chain = gh_cons (ly_cdr (entry), chain);
}
return chain;
}
series = ly_assoc_chain (series_sym, alist_chain);
if (gh_pair_p (shape))
- shape = gh_cdr (shape);
+ shape = ly_cdr (shape);
if (gh_pair_p (family))
- family = gh_cdr (family);
+ family = ly_cdr (family);
if (gh_pair_p (series))
- series = gh_cdr (series);
+ series = ly_cdr (series);
}
else
- name = gh_cdr (name);
+ name = ly_cdr (name);
if (gh_pair_p (point_sz))
- point_sz = gh_cdr (point_sz);
+ point_sz = ly_cdr (point_sz);
else
{
rel_sz = ly_assoc_chain (rel_sz_sym, alist_chain);
if (gh_pair_p (rel_sz))
- rel_sz = gh_cdr (rel_sz);
+ rel_sz = ly_cdr (rel_sz);
}
- for (SCM s = fonts ; gh_pair_p (s); s = gh_cdr (s))
+ for (SCM s = fonts ; gh_pair_p (s); s = ly_cdr (s))
{
SCM qlist = gh_caar (s);
}
else
{
- if (!wild_compare (gh_car (qlist), rel_sz))
+ if (!wild_compare (ly_car (qlist), rel_sz))
continue;
}
}
warning (_ ("couldn't find any font satisfying "));
- scm_write (gh_list (name, point_sz, shape, series , family, rel_sz, SCM_UNDEFINED), scm_current_error_port ());
+ scm_write (scm_list_n (name, point_sz, shape, series , family, rel_sz, SCM_UNDEFINED), scm_current_error_port ());
scm_flush (scm_current_error_port ());
return ly_str02scm ("cmr10");
SCM meta = get_grob_property ("meta");
SCM ifs = scm_assoc (ly_symbol2scm ("interfaces"), meta);
- set_grob_property ("interfaces",gh_cdr (ifs));
+ set_grob_property ("interfaces",ly_cdr (ifs));
}
{
SCM s = scm_sloppy_assq (sym, mutable_property_alist_);
if (s != SCM_BOOL_F)
- return gh_cdr (s);
+ return ly_cdr (s);
s = scm_sloppy_assq (sym, immutable_property_alist_);
- return (s == SCM_BOOL_F) ? SCM_EOL : gh_cdr (s);
+ return (s == SCM_BOOL_F) ? SCM_EOL : ly_cdr (s);
}
/*
if (gh_pair_p (ext))
{
- Real l = gh_scm2double (gh_car (ext));
- Real r = gh_scm2double (gh_cdr (ext));
+ Real l = gh_scm2double (ly_car (ext));
+ Real r = gh_scm2double (ly_cdr (ext));
return ly_interval2scm (Interval (l, r));
}
status_c_= busy;
- for (SCM d= get_grob_property ("dependencies"); gh_pair_p (d); d = gh_cdr (d))
+ for (SCM d= get_grob_property ("dependencies"); gh_pair_p (d); d = ly_cdr (d))
{
- unsmob_grob (gh_car (d))
+ unsmob_grob (ly_car (d))
->calculate_dependencies (final, busy, funcname);
}
SCM mol = SCM_EOL;
if (gh_procedure_p (proc))
- mol = gh_apply (proc, gh_list (this->self_scm (), SCM_UNDEFINED));
+ mol = gh_apply (proc, scm_list_n (this->self_scm (), SCM_UNDEFINED));
Molecule *m = unsmob_molecule (mol);
// ugr.
mol = Molecule (m->extent_box (),
- gh_list (origin, m->get_expr (), SCM_UNDEFINED)
+ scm_list_n (origin, m->get_expr (), SCM_UNDEFINED)
). smobbed_copy ();
m = unsmob_molecule (mol);
}
else if (gh_pair_p (src))
{
- SCM oldcar =gh_car (src);
+ SCM oldcar =ly_car (src);
/*
UGH! breaks on circular lists.
*/
SCM newcar = handle_broken_grobs (oldcar, criterion);
- SCM oldcdr = gh_cdr (src);
+ SCM oldcdr = ly_cdr (src);
if (newcar == SCM_UNDEFINED
&& (gh_pair_p (oldcdr) || oldcdr == SCM_EOL))
*/
if (gh_pair_p (extra))
{
- ext[BIGGER] += gh_scm2double (gh_cdr (extra));
- ext[SMALLER] += gh_scm2double (gh_car (extra));
+ ext[BIGGER] += gh_scm2double (ly_cdr (extra));
+ ext[SMALLER] += gh_scm2double (ly_car (extra));
}
extra = get_grob_property (a == X_AXIS
: "minimum-extent-Y");
if (gh_pair_p (extra))
{
- ext.unite (Interval (gh_scm2double (gh_car (extra)),
- gh_scm2double (gh_cdr (extra))));
+ ext.unite (Interval (gh_scm2double (ly_car (extra)),
+ gh_scm2double (ly_cdr (extra))));
}
ext.translate (x);
Grob::common_refpoint (SCM elist, Axis a) const
{
Grob * common = (Grob*) this;
- for (; gh_pair_p (elist); elist = gh_cdr (elist))
+ for (; gh_pair_p (elist); elist = ly_cdr (elist))
{
- Grob * s = unsmob_grob (gh_car (elist));
+ Grob * s = unsmob_grob (ly_car (elist));
if (s)
common = common->common_refpoint (s, a);
}
{
SCM meta = get_grob_property ("meta");
SCM nm = scm_assoc (ly_symbol2scm ("name"), meta);
- nm = (gh_pair_p (nm)) ? gh_cdr (nm) : SCM_EOL;
+ nm = (gh_pair_p (nm)) ? ly_cdr (nm) : SCM_EOL;
return gh_string_p (nm) ?ly_scm2string (nm) : classname (this);
}
int
Grob::print_smob (SCM s, SCM port, scm_print_state *)
{
- Grob *sc = (Grob *) gh_cdr (s);
+ Grob *sc = (Grob *) ly_cdr (s);
scm_puts ("#<Grob ", port);
scm_puts ((char *)sc->name ().ch_C (), port);
Lookup::line (XY1, XY2).
*/
- SCM hairpin = gh_list (ly_symbol2scm ("hairpin"),
+ SCM hairpin = scm_list_n (ly_symbol2scm ("hairpin"),
gh_double2scm (thick),
gh_double2scm (width),
gh_double2scm (starth),
#ifndef LILY_GUILE_HH
#define LILY_GUILE_HH
-#include <guile/gh.h>
#include <libguile.h>
+
+/*
+ TODO: the GH interface is deprecated as of GUILE 1.6
+
+ Remove all gh_XXX functions.
+ */
+#include <guile/gh.h>
+
#include "config.h"
/* Guile 1.3.4 compatibility */
bool type_check_assignment (SCM val, SCM sym, SCM type_symbol) ;
SCM ly_number2string (SCM s);
+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_pair_p (SCM x)
+{
+ return scm_pair_p (x);
+}
+inline bool
+ly_symbol_p (SCM x)
+{
+ return SCM_SYMBOLP (x);
+}
+inline bool
+ly_number_p (SCM x)
+{
+ return SCM_NUMBERP (x);
+}
+inline bool
+ly_procedure_p (SCM x)
+{
+ return SCM_NFALSEP (scm_procedure_p(x));
+}
+
/*
display and print newline.
*/
SCM
ly_last (SCM list)
{
- return gh_car (scm_last_pair (list));
+ return ly_car (scm_last_pair (list));
}
SCM
SCM
ly_quote_scm (SCM s)
{
- return gh_list (ly_symbol2scm ("quote"), s, SCM_UNDEFINED);
+ return scm_list_n (ly_symbol2scm ("quote"), s, SCM_UNDEFINED);
}
void
read_lily_scm_file (String fn)
{
- gh_eval_str ((char *) gulp_file_to_string (fn).ch_C ());
+ scm_c_eval_string ((char *) gulp_file_to_string (fn).ch_C ());
}
extern "C" {
index_cell (SCM s, Direction d)
{
assert (d);
- return (d == LEFT) ? gh_car (s) : gh_cdr (s);
+ return (d == LEFT) ? ly_car (s) : ly_cdr (s);
}
SCM
bool
ly_number_pair_p (SCM p)
{
- return gh_pair_p (p) && gh_number_p (gh_car (p)) && gh_number_p (gh_cdr (p));
+ return gh_pair_p (p) && gh_number_p (ly_car (p)) && gh_number_p (ly_cdr (p));
}
bool
Interval
ly_scm2interval (SCM p)
{
- return Interval (gh_scm2double (gh_car (p)),
- gh_scm2double (gh_cdr (p)));
+ return Interval (gh_scm2double (ly_car (p)),
+ gh_scm2double (ly_cdr (p)));
}
SCM
{
SCM newcons = gh_cons (elt, SCM_EOL);
- gh_set_cdr_x (gh_car (l), newcons);
+ gh_set_cdr_x (ly_car (l), newcons);
gh_set_car_x (l, newcons);
}
Offset
ly_scm2offset (SCM s)
{
- return Offset (gh_scm2double (gh_car (s)),
- gh_scm2double (gh_cdr (s)));
+ return Offset (gh_scm2double (ly_car (s)),
+ gh_scm2double (ly_cdr (s)));
}
SCM
ly_version ()
{
char const* vs = "\' (" MAJOR_VERSION " " MINOR_VERSION " " PATCH_LEVEL " " MY_PATCH_LEVEL ")" ;
-
- return gh_eval_str ((char*)vs);
+ return scm_c_eval_string ((char*)vs);
}
static void
{
if (gh_pair_p (l))
{
- return gh_cons (ly_deep_copy (gh_car (l)), ly_deep_copy (gh_cdr (l)));
+ return gh_cons (ly_deep_copy (ly_car (l)), ly_deep_copy (ly_cdr (l)));
}
else
return l;
{
if (gh_pair_p (achain))
{
- SCM handle = scm_assoc (key, gh_car (achain));
+ SCM handle = scm_assoc (key, ly_car (achain));
if (gh_pair_p (handle))
return handle;
else
- return ly_assoc_chain (key, gh_cdr (achain));
+ return ly_assoc_chain (key, ly_cdr (achain));
}
else
return SCM_BOOL_F;
void
fixup_refpoints (SCM s)
{
- for (; gh_pair_p (s); s = gh_cdr (s))
+ for (; gh_pair_p (s); s = ly_cdr (s))
{
- Grob::fixup_refpoint (gh_car (s));
+ Grob::fixup_refpoint (ly_car (s));
}
}
Line_of_score::output_lines ()
{
for (SCM s = get_grob_property ("all-elements");
- gh_pair_p (s); s = gh_cdr (s))
+ gh_pair_p (s); s = ly_cdr (s))
{
- unsmob_grob (gh_car (s))->do_break_processing ();
+ unsmob_grob (ly_car (s))->do_break_processing ();
}
/*
fixups must be done in broken line_of_scores, because new elements
{
Grob *se = broken_into_l_arr_[i];
SCM all = se->get_grob_property ("all-elements");
- for (SCM s = all; gh_pair_p (s); s = gh_cdr (s))
+ for (SCM s = all; gh_pair_p (s); s = ly_cdr (s))
{
- fixup_refpoint (gh_car (s));
+ fixup_refpoint (ly_car (s));
}
count += scm_ilength (all);
}
for (SCM s = get_grob_property ("all-elements");
- gh_pair_p (s); s = gh_cdr (s))
+ gh_pair_p (s); s = ly_cdr (s))
{
- unsmob_grob (gh_car (s))->handle_broken_dependencies ();
+ unsmob_grob (ly_car (s))->handle_broken_dependencies ();
}
handle_broken_dependencies ();
if (i < broken_into_l_arr_.size () - 1)
{
- SCM lastcol = gh_car (line_l->get_grob_property ("columns"));
+ SCM lastcol = ly_car (line_l->get_grob_property ("columns"));
Grob* e = unsmob_grob (lastcol);
SCM inter = e->get_grob_property ("between-system-string");
if (gh_string_p (inter))
if (!left)
{
- left = dynamic_cast<Item*> (unsmob_grob (gh_car (between)));
+ left = dynamic_cast<Item*> (unsmob_grob (ly_car (between)));
left = left->column_l ();
}
divide_over ++;
- loose = dynamic_cast<Item*> (unsmob_grob (gh_cdr (between)));
+ loose = dynamic_cast<Item*> (unsmob_grob (ly_cdr (between)));
loose = loose->column_l ();
}
thiscol->translate_axis (lx + j*(rx - lx)/divide_over, X_AXIS);
j ++;
- loose = dynamic_cast<Item*> (unsmob_grob (gh_cdr (between)));
+ loose = dynamic_cast<Item*> (unsmob_grob (ly_cdr (between)));
}
}
if (!gh_pair_p (expr))
return;
- SCM head =gh_car (expr);
+ SCM head =ly_car (expr);
if (unsmob_input (head))
{
Input * ip = unsmob_input (head);
- pscore_l_->outputter_l_->output_scheme (gh_list (define_origin_sym,
+ pscore_l_->outputter_l_->output_scheme (scm_list_n (define_origin_sym,
ly_str02scm (ip->file_str ().ch_C ()),
gh_int2scm (ip->line_number ()),
gh_int2scm (ip->column_number ()),
}
else if (head == no_origin_sym)
{
- pscore_l_->outputter_l_->output_scheme (gh_list (no_origin_sym, SCM_UNDEFINED));
+ pscore_l_->outputter_l_->output_scheme (scm_list_n (no_origin_sym, SCM_UNDEFINED));
expr = gh_cadr (expr);
}
else if (head == offset_sym)
else
{
pscore_l_->outputter_l_->
- output_scheme (gh_list (placebox_sym,
+ output_scheme (scm_list_n (placebox_sym,
gh_double2scm (o[X_AXIS]),
gh_double2scm (o[Y_AXIS]),
expr,
{
Grob *me = this;
SCM cs = me->get_grob_property ("columns");
- Grob * prev = gh_pair_p (cs) ? unsmob_grob (gh_car (cs)) : 0;
+ Grob * prev = gh_pair_p (cs) ? unsmob_grob (ly_car (cs)) : 0;
p->rank_i_ = prev ? Paper_column::rank_i (prev) + 1 : 0;
void
Line_of_score::pre_processing ()
{
- for (SCM s = get_grob_property ("all-elements"); gh_pair_p (s); s = gh_cdr (s))
- unsmob_grob (gh_car (s))->discretionary_processing ();
+ for (SCM s = get_grob_property ("all-elements"); gh_pair_p (s); s = ly_cdr (s))
+ unsmob_grob (ly_car (s))->discretionary_processing ();
if (verbose_global_b)
progress_indication (_f ("Element count %d ", element_count ()));
- for (SCM s = get_grob_property ("all-elements"); gh_pair_p (s); s = gh_cdr (s))
- unsmob_grob (gh_car (s))->handle_prebroken_dependencies ();
+ for (SCM s = get_grob_property ("all-elements"); gh_pair_p (s); s = ly_cdr (s))
+ unsmob_grob (ly_car (s))->handle_prebroken_dependencies ();
fixup_refpoints (get_grob_property ("all-elements"));
- for (SCM s = get_grob_property ("all-elements"); gh_pair_p (s); s = gh_cdr (s))
+ for (SCM s = get_grob_property ("all-elements"); gh_pair_p (s); s = ly_cdr (s))
{
- Grob* sc = unsmob_grob (gh_car (s));
+ Grob* sc = unsmob_grob (ly_car (s));
sc->calculate_dependencies (PRECALCED, PRECALCING, ly_symbol2scm ("before-line-breaking-callback"));
}
progress_indication ("\n" + _ ("Calculating column positions...") + " ");
- for (SCM s = get_grob_property ("all-elements"); gh_pair_p (s); s = gh_cdr (s))
+ for (SCM s = get_grob_property ("all-elements"); gh_pair_p (s); s = ly_cdr (s))
{
- Grob * e = unsmob_grob (gh_car (s));
+ Grob * e = unsmob_grob (ly_car (s));
SCM proc = e->get_grob_property ("spacing-procedure");
if (gh_procedure_p (proc))
gh_call1 (proc, e->self_scm ());
Line_of_score::post_processing (bool last_line)
{
for (SCM s = get_grob_property ("all-elements");
- gh_pair_p (s); s = gh_cdr (s))
+ gh_pair_p (s); s = ly_cdr (s))
{
- Grob* sc = unsmob_grob (gh_car (s));
+ Grob* sc = unsmob_grob (ly_car (s));
sc->calculate_dependencies (POSTCALCED, POSTCALCING,
ly_symbol2scm ("after-line-breaking-callback"));
}
generate all molecules to trigger all font loads.
(ugh. This is not very memory efficient.) */
- for (SCM s = get_grob_property ("all-elements"); gh_pair_p (s); s = gh_cdr (s))
+ for (SCM s = get_grob_property ("all-elements"); gh_pair_p (s); s = ly_cdr (s))
{
- unsmob_grob (gh_car (s))->get_molecule ();
+ unsmob_grob (ly_car (s))->get_molecule ();
}
/*
font defs;
*/
SCM font_names = ly_quote_scm (paper_l ()->font_descriptions ());
- output_scheme (gh_list (ly_symbol2scm ("define-fonts"),
+ output_scheme (scm_list_n (ly_symbol2scm ("define-fonts"),
font_names,
SCM_UNDEFINED));
/*
line preamble.
*/
- output_scheme (gh_list (ly_symbol2scm ("start-line"),
+ output_scheme (scm_list_n (ly_symbol2scm ("start-line"),
gh_double2scm (height),
SCM_UNDEFINED));
The default layer is 1. */
for (int i = 0; i < 3; i++)
for (SCM s = get_grob_property ("all-elements"); gh_pair_p (s);
- s = gh_cdr (s))
+ s = ly_cdr (s))
{
- Grob *sc = unsmob_grob (gh_car (s));
+ Grob *sc = unsmob_grob (ly_car (s));
Molecule *m = sc->get_molecule ();
if (!m)
continue;
SCM e = sc->get_grob_property ("extra-offset");
if (gh_pair_p (e))
{
- o[X_AXIS] += gh_scm2double (gh_car (e));
- o[Y_AXIS] += gh_scm2double (gh_cdr (e));
+ o[X_AXIS] += gh_scm2double (ly_car (e));
+ o[Y_AXIS] += gh_scm2double (ly_cdr (e));
}
output_molecule (m->get_expr (), o);
if (last_line)
{
- output_scheme (gh_list (ly_symbol2scm ("stop-last-line"), SCM_UNDEFINED));
+ output_scheme (scm_list_n (ly_symbol2scm ("stop-last-line"), SCM_UNDEFINED));
}
else
{
- output_scheme (gh_list (ly_symbol2scm ("stop-line"), SCM_UNDEFINED));
+ output_scheme (scm_list_n (ly_symbol2scm ("stop-line"), SCM_UNDEFINED));
}
}
r = r->column_l ();
SCM s = get_grob_property ("columns");
- while (gh_pair_p (s) && gh_car (s) != r->self_scm ())
- s = gh_cdr (s);
+ while (gh_pair_p (s) && ly_car (s) != r->self_scm ())
+ s = ly_cdr (s);
if (gh_pair_p (s))
- s = gh_cdr (s);
+ s = ly_cdr (s);
- while (gh_pair_p (s) && gh_car (s) != l->self_scm ())
+ while (gh_pair_p (s) && ly_car (s) != l->self_scm ())
{
- Paper_column*c = dynamic_cast<Paper_column*> (unsmob_grob (gh_car (s)));
+ Paper_column*c = dynamic_cast<Paper_column*> (unsmob_grob (ly_car (s)));
if (Item::breakable_b (c) && !c->line_l_)
ret.push (c);
- s = gh_cdr (s);
+ s = ly_cdr (s);
}
ret.reverse ();
Real on = length - thick;
Real off = period - on;
- SCM list = gh_list (ly_symbol2scm ("dashed-line"),
+ SCM list = scm_list_n (ly_symbol2scm ("dashed-line"),
gh_double2scm (thick),
gh_double2scm (on),
gh_double2scm (off),
&& type == ly_symbol2scm ("trill"))
{
SCM alist_chain = Font_interface::font_alist_chain (me);
- SCM style_chain = gh_list (gh_cons (ly_symbol2scm ("font-family"),
+ SCM style_chain = scm_list_n (gh_cons (ly_symbol2scm ("font-family"),
ly_symbol2scm ("music")),
SCM_UNDEFINED);
Font_metric *fm = Font_interface::get_font (me,
- gh_list (style_chain,
+ scm_list_n (style_chain,
alist_chain,
SCM_UNDEFINED));
Molecule m = fm->find_by_name ("scripts-trill-element");
static SCM
pitch_less (SCM p1, SCM p2)
{
- return Pitch::less_p (gh_car (p1), gh_car (p2));
+ return Pitch::less_p (ly_car (p1), ly_car (p2));
}
static SCM pitch_less_proc;
SCM accs = me->get_grob_property ("accidentals");
for (SCM s = accs;
- gh_pair_p (s); s = gh_cdr (s))
+ gh_pair_p (s); s = ly_cdr (s))
{
SCM opts = gh_cdar (s);
if (!sp->original_l_)
{
/* there should be a better way to delete part of me */
- scm_set_car_x (s, gh_list (gh_caar (s),
+ scm_set_car_x (s, scm_list_n (gh_caar (s),
ly_symbol2scm ("deleted"),
SCM_UNDEFINED));
me->set_grob_property ("molecule", SCM_EOL);
SCM accs = me->get_grob_property ("accidentals");
for (SCM s = accs;
- gh_pair_p (s); s = gh_cdr (s))
+ gh_pair_p (s); s = ly_cdr (s))
{
Pitch p (*unsmob_pitch (gh_caar (s)));
SCM opts = gh_cdar (s);
Interval (min_y, max_y));
- SCM at = gh_list (ly_symbol2scm ("beam"),
+ SCM at = scm_list_n (ly_symbol2scm ("beam"),
gh_double2scm (width),
gh_double2scm (slope),
gh_double2scm (thick),
l = gh_cons (ly_offset2scm (b.control_[i]), l);
}
- SCM at = (gh_list (ly_symbol2scm ("dashed-slur"),
+ SCM at = (scm_list_n (ly_symbol2scm ("dashed-slur"),
gh_double2scm (thick),
gh_double2scm (dash),
ly_quote_scm (l),
Molecule
Lookup::filledbox (Box b)
{
- SCM at = (gh_list (ly_symbol2scm ("filledbox"),
+ SCM at = (scm_list_n (ly_symbol2scm ("filledbox"),
gh_double2scm (-b[X_AXIS][LEFT]),
gh_double2scm (b[X_AXIS][RIGHT]),
gh_double2scm (-b[Y_AXIS][DOWN]),
}
- SCM at = (gh_list (ly_symbol2scm ("bezier-sandwich"),
+ SCM at = (scm_list_n (ly_symbol2scm ("bezier-sandwich"),
ly_quote_scm (list),
gh_double2scm (linethick),
SCM_UNDEFINED));
Lookup::accordion (SCM s, Real staff_space, Font_metric *fm)
{
Molecule m;
- String sym = ly_scm2string (gh_car (s));
- String reg = ly_scm2string (gh_car (gh_cdr (s)));
+ String sym = ly_scm2string (ly_car (s));
+ String reg = ly_scm2string (ly_car (ly_cdr (s)));
if (sym == "Discant")
{
SCM wid = gh_double2scm (w);
SCM sl = gh_double2scm (s);
SCM thick = gh_double2scm (t);
- SCM slashnodot = gh_list (ly_symbol2scm ("repeat-slash"),
+ SCM slashnodot = scm_list_n (ly_symbol2scm ("repeat-slash"),
wid, sl, thick, SCM_UNDEFINED);
Box b (Interval (0, w + sqrt (sqr(t/s) + sqr (t))),
incr (a);
}
- expr_ = gh_list (ly_symbol2scm ("translate-molecule"),
+ expr_ = scm_list_n (ly_symbol2scm ("translate-molecule"),
ly_offset2scm (o),
expr_, SCM_UNDEFINED);
if (!empty_b ())
void
Molecule::add_molecule (Molecule const &m)
{
- expr_ = gh_list (ly_symbol2scm ("combine-molecule"),
+ expr_ = scm_list_n (ly_symbol2scm ("combine-molecule"),
m.expr_,
expr_, SCM_UNDEFINED);
dim_.unite (m.dim_);
if (f == SCM_EOL)
return f;
else
- return gh_list (ly_symbol2scm ("fontify"),
+ return scm_list_n (ly_symbol2scm ("fontify"),
ly_quote_scm (met->description_), f, SCM_UNDEFINED);
}
int
Molecule::print_smob (SCM s, SCM port, scm_print_state *)
{
- Molecule *r = (Molecule *) gh_cdr (s);
+ Molecule *r = (Molecule *) ly_cdr (s);
scm_puts ("#<Molecule ", port);
/* String str (r->str ());
SCM
Molecule::mark_smob (SCM s)
{
- Molecule *r = (Molecule *) gh_cdr (s);
+ Molecule *r = (Molecule *) ly_cdr (s);
return r->expr_;
}
UGH: use grob-property.
*/
Molecule out = Font_interface::get_default_font (me)->find_by_name (String ("noteheads-") +
- ly_scm2string (scm_primitive_eval (gh_list (ly_symbol2scm ("find-notehead-symbol"),
+ ly_scm2string (scm_primitive_eval (scm_list_n (ly_symbol2scm ("find-notehead-symbol"),
me->get_grob_property ("duration-log"),
ly_quote_scm (style),
SCM_UNDEFINED))));
int l = gh_scm2int (me->get_grob_property ("duration-log"));
int b = (l >= 2);
- SCM at = gh_list (ly_symbol2scm ("ez-ball"),
+ SCM at = scm_list_n (ly_symbol2scm ("ez-ball"),
me->get_grob_property ("note-character"),
gh_int2scm (b),
gh_int2scm (1-b),
return 0.0;
SCM st = me->get_grob_property ("style");
- SCM result = gh_apply (v, gh_list (st, SCM_UNDEFINED));
+ SCM result = gh_apply (v, scm_list_n (st, SCM_UNDEFINED));
if (!gh_pair_p (result))
return 0.0;
- result = (a == X_AXIS) ? gh_car (result) : gh_cdr (result);
+ result = (a == X_AXIS) ? ly_car (result) : ly_cdr (result);
return gh_number_p (result) ? gh_scm2double (result) : 0.0;
}
should typecheck pred.
*/
SCM result=gh_apply (pred,
- gh_list (inf.elem_l_->self_scm (), SCM_UNDEFINED));
+ scm_list_n (inf.elem_l_->self_scm (), SCM_UNDEFINED));
if (to_boolean (result))
{
SCM sym = o->get_mus_property ("grob-property");
gh_define ("security-paranoia", SCM_BOOL_T);
}
- SCM exp = gh_list (ly_symbol2scm ((output_format_global + "-scm").ch_C ()),
+ SCM exp = scm_list_n (ly_symbol2scm ((output_format_global + "-scm").ch_C ()),
ly_quote_scm (ly_symbol2scm ("all-definitions")),
SCM_UNDEFINED);
exp = scm_primitive_eval (exp);
generate = generate + to_str (' ' * (120 - generate.length_i ())>? 0) ;
SCM args_scm =
- gh_list (ly_str02scm (creator.ch_l ()),
+ scm_list_n (ly_str02scm (creator.ch_l ()),
ly_str02scm (generate.ch_l ()), SCM_UNDEFINED);
void
Paper_outputter::output_comment (String str)
{
- output_scheme (gh_list (ly_symbol2scm ("comment"),
+ output_scheme (scm_list_n (ly_symbol2scm ("comment"),
ly_str02scm ((char*)str.ch_C ()),
SCM_UNDEFINED)
);
Paper_outputter::output_scope (Scope *scope, String prefix)
{
SCM al = scope->to_alist ();
- for (SCM s = al ; gh_pair_p (s); s = gh_cdr (s))
+ for (SCM s = al ; gh_pair_p (s); s = ly_cdr (s))
{
SCM k = gh_caar (s);
SCM v = gh_cdar (s);
Paper_outputter::output_Real_def (String k, Real v)
{
- SCM scm = gh_list (ly_symbol2scm ("lily-def"),
+ SCM scm = scm_list_n (ly_symbol2scm ("lily-def"),
ly_str02scm (k.ch_l ()),
ly_str02scm (to_str (v).ch_l ()),
SCM_UNDEFINED);
Paper_outputter::output_String_def (String k, String v)
{
- SCM scm = gh_list (ly_symbol2scm ("lily-def"),
+ SCM scm = scm_list_n (ly_symbol2scm ("lily-def"),
ly_str02scm (k.ch_l ()),
ly_str02scm (v.ch_l ()),
SCM_UNDEFINED);
void
Paper_outputter::output_int_def (String k, int v)
{
- SCM scm = gh_list (ly_symbol2scm ("lily-def"),
+ SCM scm = scm_list_n (ly_symbol2scm ("lily-def"),
ly_str02scm (k.ch_l ()),
ly_str02scm (to_str (v).ch_l ()),
SCM_UNDEFINED);
/* Only write header field to file if it exists */
if (gh_pair_p (val))
{
- s = ly_scm2string (gh_cdr (val));
+ s = ly_scm2string (ly_cdr (val));
/* Always write header field file, even if string is empty ... */
write_header_field_to_file (basename_, key, s);
}
if (paper_l_->scope_p_)
outputter_l_->output_scope (paper_l_->scope_p_, "lilypondpaper");
- SCM scm = gh_list (ly_symbol2scm ("header-end"), SCM_UNDEFINED);
+ SCM scm = scm_list_n (ly_symbol2scm ("header-end"), SCM_UNDEFINED);
outputter_l_->output_scheme (scm);
line_l_->output_lines ();
- scm = gh_list (ly_symbol2scm ("end-output"), SCM_UNDEFINED);
+ scm = scm_list_n (ly_symbol2scm ("end-output"), SCM_UNDEFINED);
outputter_l_->output_scheme (scm);
progress_indication ("\n");
void
set_music_properties (Music *p, SCM a)
{
- for (SCM k = a; gh_pair_p (k); k = gh_cdr (k))
+ for (SCM k = a; gh_pair_p (k); k = ly_cdr (k))
{
p->set_mus_property (gh_caar (k), gh_cdar (k));
}
int i = scm_ilength ($1);
SCM tab = scm_make_vector (gh_int2scm (i), SCM_EOL);
- for (SCM s = $1; gh_pair_p (s); s = gh_cdr (s)) {
+ for (SCM s = $1; gh_pair_p (s); s = ly_cdr (s)) {
SCM pt = gh_cdar (s);
if (!unsmob_pitch (pt))
THIS->parser_error ("Need pitch object.");
td->type_aliases_ = gh_cons ($3, td->type_aliases_);
}
| translator_spec_body ELEMENTDESCRIPTIONS embedded_scm {
- for (SCM p = $3; gh_pair_p (p); p = gh_cdr (p))
+ for (SCM p = $3; gh_pair_p (p); p = ly_cdr (p))
unsmob_translator_def ($$)
->add_property_assign (scm_symbol_to_string (gh_caar (p)), gh_cdar (p));
SCM s = $$;
SCM c = gh_cons ($2->self_scm (), SCM_EOL);
scm_gc_unprotect_object ($2->self_scm ()); /* UGH */
- if (gh_pair_p (gh_cdr (s)))
- gh_set_cdr_x (gh_cdr (s), c); /* append */
+ if (gh_pair_p (ly_cdr (s)))
+ gh_set_cdr_x (ly_cdr (s), c); /* append */
else
gh_set_car_x (s, c); /* set first cons */
gh_set_cdr_x (s, c) ; /* remember last cell */
Music_sequence: '{' Music_list '}' {
$$ = new Music_sequence (SCM_EOL);
- $$->set_mus_property ("elements", gh_car ($2));
+ $$->set_mus_property ("elements", ly_car ($2));
}
;
Sequential_music:
SEQUENTIAL '{' Music_list '}' {
$$ = new Sequential_music (SCM_EOL);
- $$->set_mus_property ("elements", gh_car ($3));
+ $$->set_mus_property ("elements", ly_car ($3));
}
| '{' Music_list '}' {
$$ = new Sequential_music (SCM_EOL);
- $$->set_mus_property ("elements", gh_car ($2));
+ $$->set_mus_property ("elements", ly_car ($2));
}
;
Simultaneous_music:
SIMULTANEOUS '{' Music_list '}'{
$$ = new Simultaneous_music (SCM_EOL);
- $$->set_mus_property ("elements", gh_car ($3));
+ $$->set_mus_property ("elements", ly_car ($3));
}
| '<' Music_list '>' {
$$ = new Simultaneous_music (SCM_EOL);
- $$->set_mus_property ("elements", gh_car ($2));
+ $$->set_mus_property ("elements", ly_car ($2));
}
;
fraction Music
{
- int n = gh_scm2int (gh_car ($3)); int d = gh_scm2int (gh_cdr ($3));
+ int n = gh_scm2int (ly_car ($3)); int d = gh_scm2int (ly_cdr ($3));
Music *mp = $4;
$$ = new Time_scaled_music (SCM_EOL);
$$->set_spot (THIS->pop_spot ());
SCM result = gh_call1 (func, $2);
SCM l = SCM_EOL;
- for (SCM s = result ; gh_pair_p (s); s = gh_cdr (s)) {
+ for (SCM s = result ; gh_pair_p (s); s = ly_cdr (s)) {
Music * p = new Music (SCM_EOL);
- set_music_properties (p, gh_car (s));
+ set_music_properties (p, ly_car (s));
l = gh_cons (p->self_scm (), l);
scm_gc_unprotect_object (p->self_scm ());
}
| TIME_T fraction {
Music * p1 = set_property_music (ly_symbol2scm ( "timeSignatureFraction"), $2);
- int l = gh_scm2int (gh_car ($2));
- int o = gh_scm2int (gh_cdr ($2));
+ int l = gh_scm2int (ly_car ($2));
+ int o = gh_scm2int (ly_cdr ($2));
Moment one_beat = Moment (1)/Moment (o);
Moment len = Moment (l) * one_beat;
Music *p2 = set_property_music (ly_symbol2scm ("measureLength"), len.smobbed_copy ());
Music *p3 = set_property_music (ly_symbol2scm ("beatLength"), one_beat.smobbed_copy ());
- SCM list = gh_list (p1->self_scm (), p2->self_scm (), p3->self_scm(), SCM_UNDEFINED);
+ SCM list = scm_list_n (p1->self_scm (), p2->self_scm (), p3->self_scm(), SCM_UNDEFINED);
Sequential_music *seq = new Sequential_music (SCM_EOL);
seq->set_mus_property ("elements", list);
$$ = unsmob_duration ($$)->compressed ( $3) .smobbed_copy ();
}
| multiplied_duration '*' FRACTION {
- Rational m (gh_scm2int (gh_car ($3)), gh_scm2int (gh_cdr ($3)));
+ Rational m (gh_scm2int (ly_car ($3)), gh_scm2int (ly_cdr ($3)));
$$ = unsmob_duration ($$)->compressed (m).smobbed_copy ();
}
n->set_mus_property ("force-accidental", SCM_BOOL_T);
Simultaneous_music*v = new Request_chord (SCM_EOL);
- v->set_mus_property ("elements", gh_list (n->self_scm (), SCM_UNDEFINED));
+ v->set_mus_property ("elements", scm_list_n (n->self_scm (), SCM_UNDEFINED));
v->set_spot (i);
n->set_spot (i);
Music * m = unsmob_music ($1);
Input i = THIS->pop_spot ();
m->set_spot (i);
- for (SCM s = m->get_mus_property ("elements"); gh_pair_p (s); s = gh_cdr (s))
+ for (SCM s = m->get_mus_property ("elements"); gh_pair_p (s); s = ly_cdr (s))
{
- unsmob_music (gh_car (s))->set_mus_property ("duration", $2);
+ unsmob_music (ly_car (s))->set_mus_property ("duration", $2);
}
$$ = m;
}
e = rest_req_p->self_scm ();
}
Simultaneous_music* velt_p = new Request_chord (SCM_EOL);
- velt_p-> set_mus_property ("elements", gh_list (e,SCM_UNDEFINED));
+ velt_p-> set_mus_property ("elements", scm_list_n (e,SCM_UNDEFINED));
velt_p->set_spot (i);
$$ = velt_p;
sp2->set_mus_property ("span-type", r);
Request_chord * rqc1 = new Request_chord (SCM_EOL);
- rqc1->set_mus_property ("elements", gh_list (sp1->self_scm (), SCM_UNDEFINED));
+ rqc1->set_mus_property ("elements", scm_list_n (sp1->self_scm (), SCM_UNDEFINED));
Request_chord * rqc2 = new Request_chord (SCM_EOL);
- rqc2->set_mus_property ("elements", gh_list (sk->self_scm (), SCM_UNDEFINED));;
+ rqc2->set_mus_property ("elements", scm_list_n (sk->self_scm (), SCM_UNDEFINED));;
Request_chord * rqc3 = new Request_chord (SCM_EOL);
- rqc3->set_mus_property ("elements", gh_list (sp2->self_scm (), SCM_UNDEFINED));;
+ rqc3->set_mus_property ("elements", scm_list_n (sp2->self_scm (), SCM_UNDEFINED));;
- SCM ms = gh_list (rqc1->self_scm (), rqc2->self_scm (), rqc3->self_scm (), SCM_UNDEFINED);
+ SCM ms = scm_list_n (rqc1->self_scm (), rqc2->self_scm (), rqc3->self_scm (), SCM_UNDEFINED);
$$ = new Sequential_music (SCM_EOL);
$$->set_mus_property ("elements", ms);
lreq_p->set_mus_property ("duration",$2);
lreq_p->set_spot (i);
Simultaneous_music* velt_p = new Request_chord (SCM_EOL);
- velt_p->set_mus_property ("elements", gh_list (lreq_p->self_scm (), SCM_UNDEFINED));
+ velt_p->set_mus_property ("elements", scm_list_n (lreq_p->self_scm (), SCM_UNDEFINED));
$$= velt_p;
}
$$ = gh_cons (unsmob_pitch ($1)->smobbed_copy (), SCM_EOL);
}
| CHORDMODIFIER_PITCH chord_note { /* Ugh. */
- $$ = gh_list (unsmob_pitch ($1)->smobbed_copy (),
+ $$ = scm_list_n (unsmob_pitch ($1)->smobbed_copy (),
$2, SCM_UNDEFINED);
}
;
SCM width_scm = gh_double2scm (width);
SCM slope_scm = gh_double2scm (slope);
SCM thickness_scm = gh_double2scm (thickness);
- SCM horizontal_slope = gh_list (ly_symbol2scm ("beam"),
+ SCM horizontal_slope = scm_list_n (ly_symbol2scm ("beam"),
width_scm, slope_scm,
thickness_scm, SCM_UNDEFINED);
Box b (Interval (0, width),
UGH.
*/
- return unsmob_grob (gh_car (me->get_grob_property ("heads")));
+ return unsmob_grob (ly_car (me->get_grob_property ("heads")));
}
else
return first_head (me);
Drul_array<Grob *> exthead;
exthead[LEFT] = exthead[RIGHT] =0;
- for (SCM s = me->get_grob_property ("heads"); gh_pair_p (s); s = gh_cdr (s))
+ for (SCM s = me->get_grob_property ("heads"); gh_pair_p (s); s = ly_cdr (s))
{
- Grob * n = unsmob_grob (gh_car (s));
+ Grob * n = unsmob_grob (ly_car (s));
int p = int (Staff_symbol_referencer::position_f (n));
Stem::note_head_positions (Grob *me)
{
Array<int> ps ;
- for (SCM s = me->get_grob_property ("heads"); gh_pair_p (s); s = gh_cdr (s))
+ for (SCM s = me->get_grob_property ("heads"); gh_pair_p (s); s = ly_cdr (s))
{
- Grob * n = unsmob_grob (gh_car (s));
+ Grob * n = unsmob_grob (ly_car (s));
int p = int (Staff_symbol_referencer::position_f (n));
ps.push (p);
else
{
s = me->get_grob_property ("lengths");
- for (SCM q = s; q != SCM_EOL; q = gh_cdr (q))
- a.push (gh_scm2double (gh_car (q)));
+ for (SCM q = s; q != SCM_EOL; q = ly_cdr (q))
+ a.push (gh_scm2double (ly_car (q)));
// stem uses half-spaces
length_f = a[ ((flag_i (me) - 2) >? 0) <? (a.size () - 1)] * 2;
a.clear ();
s = me->get_grob_property ("stem-shorten");
- for (SCM q = s; gh_pair_p (q); q = gh_cdr (q))
- a.push (gh_scm2double (gh_car (q)));
+ for (SCM q = s; gh_pair_p (q); q = ly_cdr (q))
+ a.push (gh_scm2double (ly_car (q)));
// stem uses half-spaces
- // fixme: use gh_list_ref () iso. array[]
+ // fixme: use scm_list_n_ref () iso. array[]
Real shorten_f = a[ ((flag_i (me) - 2) >? 0) <? (a.size () - 1)] * 2;
/* URGURGURG
s = me->get_grob_property ("beamed-minimum-lengths");
a.clear ();
- for (SCM q = s; q != SCM_EOL; q = gh_cdr (q))
- a.push (gh_scm2double (gh_car (q)));
+ for (SCM q = s; q != SCM_EOL; q = ly_cdr (q))
+ a.push (gh_scm2double (ly_car (q)));
Real minimum_length = a[multiplicity <? (a.size () - 1)] * staff_space;
s = me->get_grob_property ("beamed-lengths");
a.clear ();
- for (SCM q = s; q != SCM_EOL; q = gh_cdr (q))
- a.push (gh_scm2double (gh_car (q)));
+ for (SCM q = s; q != SCM_EOL; q = ly_cdr (q))
+ a.push (gh_scm2double (ly_car (q)));
Real stem_length = a[multiplicity <? (a.size () - 1)] * staff_space;
{
Real arc_height = gh_scm2double (me->get_grob_property ("arch-height")) ;
- SCM at = gh_list (ly_symbol2scm ("bracket"),
+ SCM at = scm_list_n (ly_symbol2scm ("bracket"),
me->get_grob_property ("arch-angle"),
me->get_grob_property ("arch-width"),
gh_double2scm (arc_height),
name. This is better than using find_font directly,
esp. because that triggers mktextfm for non-existent
fonts. */
- SCM alist = gh_list (gh_cons (ly_symbol2scm ("font-family"),
+ SCM alist = scm_list_n (gh_cons (ly_symbol2scm ("font-family"),
ly_symbol2scm ("braces")),
gh_cons (ly_symbol2scm ("font-relative-size"),
gh_int2scm (i)),
SCM_UNDEFINED);
- fm = Font_interface::get_font (me, gh_list (alist, SCM_UNDEFINED));
+ fm = Font_interface::get_font (me, scm_list_n (alist, SCM_UNDEFINED));
/* Hmm, if lookup fails, we get cmr10 anyway */
- if (ly_scm2string (gh_car (fm->description_)) == "cmr10")
+ if (ly_scm2string (ly_car (fm->description_)) == "cmr10")
break;
}
else
}
while (hi - lo > 1);
- SCM at = gh_list (ly_symbol2scm ("char"), gh_int2scm (lo), SCM_UNDEFINED);
+ SCM at = scm_list_n (ly_symbol2scm ("char"), gh_int2scm (lo), SCM_UNDEFINED);
at = fontify_atom (fm, at);
b = fm->get_char (lo);
else if (gh_pair_p (text))
{
/* urg, why not just do this in markup_text2molecule ? */
- if (gh_string_p (gh_car (text)))
+ if (gh_string_p (ly_car (text)))
return markup_text2molecule (me,
- gh_append2 (gh_list (SCM_EOL,
+ gh_append2 (scm_list_n (SCM_EOL,
SCM_UNDEFINED),
text),
alist_chain);
#'(("foo"))
*/
else if (scm_ilength (text) <= 1)
- return text2molecule (me, gh_car (text), alist_chain);
+ return text2molecule (me, ly_car (text), alist_chain);
else
return markup_text2molecule (me, text, alist_chain);
}
{
SCM style = ly_assoc_chain (ly_symbol2scm ("font-style"),
alist_chain);
- if (gh_pair_p (style) && gh_symbol_p (gh_cdr (style)))
- alist_chain = Font_interface::add_style (me, gh_cdr (style), alist_chain);
+ if (gh_pair_p (style) && gh_symbol_p (ly_cdr (style)))
+ alist_chain = Font_interface::add_style (me, ly_cdr (style), alist_chain);
Font_metric *fm = Font_interface::get_font (me, alist_chain);
SCM lookup = ly_assoc_chain (ly_symbol2scm ("lookup"), alist_chain);
Molecule mol;
- if (gh_pair_p (lookup) && gh_cdr (lookup) ==ly_symbol2scm ("name"))
+ if (gh_pair_p (lookup) && ly_cdr (lookup) ==ly_symbol2scm ("name"))
mol = lookup_character (me, fm, text);
else
mol = lookup_text (me, fm, text);
#endif
- SCM list = gh_list (ly_symbol2scm ("text"), text, SCM_UNDEFINED);
+ SCM list = scm_list_n (ly_symbol2scm ("text"), text, SCM_UNDEFINED);
list = fontify_atom (fm, list);
return Molecule (fm->text_dimension (ly_scm2string (text)), list);
SCM alist_chain)
{
SCM sheet = me->paper_l ()->style_sheet_;
- SCM f = gh_cdr (scm_assoc (ly_symbol2scm ("markup-to-properties"), sheet));
+ SCM f = ly_cdr (scm_assoc (ly_symbol2scm ("markup-to-properties"), sheet));
- SCM markup = gh_car (markup_text);
- SCM text = gh_cdr (markup_text);
+ SCM markup = ly_car (markup_text);
+ SCM text = ly_cdr (markup_text);
SCM p = gh_cons (gh_call2 (f, sheet, markup), alist_chain);
Axis axis = X_AXIS;
SCM a = ly_assoc_chain (ly_symbol2scm ("axis"), p);
- if (gh_pair_p (a) && isaxis_b (gh_cdr (a)))
- axis = (Axis)gh_scm2int (gh_cdr (a));
+ if (gh_pair_p (a) && isaxis_b (ly_cdr (a)))
+ axis = (Axis)gh_scm2int (ly_cdr (a));
Real baseline_skip = 0;
SCM b = ly_assoc_chain (ly_symbol2scm ("baseline-skip"), p);
- if (gh_pair_p (b) && gh_number_p (gh_cdr (b)))
- baseline_skip = gh_scm2double (gh_cdr (b)) * staff_space;
+ if (gh_pair_p (b) && gh_number_p (ly_cdr (b)))
+ baseline_skip = gh_scm2double (ly_cdr (b)) * staff_space;
Real kern[2] = {0,0};
SCM k = ly_assoc_chain (ly_symbol2scm ("kern"), p);
- if (gh_pair_p (k) && gh_number_p (gh_cdr (k)))
- kern[axis] = gh_scm2double (gh_cdr (k)) * staff_space;
+ if (gh_pair_p (k) && gh_number_p (ly_cdr (k)))
+ kern[axis] = gh_scm2double (ly_cdr (k)) * staff_space;
Real raise = 0;
SCM r = ly_assoc_chain (ly_symbol2scm ("raise"), p);
- if (gh_pair_p (r) && gh_number_p (gh_cdr (r)))
- raise = gh_scm2double (gh_cdr (r)) * staff_space;
+ if (gh_pair_p (r) && gh_number_p (ly_cdr (r)))
+ raise = gh_scm2double (ly_cdr (r)) * staff_space;
Interval extent;
bool extent_b = false;
SCM e = ly_assoc_chain (ly_symbol2scm ("extent"), p);
- if (gh_pair_p (e) && ly_number_pair_p (gh_cdr (e)))
+ if (gh_pair_p (e) && ly_number_pair_p (ly_cdr (e)))
{
extent = Interval (gh_scm2double (gh_cadr (e)) * staff_space,
gh_scm2double (gh_cddr (e)) * staff_space);
while (gh_pair_p (text))
{
- Molecule m = text2molecule (me, gh_car (text), p);
+ Molecule m = text2molecule (me, ly_car (text), p);
/*
TODO: look at padding?
*/
SCM next_p = SCM_EOL;
- if (gh_pair_p (gh_car (text)))
- next_p = gh_list (gh_call2 (f, sheet, gh_caar (text)), SCM_UNDEFINED);
+ if (gh_pair_p (ly_car (text)))
+ next_p = scm_list_n (gh_call2 (f, sheet, gh_caar (text)), SCM_UNDEFINED);
SCM next_k = ly_assoc_chain (ly_symbol2scm ("kern"), next_p);
Real next_kern = kern[axis];
- if (gh_pair_p (next_k) && gh_number_p (gh_cdr (next_k)))
- next_kern = gh_scm2double (gh_cdr (next_k)) * staff_space;
+ if (gh_pair_p (next_k) && gh_number_p (ly_cdr (next_k)))
+ next_kern = gh_scm2double (ly_cdr (next_k)) * staff_space;
SCM next_r = ly_assoc_chain (ly_symbol2scm ("raise"), next_p);
Real next_raise = 0;
- if (gh_pair_p (next_r) && gh_number_p (gh_cdr (next_r)))
- next_raise = gh_scm2double (gh_cdr (next_r)) * staff_space;
+ if (gh_pair_p (next_r) && gh_number_p (ly_cdr (next_r)))
+ next_raise = gh_scm2double (ly_cdr (next_r)) * staff_space;
o[Y_AXIS] = next_raise;
mol.add_at_edge (axis, axis == X_AXIS ? RIGHT : DOWN, m, next_kern);
}
}
- text = gh_cdr (text);
+ text = ly_cdr (text);
}
if (extent_b)
/* Hmm, we're not allowed to change a Molecule's extent? */
mol.dim_[axis] = extent;
Molecule::ly_set_molecule_extent_x (mol.self_scm (), gh_int2scm (axis),
- gh_cdr (e));
+ ly_cdr (e));
#else
// burp: unpredictable names, these...
Box b = mol.extent_box ();
void
Translator_def::add_push_property (SCM props, SCM syms, SCM vals)
{
- this->property_ops_ = gh_cons (gh_list (push_sym, props, syms, vals, SCM_UNDEFINED),
+ this->property_ops_ = gh_cons (scm_list_n (push_sym, props, syms, vals, SCM_UNDEFINED),
this->property_ops_);
}
void
Translator_def::add_pop_property (SCM props, SCM syms)
{
- this->property_ops_ = gh_cons (gh_list (push_sym, props, syms, SCM_UNDEFINED),
+ this->property_ops_ = gh_cons (scm_list_n (push_sym, props, syms, SCM_UNDEFINED),
this->property_ops_);
}
{
if (gh_symbol_p (syms))
dynamic_cast<Translator_group*> (me)->execute_single_pushpop_property (syms, eprop, val);
- else for (SCM s = syms; gh_pair_p (s); s = gh_cdr (s))
- dynamic_cast<Translator_group*> (me)->execute_single_pushpop_property (gh_car (s), eprop, val);
+ else for (SCM s = syms; gh_pair_p (s); s = ly_cdr (s))
+ dynamic_cast<Translator_group*> (me)->execute_single_pushpop_property (ly_car (s), eprop, val);
}
assert (gh_string_p (type_str));
Link_array<Translator_def> accepted_arr;
- for (SCM s = accepts_name_list_; gh_pair_p (s); s = gh_cdr (s))
+ for (SCM s = accepts_name_list_; gh_pair_p (s); s = ly_cdr (s))
{
- Translator_def *t = unsmob_translator_def (odef->find_translator_l (gh_car (s)));
+ Translator_def *t = unsmob_translator_def (odef->find_translator_l (ly_car (s)));
if (!t)
continue;
accepted_arr.push (t);
trans_list (SCM namelist, Translator_group*tg)
{
SCM l = SCM_EOL;
- for (SCM s = namelist; gh_pair_p (s) ; s = gh_cdr (s))
+ for (SCM s = namelist; gh_pair_p (s) ; s = ly_cdr (s))
{
- Translator * t = get_translator_l (ly_scm2string (gh_car (s)));
+ Translator * t = get_translator_l (ly_scm2string (ly_car (s)));
if (!t)
warning (_f ("can't find: `%s'", s));
else
Translator_def::apply_property_operations (Translator_group*tg)
{
SCM correct_order = scm_reverse (property_ops_); // pity of the mem.
- for (SCM s = correct_order; gh_pair_p (s); s = gh_cdr (s))
+ for (SCM s = correct_order; gh_pair_p (s); s = ly_cdr (s))
{
- SCM entry = gh_car (s);
- SCM type = gh_car (entry);
- entry = gh_cdr (entry);
+ SCM entry = ly_car (s);
+ SCM type = ly_car (entry);
+ entry = ly_cdr (entry);
if (type == push_sym)
{
SCM val = gh_cddr (entry);
- val = gh_pair_p (val) ? gh_car (val) : SCM_UNDEFINED;
+ val = gh_pair_p (val) ? ly_car (val) : SCM_UNDEFINED;
- apply_pushpop_property (tg, gh_car (entry), gh_cadr (entry), val);
+ apply_pushpop_property (tg, ly_car (entry), gh_cadr (entry), val);
}
else if (type == assign_sym)
{
- tg->set_property (gh_car (entry), gh_cadr (entry));
+ tg->set_property (ly_car (entry), gh_cadr (entry));
}
}
}
void
Translator_def::add_property_assign (SCM nm, SCM val)
{
- this->property_ops_ = gh_cons (gh_list (assign_sym, scm_string_to_symbol (nm), val, SCM_UNDEFINED),
+ this->property_ops_ = gh_cons (scm_list_n (assign_sym, scm_string_to_symbol (nm), val, SCM_UNDEFINED),
this->property_ops_);
}
Translator_def::default_child_context_name ()
{
SCM d = accepts_name_list_;
- return gh_pair_p (d) ? gh_car (scm_last_pair (d)) : SCM_EOL;
+ return gh_pair_p (d) ? ly_car (scm_last_pair (d)) : SCM_EOL;
}
SCM
SCM thick = me->get_grob_property ("thick");
SCM gap = me->get_grob_property ("number-gap");
- SCM at =gh_list (ly_symbol2scm ("tuplet"),
+ SCM at =scm_list_n (ly_symbol2scm ("tuplet"),
gh_double2scm (1.0),
gap,
gh_double2scm (w),
}
d = UP ;
- for (SCM s = me->get_grob_property ("columns"); gh_pair_p (s); s = gh_cdr (s))
+ for (SCM s = me->get_grob_property ("columns"); gh_pair_p (s); s = ly_cdr (s))
{
- Grob * nc = unsmob_grob (gh_car (s));
+ Grob * nc = unsmob_grob (ly_car (s));
if (Note_column::dir (nc) < 0)
{
d = DOWN;
SCM proc = get_property ("tupletNumberFormatFunction");
if (gh_procedure_p (proc))
{
- SCM t = gh_apply (proc, gh_list (time_scaled_music_arr_[i]->self_scm (), SCM_UNDEFINED));
+ SCM t = gh_apply (proc, scm_list_n (time_scaled_music_arr_[i]->self_scm (), SCM_UNDEFINED));
glep->set_grob_property ("text", t);
}
if (gh_pair_p (alternative_cons_))
{
- current_iter_p_ = get_iterator_p (unsmob_music (gh_car (alternative_cons_)));
+ current_iter_p_ = get_iterator_p (unsmob_music (ly_car (alternative_cons_)));
do_main_b_ = false;
if (volta_b_)
}
if (do_repcommands)
- add_repeat_command (gh_list (ly_symbol2scm ("volta"),
+ add_repeat_command (scm_list_n (ly_symbol2scm ("volta"),
ly_str02scm (repstr.ch_C ()), SCM_UNDEFINED));
}
}
*/
if (alternative_cons_)
{
- here_mom_ += unsmob_music (gh_car (alternative_cons_))->length_mom ();
+ here_mom_ += unsmob_music (ly_car (alternative_cons_))->length_mom ();
if (volta_b_ ||
repmus->repeat_count () - done_count_ < alternative_count_i_)
- alternative_cons_ = gh_cdr (alternative_cons_);
+ alternative_cons_ = ly_cdr (alternative_cons_);
if (do_repcommands)
- add_repeat_command (gh_list (ly_symbol2scm ("volta"), SCM_BOOL_F, SCM_UNDEFINED));
+ add_repeat_command (scm_list_n (ly_symbol2scm ("volta"), SCM_BOOL_F, SCM_UNDEFINED));
if (do_repcommands)
{
String repstr = to_str (done_count_ + 1) + ".";
- add_repeat_command (gh_list (ly_symbol2scm ("volta"),
+ add_repeat_command (scm_list_n (ly_symbol2scm ("volta"),
ly_str02scm (repstr.ch_C ()), SCM_UNDEFINED));
add_repeat_command (ly_symbol2scm ("end-repeat"));
}
if (volta_b_)
- current_iter_p_ = get_iterator_p (unsmob_music (gh_car (alternative_cons_)));
+ current_iter_p_ = get_iterator_p (unsmob_music (ly_car (alternative_cons_)));
else
{
current_iter_p_ = get_iterator_p (repmus->body ());
? mus->alternatives ()->music_list ()
: SCM_EOL;
- for (SCM p = alternative_cons_; gh_pair_p (p); p = gh_cdr (p))
+ for (SCM p = alternative_cons_; gh_pair_p (p); p = ly_cdr (p))
alternative_count_i_ ++;
if (mus->body ())
}
else if (gh_pair_p (alternative_cons_))
{
- current_iter_p_ = get_iterator_p (unsmob_music (gh_car (alternative_cons_)));
+ current_iter_p_ = get_iterator_p (unsmob_music (ly_car (alternative_cons_)));
do_main_b_ = false;
}
s = gh_append2 (nm, s);
Moment m = 0;
- for (SCM i = nm; gh_pair_p (i); i = gh_cdr (i))
- m = m >? unsmob_music (gh_car (i))->length_mom ();
+ for (SCM i = nm; gh_pair_p (i); i = ly_cdr (i))
+ m = m >? unsmob_music (ly_car (i))->length_mom ();
if (m > Moment (0))
break ;
bool no_vertical_start = orig_span && !first_bracket;
bool no_vertical_end = orig_span && !last_bracket;
SCM bars = me->get_grob_property ("bars");
- Grob * endbar = unsmob_grob (gh_car (bars));
+ Grob * endbar = unsmob_grob (ly_car (bars));
SCM glyph = endbar->get_grob_property("glyph");
String str = ly_scm2string(glyph);
const char* cs = str.ch_C();
/*
ugh: should build from line segments.
*/
- SCM at = (gh_list (ly_symbol2scm ("volta"),
+ SCM at = (scm_list_n (ly_symbol2scm ("volta"),
gh_double2scm (h),
gh_double2scm (w),
gh_double2scm (t),
Box b (Interval (0, w), Interval (0, h));
Molecule mol (b, at);
SCM text = me->get_grob_property ("text");
- SCM properties = gh_list (me->mutable_property_alist_, me->immutable_property_alist_,SCM_UNDEFINED);
+ SCM properties = scm_list_n (me->mutable_property_alist_, me->immutable_property_alist_,SCM_UNDEFINED);
Molecule num = Text_item::text2molecule (me, text, properties);
mol.add_at_edge (X_AXIS, LEFT, num, - num.extent (X_AXIS).length ()