#ifndef __STDARG_LOADED #define __STDARG_LOADED 1 /**************************************************************************** ** ** - Variable Arguments ** ***************************************************************************** ** Header introduced by the ANSI C Standard ***************************************************************************** ** ** Copyright 2000 Compaq Computer Corporation ** ** Compaq and the Compaq logo Registered in U.S. Patent and Trademark Office. ** ** Confidential computer software. Valid license from Compaq required for ** possession, use or copying. Consistent with FAR 12.211 and 12.212, ** Commercial Computer Software, Computer Software Documentation, and ** Technical Data for Commercial Items are licensed to the U.S. Government ** under vendor's standard commercial license. ** ****************************************************************************** */ #pragma __nostandard #include #ifdef __cplusplus extern "C" { #endif /* ** The header files VARARGS.H and STDARG.H cannot be used together; undo the ** effects of VARARGS.H. */ #ifdef __VARARGS_LOADED # undef __VARARGS_LOADED # undef va_dcl # undef va_count # undef va_start_1 # undef va_start # undef va_arg # undef va_end #endif /* ** Declare a va_list */ #ifndef __VA_LIST # define __VA_LIST typedef __va_list va_list; #endif #ifdef __ALPHA # if __X_FLOAT # define va_start(ap, parmN) \ ap = (__va_list) ((char *) __VA_START_BUILTIN(parmN) + \ (((__IS_X_FLOAT_BUILTIN(parmN) ? sizeof(long double *) : sizeof(parmN)) + 7) & ~7)) # define va_arg(ap, type) \ (ap = (__va_list) ((char *) ap + \ (((__IS_X_FLOAT_BUILTIN(type) ? sizeof(long double *) : sizeof(type)) + 7) & ~7)), \ __IS_X_FLOAT_BUILTIN(type) ? \ (** (type **)((char *) ap - (((__IS_X_FLOAT_BUILTIN(type) ? sizeof(long double *) : sizeof(type)) + 7) & ~7))) : \ ( * (type *)((char *) ap - (((__IS_X_FLOAT_BUILTIN(type) ? sizeof(long double *) : sizeof(type)) + 7) & ~7))) ) # else # define va_start(ap, parmN) ap = (__va_list) ((char *) __VA_START_BUILTIN(parmN) + ((sizeof (parmN) + 7) & ~7)) # define va_arg(ap, type) (ap = (__va_list) ((char *) ap + ((sizeof (type) + 7) & ~7)), \ (* (type *)((char *) ap - ((sizeof (type) + 7) & ~7)))) # endif /* ** va_count is an extension to the standard. */ # ifndef __HIDE_FORBIDDEN_NAMES unsigned int __VA_COUNT_BUILTIN(void); # define va_count(count) (count = __VA_COUNT_BUILTIN()) # endif #else # if (__DECC_VER >= 50300000) || (__DECCXX_VER >= 50300000) # define va_start(ap, parmN) ap = __VA_START1_BUILTIN(parmN) # define va_arg(ap, type) \ (__VA_START_BUILTIN(), (ap = (__va_list) ((char *) ap + ((sizeof (type) + 3) & ~3)), \ * (type *) ((char *) ap - ((sizeof (type) + 3) & ~3)))) # else # ifdef __cplusplus # define va_start(ap, parmN) ap = (__va_list) ((char *) &parmN + ((sizeof (parmN) + 3) & ~3)) # define va_arg(ap, type) \ (ap = (__va_list) ((char *) ap + ((sizeof (type) + 3) & ~3)), \ * (type *) ((char *) ap - ((sizeof (type) + 3) & ~3))) # else # define va_start(ap, parmN) \ ap = (__VA_START_BUILTIN(), \ (__va_list) ((char *) &parmN + ((sizeof (parmN) + 3) & ~3))) # define va_arg(ap, type) \ (__VA_START_BUILTIN(), (ap = (__va_list) ((char *) ap + ((sizeof (type) + 3) & ~3)), \ * (type *) ((char *) ap - ((sizeof (type) + 3) & ~3)))) # endif # endif /* (__DECC_VER >= 50300000) || (__DECCXX_VER >= 50300000) */ # ifndef __HIDE_FORBIDDEN_NAMES void decc$va_count( int *__count ); # if defined(__DECC) || (__DECCXX_VER >= 50300000) # define va_count(count) (__VA_START_BUILTIN(), decc$va_count (&count)) # else # define va_count(count) decc$va_count (&count) # endif # endif #endif #define va_end(ap) ap = (__va_list) 0 #ifdef __cplusplus } #endif #pragma __standard #endif /* __STDARG_LOADED */