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