macros with parameters in MSC 5.0
John Gilmore
gnu at lnptoad.uucp
Sun Feb 21 21:59:08 AEST 1988
jbaker at ee.UCLA.EDU (Joe Baker) wrote:
> #define ctl(c) ('c'&037)
> I have come up with some ugly fixes, but would like to know: what is
> the Right Way to do this?
The Right Way is to send in a comment to the ANSI C committee, complaining
that there is no Right Way to do this.
This change caused us to have to fix more than 50 files in Berkeley
Unix. We wouldn't have minded changing all the macro definitions -- we
know that substitution inside strings is a hack -- it's that we had to
change all the CALLERS too that bugged us!
[Responses of the form: "Well, you already fixed your code, so why should
we make the standard reasonable?" are bogus. A useful capability was removed,
and replaced with a less capable set of features.]
> However, the
> program compiles and runs on lots of systems.
Something like 99% of the Unix systems, I'd guess, since they all seem to
use John Reiser's cpp -- it works, why rewrite it?
--
{pyramid,ptsfa,amdahl,sun,ihnp4}!loptoad!gnu gnu at toad.com
"Watch me change my world..." -- Liquid Theatre
More information about the Comp.lang.c
mailing list