Generic Pointers in non-ANSI C

TLIMONCE%DREW.BITNET at CUNYVM.CUNY.EDU TLIMONCE%DREW.BITNET at CUNYVM.CUNY.EDU
Thu Feb 25 13:21:56 AEST 1988


A notation that I see in many books is

#if COMPILER_HAS_VOID
typedef void VOID
#else
typedef char *VOID
#endif

(God I hope I got that right)

This allows you to use VOID as a (char *) until all the compilers you port
to have void.

My old source code uses VOID.  Now that all my compilers have a real
"void" I am slowly getting into the habit of not holding the SHIFT key as
I type "void".  You could estimate the date of a source file by monitoring
the % of VOIDs verses voids. :-)


Tom Limoncelli | Drew U/Box 1060/Madison NJ 07940 | tlimonce at drew.BITNET
    Disclaimer: These are my views, not my employer or Drew Univesity
--------------------------------------------------------------------------



More information about the Comp.lang.c mailing list