/*
 * stdarg.h	 (National Semiconductor) 5/1990
 * Copyrights and other release restrictions may apply
 *
 * The ANSI-C counterpart of the standard UNIX 'varargs.h'
 * Note the differences:
 *	1. the 'va_start' macro receives *two* parameters (instead of one)
 *	2. There's no 'va_dcl' (ugly macro which contained a ';')
 *	3. We force double-word alignments on arguments.
 */

typedef char *va_list;

/* round UP to double-word alignment */
/* #define _ALIGN_UP4(n) (((n+3)/4)*4) */
#define _ALIGN_UP4(n) (((n)+3) & ~3)

#define va_start(ap, parmN) \
		ap = ((char *)&parmN) + _ALIGN_UP4(sizeof(parmN))

#define va_arg(ap, type) \
   (ap += _ALIGN_UP4(sizeof(type)),*(type *)(ap - _ALIGN_UP4(sizeof(type))))


#define va_end(ap) /* empty */
