home *** CD-ROM | disk | FTP | other *** search
- /*
- * stdarg.h -- ANSI
- *
- * Macros and type for functions the require variable
- * numbers of arguments.
- *
- * Copyright (c) 1990, MetaWare Incorporated
- */
-
- #ifndef _STDARG_H
- #define _STDARG_H
-
- #if !__HIGHC__
- #define _max(a,b) ((a)>(b)?(a):(b))
- #endif
-
- #ifndef _VA_LIST_DEFINED
- # define _VA_LIST_DEFINED
- typedef char *va_list;
- #endif
-
- /* Minimum size of a parameter: round to the number of ints; must be at least one int. */
- #define __psize(parmsize) _max(sizeof(int), ((parmsize)+sizeof(int)-1)/sizeof(int)*sizeof(int) )
-
- #define va_start(ap, parmN) ( ap = (char *) &parmN + __psize(sizeof(parmN)) )
-
- #define va_arg(ap, type) ( \
- *(type *) ((ap += __psize(sizeof(type)) ) - __psize(sizeof(type))) )
-
- #define va_end(ap)
-
- #endif /* _STDARG_H */
-