[Top][All Lists]

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

Re: IF / ELSE / ENDIF macros for M4

From: Mr. Clif
Subject: Re: IF / ELSE / ENDIF macros for M4
Date: Wed, 26 May 2021 08:29:37 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.0

You're welcome Eric,

Feel free to change the style or rewrite them from scratch to better match the other examples in the manual if needed, I'm not attached. :-) I would just like to see this tool available when others go looking for it.

I'm happy to add whichever copyright you'd like to it, just let me know.

    Thanks for considering it,

On 5/26/21 7:56 AM, Eric Blake wrote:
On Wed, Apr 07, 2021 at 09:58:08AM -0700, Mr. Clif wrote:
So not finding anything like this, I wrote some that seem to work pretty
well. Here they are:

Thanks for the link.

I defined the names without the #'s eg. IF, ELSE, ENDIF, etc... Also M4
requires parentheses to hold the arguments where CPP does not (at least for
most of these). I also added a selective invoke, to protect macros with side
effects from invocation in an unselected block.

I was wondering if they pass muster, if the devs might consider including
them or something similar in M4's list of examples.
Right now, the code in m4/examples is limited to things mentioned in
the manual; it may be worth considering additional examples, but
distributing them as part of the m4 tarball would require proper FSF
copyright assignment.  Certainly not something that will happen in
time for the pending 1.4.19 release, but if there is didactic value in
your macros that is not already covered in the manual, it may be worth
future consideration.

reply via email to

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