Let's define our own NULL II
Frank Swarbrick
swarbric at tramp.Colorado.EDU
Fri Jun 24 15:38:59 AEST 1988
Someone already pointed out that ANSI has NULL defined in stddef.h. In Turbo C
1.5 it is in both stdio.h and stddef.h. If I only need NULL I just include
stddef.h. All that Turbo C's stddef does is typedefs size_t and ptrdiff_t,
defines NULL (as 0 or 0L, depending on memory model) and declares errno as an
external variable.
Sounds quite reasonable to me. It's only 40 lines, and most of that is
preprocessing stuff.
Frank Swarbrick (and, yes, the net.cat) swarbric at tramp.Colorado.EDU
...!{ncar|nbires}!boulder!tramp!swarbric
"And Jesus -- he wants to go to Venus."
More information about the Comp.lang.c
mailing list