[Top][All Lists]

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

Re: Macro for(UP_and_DOWN) and 3 similar. (issue 2491) (issue 6109046)

From: Keith OHara
Subject: Re: Macro for(UP_and_DOWN) and 3 similar. (issue 2491) (issue 6109046)
Date: Tue, 24 Apr 2012 10:49:34 -0700
User-agent: Opera Mail/11.62 (Win32)

On Tue, 24 Apr 2012 09:21:17 -0700, <address@hidden> wrote:

If you replace *all* the while(flip()) loops, you can remove the flip

Well, there will be one more place:
There is:
   while (flip (&d) != LEFT && rb);

By now I can't tell what the whole code is for. Could you give me a tip?

This is a loop of the same type you are replacing, except that it will end 
early if rb is NULL.  If you do not change it, a new programmer will find it 
very strange.  Without thinking about the meaning of the code, just analyzing 
the mechanics, you can make an equivalent loop.  I think that might be
  for (LEFT_and_RIGHT (d))
    if (!rb) break;

On 2012/04/24 04:10:36, Keith wrote:

Chords in seconds get a bit too much space, if they have ledgers.

Certainly not related to the rest of this patch.

As I guess, this bug should be filed as a separate issue, right?

Correct.  It is not related to the loop structure.

On 22 April 2012 13:28, Han-Wen Nienhuys <address@hidden> wrote:
Looks like a bug.  Maybe you could work on a test/repro case?

Well, my understanding of this code is really, really vague, so it would
take me a lot of time to: understand this, learn how to write test cases
and then write one.

You are able to write test cases.  I wrote the test case for this bug
by reading HanWen's mail and thinking of LilyPond input that would create the 
situation.  Next time you make a test-case for a bug, email it to 
address@hidden and somebody will put it on the bug tracker.

You certainly should compile LilyPond with your changes and see if it does, in 
fact, fix issue 2493

Also, use the GNU spacing style if you can:
  for (UP_and_DOWN (d))
There is a Python script scripts/auxiliar/ that standardizes the spacing.  It is 
a strange spacing style, but LilyPond uses it consistently.  Consistent spacing probably 
made it easier for you to find all the "while (flip (".

reply via email to

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