1 2 /* 3 * What follows is an attempt to unify varargs.h and stdarg.h. I'd rather 4 * have this than #ifdefs all over the code. 5 */ 6 7 #ifdef __STDC__ 8 #include <stdarg.h> 9 #define VARARGS(func,type,arg) func(type arg, ...) 10 #define VASTART(ap,type,name) va_start(ap,name) 11 #define VAEND(ap) va_end(ap) 12 #else 13 #include <varargs.h> 14 #define VARARGS(func,type,arg) func(va_alist) va_dcl 15 #define VASTART(ap,type,name) {type name; va_start(ap); name = va_arg(ap, type) 16 #define VAEND(ap) va_end(ap);} 17 #endif 18 19 extern char *percent_m(); 20