lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

accidentals 1.5.25.rz1


From: Han-Wen Nienhuys
Subject: accidentals 1.5.25.rz1
Date: Thu, 13 Dec 2001 13:27:18 +0100

address@hidden writes:
> I did a rethink about Han-Wen's idea and changed my mind - so I
> implemented it nevertheless.
> Really fewer properties here than in the last patch. :-)

good :)

 
> As I will not have much time the next week I would like you to put this
> patch in unless you find something very wrong.

done.

> +texidoc="
> +This shows how accidentals in different octaves are handled.
> +"

The regression test texts should explain what the
correct result should look like, so you could tell something is wrong
by comparing the examples and texts. This doesn't really tell anything.

> +/* looks the key up in the cdrs of the alist-keys
> +   - ignoring the car and ignoring non-pair keys.
> +   Returns first match found. */
> +SCM
> +ly_assoc_cdr (SCM key, SCM alist)
> +{
> +  if (gh_pair_p (alist)) {
> +    SCM trykey = ly_caar(alist);
> +    if(gh_pair_p(trykey) && to_boolean(scm_equal_p(key,ly_cdr(trykey))))
> +      return ly_car(alist);
> +    else
> +      return ly_assoc_cdr (key, ly_cdr (alist));
> +  }
>    else

I still don't understand. Why don't you simply use

 SCM f = scm_assoc (key, alist);
 return ly_pair_p (f) ? ly_cdr(f) : SCM_BOOL_F;

-- 

Han-Wen Nienhuys   |   address@hidden    | http://www.cs.uu.nl/~hanwen/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]