nmh-workers
[Top][All Lists]
Advanced

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

Re: [Nmh-workers] nmh internals: argument processing


From: Ken Hornstein
Subject: Re: [Nmh-workers] nmh internals: argument processing
Date: Wed, 09 Jan 2013 10:17:30 -0500

>Hope this clairifies, ask if anything's unclear.

Yes, it does; thank you!  Actually, I think I do like this; I started
doing this conversion for a few files yesterday, and it did strike me
as a bit inelegant to have to do the enum separately from the struct swit
array.  Even though it's a bit of hack, I like it.

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 },

>I added the `array' parameter to DEFINE_SWITCH_ARRAY();  before I just
>always called the array `switches'.  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 :-)

>The LEN_MARK enumerate is to avoid the trailing comma in an enum;
>illegal in C89.  The name is embedded to make it unique and it's useful
>on other occasions, e.g. not having to NULL-terminate the array.

Thanks for explaining; I was wondering about that!

--Ken



reply via email to

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