X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=include%2Fstdarg.h;h=adf73483ce8bbfd397e92d69a4c08ec8713bc1f5;hb=24cfcfdd4f72fb5cacb457d6594d6077ed99690c;hp=fe0fa9f07aa2aed1b9a6d4d427fe61445e13f497;hpb=7e6005c9998e81079e6e90b2cb510d764ff42cb0;p=cc65 diff --git a/include/stdarg.h b/include/stdarg.h index fe0fa9f07..adf73483c 100644 --- a/include/stdarg.h +++ b/include/stdarg.h @@ -1,15 +1,15 @@ /*****************************************************************************/ /* */ -/* stdarg.h */ +/* stdarg.h */ /* */ -/* Variable arguments */ +/* Variable arguments */ /* */ /* */ /* */ -/* (C) 1998-2001 Ullrich von Bassewitz */ -/* Wacholderweg 14 */ -/* D-70597 Stuttgart */ -/* EMail: uz@musoftware.de */ +/* (C) 1998-2004 Ullrich von Bassewitz */ +/* Römerstrasse 52 */ +/* D-70794 Filderstadt */ +/* EMail: uz@cc65.org */ /* */ /* */ /* This software is provided 'as-is', without any expressed or implied */ @@ -40,16 +40,13 @@ typedef unsigned char* va_list; -#define va_start(ap, fix) ap = (va_list)&fix + __argsize__ - __fixargs__ -#define va_arg(ap,type) (*(type*)(ap -= ((sizeof (type) + 1) & ~1))) -#define va_copy(dest, src) ((dest)=(src)) +#define va_start(ap, fix) ap = ((va_list)&(fix)) +#define va_arg(ap,type) (*(type*)(ap -= ((sizeof (type) + 1) & ~1))) +#if __CC65_STD__ >= __CC65_STD_C99__ +#define va_copy(dest, src) ((dest)=(src)) +#endif #define va_end(ap) -/* PLEASE NOTE: The old va_fix macro is no longer needed. Just access the - * parameters by name. -#define va_fix(ap, offs) (*(unsigned*)(ap+(__fixargs__-2*offs))) - */ - /* End of stdarg.h */