[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Nmh-workers] nmh internals: argument processing
From: |
Ralph Corderoy |
Subject: |
Re: [Nmh-workers] nmh internals: argument processing |
Date: |
Wed, 09 Jan 2013 16:01:31 +0000 |
Hi Ken,
> Even though it's a bit of hack, I like it.
And most readers can just take how the list of X() work without having
to investigate the gubbins.
> But ... it still somehow sticks in my craw the idea of returning an
> array index. It just seems wrong to me, somehow. So I'm going to
> change your second #define for X to be:
>
> #define X(sw, minchars, id) { sw, minchars, id },
That seems very redundant. :-) Like having
const int foo[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
since you're cementing the relationship between the enum and array index
through X(). If the two were being haphazardly maintained and at risk
of divergance then I could see the point.
> > The blank line after MARK_SWITCHES's definition is significant.
>
> How come? It looks like you could either have the blank line after
> the definition, or simply omit the last \. Of course, I could be
> missing something :-)
No, you're not. As you say, it's significant; either it remains or the
final \ goes. But doing the latter makes future edits, sorting, and
diffs a pain, so keeping it is better IMHO.
Cheers, Ralph.
- Re: [Nmh-workers] nmh internals: argument processing, (continued)
- Re: [Nmh-workers] nmh internals: argument processing, Ken Hornstein, 2013/01/08
- Re: [Nmh-workers] nmh internals: argument processing, Ralph Corderoy, 2013/01/08
- Re: [Nmh-workers] nmh internals: argument processing, Ken Hornstein, 2013/01/08
- Re: [Nmh-workers] nmh internals: argument processing, Ralph Corderoy, 2013/01/09
- Re: [Nmh-workers] nmh internals: argument processing, Ken Hornstein, 2013/01/09
- Re: [Nmh-workers] nmh internals: argument processing, Paul Fox, 2013/01/09
- Re: [Nmh-workers] nmh internals: argument processing, Ralph Corderoy, 2013/01/09
- Re: [Nmh-workers] nmh internals: argument processing, Paul Fox, 2013/01/09
- Re: [Nmh-workers] nmh internals: argument processing, Ralph Corderoy, 2013/01/09
- Re: [Nmh-workers] nmh internals: argument processing, Ken Hornstein, 2013/01/09
- Re: [Nmh-workers] nmh internals: argument processing,
Ralph Corderoy <=
- Re: [Nmh-workers] nmh internals: argument processing, Ken Hornstein, 2013/01/09
Re: [Nmh-workers] nmh internals: argument processing, David Levine, 2013/01/08