runtime 'sizeof()'?
Brandon Allbery
bsa at ncoast.UUCP
Wed Feb 6 14:48:52 AEST 1985
As to the null pointer controversy, I've taken to using a derivative
of the technique Larry Wall uses in rn for all but the quick, sloppy
ultra-local (TRS-Xenix) programs:
#define Null(type) ((type *) 0)
...
if ((fp = fopen(filename, "r")) == Null(FILE))
...
You get the idea. Easy to use and it makes the point (pun not intended)
evident.
--bsa
--
Brandon Allbery @ decvax!cwruecmp!ncoast!bsa (..ncoast!tdi1!bsa business)
6504 Chestnut Road, Independence, Ohio 44131 +1 216 524 1416 (or what have you)
More information about the Comp.lang.c
mailing list