]> git.sur5r.net Git - cc65/blob - include/stdarg.h
Added va_copy
[cc65] / include / stdarg.h
1 /*
2  * stdarg.h
3  *
4  * Ullrich von Bassewitz, 31.05.1998
5  *
6  */
7
8
9
10 #ifndef _STDARG_H
11 #define _STDARG_H
12
13
14
15 typedef unsigned char* va_list;
16
17 #define va_start(ap, fix)       ap = (va_list)&fix + *(((va_list)&fix)-1) - __fixargs__
18 #define va_arg(ap,type)         ((type)*(ap -= ((sizeof (type) + 1) & ~1)))
19 #define va_copy(dest, src)      ((dest)=(src))
20 #define va_end(ap)
21
22 /* This is only valid *before* the first call to va_arg. It will also work
23  * only for int sized parameters.
24  */
25 #define va_fix(ap, offs)        *(ap+(__fixargs__-2*offs))
26
27
28
29 /* End of stdarg.h */
30 #endif
31
32
33
34