ANSI-compatible function declarations with args

Ron Guilmette rfg at NCD.COM
Sat Mar 30 12:50:33 AEST 1991


In article <63.UUL1.3#5077 at aussie.COM> rex at aussie.COM (Rex Jaeschke) writes:
+Dave Yost asks:
+
+> #ifdef PROTO
+> #define decl_args(x) x
+> #else
+> #define decl_args(x) ()
+> #endif
+> 
+> Are there any standards for what to call this 'decl_args' macro?
+
+If you are an implementer I have seen only __ used as the name. As a user, 
+I use xx. It's short and not too distracting allowing you to still read the 
+function declaration around it.

I have also seen a single underscore used (in system files).

In general, I wish that it were not even possible to misuse the preprocessor
in this manner.  Usage such as this will drive my protoize & unprotoize
tools bonkers.  If you avoid such usage however, protoize and & unprotoize
can be used to switch your code from one form to the other (i.e. prototyped
to unprototypes) and vise versa in the blink of an eye.

Well... maybe not quite THAT fast, but you get the idea.
-- 

// Ron ("Shoot From The Hip") Guilmette
// Internet: rfg at ncd.com      uucp: ...uunet!lupine!rfg
// New motto:  If it ain't broke, try using a bigger hammer.



More information about the Comp.std.c mailing list