}
Direction grow_dir = to_dir (s);
+ Real padding = robust_scm2double (me->get_property ("bound-padding"), 0.5);
- Real padding = scm_to_double (me->get_property ("bound-padding"));
-
Drul_array<bool> broken;
Drul_array<Item*> bounds ;
Direction d = LEFT;
Spanner *pin = unsmob_spanner (scm_car (adj));
if (pin
- && (pin->get_bound (LEFT)->get_column() == b
- || pin->get_bound (RIGHT)->get_column() == b))
+ && (pin->get_bound (LEFT)->get_column() == b->get_column ()
+ || pin->get_bound (RIGHT)->get_column() == b->get_column() ))
neighbor_found = true;
}
x_points[d] =
neighbor_found ? e.center() - d * padding / 3 : e[d];
}
-
}
}
while (flip (&d) != LEFT);
Real width = x_points[RIGHT] - x_points[LEFT];
-
if (width < 0)
{
me->warning (_ ((grow_dir < 0) ? "decrescendo too small"
- : "crescendo too small"));
+ : "crescendo too small"));
width = 0;
}
String str (YYText () + 1);
SCM s = lookup_markup_command (str);
- if (ly_c_pair_p (s) && scm_is_symbol (scm_cdr (s)) ) {
+ if (scm_is_pair (s) && scm_is_symbol (scm_cdr (s)) ) {
yylval.scm = scm_car(s);
SCM tag = scm_cdr(s);
if (tag == ly_symbol2scm("markup0"))
SCM sym = ly_symbol2scm (str.to_str0 ());
if ((YYSTATE == notes) || (YYSTATE == chords)) {
SCM handle = SCM_BOOL_F;
- if (ly_c_pair_p (pitchname_tab_stack_))
+ if (scm_is_pair (pitchname_tab_stack_))
handle = scm_hashq_get_handle (scm_car (pitchname_tab_stack_), sym);
- if (ly_c_pair_p (handle)) {
+ if (scm_is_pair (handle)) {
yylval.scm = scm_cdr (handle);
if (unsmob_pitch (yylval.scm))
return (YYSTATE == notes) ? NOTENAME_PITCH : TONICNAME_PITCH;
void
set_music_properties (Music *p, SCM a)
{
- for (SCM k = a; ly_c_pair_p (k); k = scm_cdr (k))
+ for (SCM k = a; scm_is_pair (k); k = scm_cdr (k))
p->internal_set_property (scm_caar (k), scm_cdar (k));
}
ly_input_procedure_p (SCM x)
{
return ly_c_procedure_p (x)
- || (ly_c_pair_p (x) && ly_c_procedure_p (scm_car (x)));
+ || (scm_is_pair (x) && ly_c_procedure_p (scm_car (x)));
}
Music*
| context_def_spec_body GROBDESCRIPTIONS embedded_scm {
Context_def*td = unsmob_context_def ($$);
- for (SCM p = $3; ly_c_pair_p (p); p = scm_cdr (p)) {
+ for (SCM p = $3; scm_is_pair (p); p = scm_cdr (p)) {
SCM tag = scm_caar (p);
/* TODO: should make new tag "grob-definition" ? */
SCM c = scm_cons ($2->self_scm (), SCM_EOL);
scm_gc_unprotect_object ($2->self_scm ()); /* UGH */
- if (ly_c_pair_p (scm_cdr (s)))
+ if (scm_is_pair (scm_cdr (s)))
scm_set_cdr_x (scm_cdr (s), c); /* append */
else
scm_set_car_x (s, c); /* set first cons */
SCM c = scm_cons (m->self_scm (), SCM_EOL);
scm_gc_unprotect_object (m->self_scm ()); /* UGH */
- if (ly_c_pair_p (scm_cdr (s)))
+ if (scm_is_pair (scm_cdr (s)))
scm_set_cdr_x (scm_cdr (s), c); /* append */
else
scm_set_car_x (s, c); /* set first cons */
{
Music *beg = $4;
int times = $3;
- SCM alts = ly_c_pair_p ($5) ? scm_car ($5) : SCM_EOL;
+ SCM alts = scm_is_pair ($5) ? scm_car ($5) : SCM_EOL;
if (times < scm_ilength (alts)) {
unsmob_music (scm_car (alts))
->origin ()->warning (
int k = 0;
bool ok = true;
for (SCM s = sig, t = args;
- ok && ly_c_pair_p (s) && ly_c_pair_p (t);
+ ok && scm_is_pair (s) && scm_is_pair (t);
s = scm_cdr (s), t = scm_cdr (t)) {
k++;
if (scm_call_1 (scm_car (s), scm_car (t)) != SCM_BOOL_T)
Music *all = MY_MAKE_MUSIC ("SimultaneousMusic");
SCM lst = SCM_EOL;
- for (SCM s = $2; ly_c_pair_p (s); s = scm_cdr (s))
+ for (SCM s = $2; scm_is_pair (s); s = scm_cdr (s))
{
Music *music = unsmob_music (scm_car (s));
Music *com = make_lyric_combine_music (name, music);
SCM es = $1->get_property ("elements");
SCM postevs = scm_reverse_x ($3, SCM_EOL);
- for (SCM s = es; ly_c_pair_p (s); s = scm_cdr (s))
+ for (SCM s = es; scm_is_pair (s); s = scm_cdr (s))
unsmob_music (scm_car (s))->set_property ("duration", dur);
es = ly_append2 (es, postevs);
if (ex % 2 || q % 2)
n->set_property ("force-accidental", SCM_BOOL_T);
- if (ly_c_pair_p (post)) {
+ if (scm_is_pair (post)) {
SCM arts = scm_reverse_x (post, SCM_EOL);
n->set_property ("articulations", arts);
}
n->set_property ("drum-type", $1);
n->set_spot (THIS->here_input ());
- if (ly_c_pair_p ($2)) {
+ if (scm_is_pair ($2)) {
SCM arts = scm_reverse_x ($2, SCM_EOL);
n->set_property ("articulations", arts);
}
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 = scm_cdr (s))
+ for (SCM s = m->get_property ("elements"); scm_is_pair (s); s = scm_cdr (s))
{
unsmob_music (scm_car (s))->set_property ("duration", $2);
}