builtins and automatic defines
Alan J Rosenthal
flaps at utcs.uucp
Sat May 17 16:23:25 AEST 1986
In article <816 at bentley.UUCP> kwh at bentley.UUCP (KW Heuer) writes:
>I wonder if perhaps <stdio.h> (and <builtins.h>) should be included by
>default, with an explicit "#exclude" to disable. (Cf. "#undef".) Probably
>tricky to implement -- don't do the automatic "#include" until checking for
>"#exclude", which must be at the top of the file (after whitespace)?
Why bother? This would be very complicated and lead to many mistakes due
to an unclear definition of whitespace or whatever.
I have a file called "beginc", it's a shellscript, and it creates a file
which begins something like this:
#include <stdio.h>
#include "/u/flaps/ajr.h"
#include <strings.h>
#define TRUE 1
#define FALSE 0
main(argc,argv)
int argc;
char *argv[];
{
and then puts you in $EDITOR on the file. This approach is much better
than any #exclude op. It's more easily disabled or modified because you
don't have the reverse situation of deleting things by adding in lines.
--
Alan J Rosenthal
{linus|decvax}!utzoo!utcs!flaps, {ihnp4|allegra}!cbosgd!utcs!flaps
More information about the Comp.lang.c
mailing list