[Top][All Lists]

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

Re: IF / ELSE / ENDIF macros for M4

From: Eric Blake
Subject: Re: IF / ELSE / ENDIF macros for M4
Date: Wed, 26 May 2021 09:56:14 -0500
User-agent: NeoMutt/20210205

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:
> http://www.eugeneweb.com/wiki/Sites/M4Macros

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.

Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org

reply via email to

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