ANSI-compatible function declarations with args
Dave Yost
yost at tss.com
Thu Mar 28 05:36:10 AEST 1991
See this:
#ifdef __ANSI__ && !defined (PROTO)
#define PROTO
#endif
#undef decl_args
#ifdef PROTO
#define decl_args(x) x
#else
#define decl_args(x) ()
#endif
Are there any standards (preferably only one)
for what to call this 'decl_args' macro?
As perhaps all of you know, a macro like this
allows one to write function declarations
which work optimally with both ANSI and non-ANSI
compilers. Example:
extern void qsort decl_args ((
char* base,
int nelements,
int width,
int *(compar) decl_args ((char* e1, char* e2))
));
--dave yost
More information about the Comp.lang.c
mailing list