#ifndef __STDARG_LOADED #define __STDARG_LOADED 1 #ifndef __STDARG_PROCESSED #define __STDARG_PROCESSED /**************************************************************************** ** ** - Variable Arguments ** ***************************************************************************** ** Header introduced by the ANSI C Standard ***************************************************************************** ** ** Copyright 2004 Hewlett-Packard Development Company, L.P. ** ** Confidential computer software. Valid license from HP and/or ** its subsidiaries 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. ** ** Neither HP nor any of its subsidiaries shall be liable for technical ** or editorial errors or omissions contained herein. The information ** in this document is provided "as is" without warranty of any kind and ** is subject to change without notice. The warranties for HP products ** are set forth in the express limited warranty statements accompanying ** such products. Nothing herein should be construed as constituting an ** additional warranty. ** ***************************************************************************** */ #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 #ifdef __NAMESPACE_STD namespace std { #endif /* ** Declare a va_list */ #ifndef __VA_LIST # define __VA_LIST typedef __va_list va_list; #endif #ifdef __NAMESPACE_STD } /* namespace std */ #endif #if !defined(__VAX) # if __X_FLOAT # define va_start(ap, parmN) \ ap = (__va_list) ((__char_ptr32) __VA_START_BUILTIN(parmN) + \ (((__IS_X_FLOAT_BUILTIN(parmN) ? sizeof(long double *) : sizeof(parmN)) + 7) & ~7)) # if defined(__va_arg_no_comma) || (defined(__cplusplus) && defined(__ia64)) /* Linux-style definition of va_arg, without comma operator */ # define va_arg(ap, type) (__IS_X_FLOAT_BUILTIN(type) ? \ (* ((type **) \ ((__char_ptr32)(ap = (__va_list) ((__char_ptr32) ap + \ ((sizeof(long double *) + 7) & ~7))) - \ ((sizeof(long double *) + 7) & ~7)))[0]) \ : \ ( ((type *) \ ((__char_ptr32)(ap = (__va_list) ((__char_ptr32) ap + \ ((sizeof(type) + 7) & ~7))) - \ ((sizeof(type) + 7) & ~7)))[0]) \ ) # else /* VMS-style definition of va_arg, using comma operator */ # define va_arg(ap, type) (\ ap = (__va_list) ((__char_ptr32) ap + \ (((__IS_X_FLOAT_BUILTIN(type) ? sizeof(long double *) : sizeof(type)) + 7) & ~7)), \ __IS_X_FLOAT_BUILTIN(type) ? \ (** (type **)((__char_ptr32) ap - \ (((__IS_X_FLOAT_BUILTIN(type) ? sizeof(long double *) : sizeof(type)) + 7) & ~7))) : \ ( * (type *)((__char_ptr32) ap - \ (((__IS_X_FLOAT_BUILTIN(type) ? sizeof(long double *) : sizeof(type)) + 7) & ~7))) ) # endif # else # define va_start(ap, parmN) \ ap = (__va_list) ((__char_ptr32) __VA_START_BUILTIN(parmN) + ((sizeof (parmN) + 7) & ~7)) # define va_arg(ap, type) (\ ap = (__va_list) ((__char_ptr32) ap + ((sizeof (type) + 7) & ~7)), \ (* (type *)((__char_ptr32) 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_ptr32) ap + ((sizeof (type) + 3) & ~3)), \ * (type *) ((__char_ptr32) ap - ((sizeof (type) + 3) & ~3)))) # else # ifdef __cplusplus # define va_start(ap, parmN) \ ap = (__va_list) ((__char_ptr32) &parmN + ((sizeof (parmN) + 3) & ~3)) # define va_arg(ap, type) (\ ap = (__va_list) ((__char_ptr32) ap + ((sizeof (type) + 3) & ~3)), \ * (type *) ((__char_ptr32) ap - ((sizeof (type) + 3) & ~3))) # else # define va_start(ap, parmN) \ ap = (__VA_START_BUILTIN(), \ (__va_list) ((__char_ptr32) &parmN + ((sizeof (parmN) + 3) & ~3))) # define va_arg(ap, type) \ (__VA_START_BUILTIN(), (\ ap = (__va_list) ((__char_ptr32) ap + ((sizeof (type) + 3) & ~3)), \ * (type *) ((__char_ptr32) 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_PROCESSED */ #if defined(__NAMESPACE_STD) && !defined(__NAMESPACE_STD_ONLY) # ifndef __USING_STDARG_NAMES # define __USING_STDARG_NAMES using std::va_list; # endif #endif #endif /* __STDARG_LOADED */