argument. This fixes too-long stems on half and quarter notes.
+2002-07-23 Han-Wen <hanwen@cs.uu.nl>
+
+ * lily/lily-guile.cc (robust_list_ref): be sensible with negative
+ argument. This fixes too-long stems on half and quarter notes.
+
2002-07-23 Jan Nieuwenhuizen <janneke@gnu.org>
* Documentation/index.texi: Add, fix, change some links and names,
/*
- return I-th element, or last elt L
+ Return I-th element, or last elt L. If I < 0, then we take the first
+ element.
PRE: length (L) > 0
*/
SCM
robust_list_ref(int i, SCM l)
{
- while (i-- && gh_pair_p (gh_cdr(l)))
+ while (i-- > 0 && gh_pair_p (gh_cdr(l)))
l = gh_cdr (l);
return gh_car(l);
SCM s;
Array<Real> a;
- Real length_f = 0.;
+ Real length_f = 3.5;
SCM scm_len = me->get_grob_property ("length");
if (gh_number_p (scm_len))
{
else
{
s = me->get_grob_property ("lengths");
- length_f = 3.5;
-
if (gh_pair_p (s))
{
length_f = 2* gh_scm2double (robust_list_ref (duration_log(me) -2, s));