Unnecessary Macros (was Re: Unnecessary Parenthesis)

Peter da Silva peter at ficc.uu.net
Sat Oct 1 08:39:27 AEST 1988


In article <8813 at ihlpb.ATT.COM>, nevin1 at ihlpb.ATT.COM (Liber) writes:
> What is really wanted is to be able to declare macros so that it would have
> the same semantics as an inlined function would (somewhat like C++
> inlining, except that type checking would not be done on the arguments.

I don't know how C++ inlining works but one of the long-standing things
on my wishlist is:

inline putc(c, fp)
char c;
FILE *fp;
{
	if(--fp->_cnt >= 0)
		*fp->ptr++ = c;
	else
		_flsbuf(c, fp);
}
-- 
Peter da Silva  `-_-'  Ferranti International Controls Corporation.
"Have you hugged  U  your wolf today?"            peter at ficc.uu.net



More information about the Comp.lang.c mailing list