SCM
substitute_grob (Grob *sc)
{
- if (SCM_INUMP (break_criterion))
+ if (scm_is_integer (break_criterion))
{
Item * i = dynamic_cast<Item*> (sc);
Direction d = to_dir (break_criterion);
if (unsmob_grob (src))
return substitute_grob (unsmob_grob (src));
- else if (ly_vector_p (src))
+ else if (ly_c_vector_p (src))
{
int len = SCM_VECTOR_LENGTH (src);
SCM nv = scm_c_make_vector (len, SCM_UNDEFINED);
do_break_substitution (scm_vector_ref (src, si)));
}
}
- else if (ly_pair_p (src))
+ else if (scm_is_pair (src))
{
/*
UGH! breaks on circular lists.
SCM oldcdr = ly_cdr (src);
if (newcar == SCM_UNDEFINED
- && (ly_pair_p (oldcdr) || oldcdr == SCM_EOL))
+ && (scm_is_pair (oldcdr) || oldcdr == SCM_EOL))
{
/*
This is tail-recursion, ie.
SCM l = SCM_EOL;
SCM * tail = &l;
- for (SCM s = grob_list; ly_pair_p (s); s = ly_cdr (s))
+ for (SCM s = grob_list; scm_is_pair (s); s = ly_cdr (s))
{
SCM n= substitute_grob (unsmob_grob (ly_car (s)));
int sp_index = len;
int it_index = 0;
- for (SCM s = grob_list; ly_pair_p (s); s = ly_cdr (s))
+ for (SCM s = grob_list; scm_is_pair (s); s = ly_cdr (s))
{
Grob * g = unsmob_grob (ly_car (s));
SCM l = SCM_EOL;
SCM *tail = &l;
- for (SCM s = alist; ly_pair_p (s); s = ly_cdr (s))
+ for (SCM s = alist; scm_is_pair (s); s = ly_cdr (s))
{
SCM sym = ly_caar (s);
SCM val = ly_cdar (s);
else
val = do_break_substitution (val);
- *tail = scm_cons (scm_cons (sym, val), SCM_EOL);
- tail = SCM_CDRLOC (*tail);
- }
+ if (val != SCM_UNDEFINED)
+ {
+ /*
+ for ly:grob? properties, SCM_UNDEFINED could leak out
+ through ly:grob-property
+ */
+ *tail = scm_cons (scm_cons (sym, val), SCM_EOL);
+ tail = SCM_CDRLOC (*tail);
+ }
+ }
return l;
}