341N/A/* $XConsortium: Xvarargs.h,v 1.4 94/04/17 20:21:57 rws Exp $ */
341N/A/*
341N/A
341N/ACopyright (c) 1985, 1986, 1987, 1988, 1989 X Consortium
341N/A
341N/APermission is hereby granted, free of charge, to any person obtaining
341N/Aa copy of this software and associated documentation files (the
341N/A"Software"), to deal in the Software without restriction, including
341N/Awithout limitation the rights to use, copy, modify, merge, publish,
341N/Adistribute, sublicense, and/or sell copies of the Software, and to
341N/Apermit persons to whom the Software is furnished to do so, subject to
341N/Athe following conditions:
341N/A
341N/AThe above copyright notice and this permission notice shall be included
341N/Ain all copies or substantial portions of the Software.
341N/A
341N/ATHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
341N/AOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
341N/AMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
341N/AIN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
341N/AOTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
341N/AARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
341N/AOTHER DEALINGS IN THE SOFTWARE.
341N/A
341N/AExcept as contained in this notice, the name of the X Consortium shall
341N/Anot be used in advertising or otherwise to promote the sale, use or
341N/Aother dealings in this Software without prior written authorization
341N/Afrom the X Consortium.
341N/A
341N/A*/
341N/A
341N/A#ifndef _XVARARGS_H_
341N/A#define _XVARARGS_H_
341N/A
341N/A#ifdef __HIGHC__
341N/A#ifndef _STDARG_H
341N/A#define _STDARG_H
341N/A
341N/Atypedef char *va_list;
341N/A
341N/A/* Amount of space required in an argument list for an arg of type TYPE.
341N/A TYPE may alternatively be an expression whose type is used. */
341N/A
341N/A#define __va_rounded_size(TYPE) \
341N/A (((sizeof (TYPE) + sizeof (int) - 1) / sizeof (int)) * sizeof (int))
341N/A
341N/A#define va_start(AP, LASTARG) \
341N/A (AP = ((char *) &(LASTARG) + __va_rounded_size (LASTARG)))
341N/A
341N/A#define va_end(AP)
341N/A
341N/A#define va_arg(AP, TYPE) \
341N/A (AP += __va_rounded_size (TYPE), \
341N/A *((TYPE *) (AP - __va_rounded_size (TYPE))))
341N/A
341N/A#endif /* _STDARG_H */
341N/A
341N/A#define Va_start(a,b) va_start(a,b)
341N/A
341N/A#else /* !__HIGHC__ */
341N/A
341N/A#if NeedVarargsPrototypes
341N/A# include <stdarg.h>
341N/A# define Va_start(a,b) va_start(a,b)
341N/A#else
341N/A# include <varargs.h>
341N/A# define Va_start(a,b) va_start(a)
341N/A#endif
341N/A
341N/A#endif /* __HIGHC__ */
341N/A
341N/A#endif /* _XVARARGS_H_ */