Implement user space's printf stuff
[thunix.git] / include / stdarg.h
blob5bb26004217339ea2166fb1c6b8a779ce670448a
1 #ifndef _STDARG_H
2 #define _STDARG_H 1
4 typedef char * va_list;
6 /*
7 * Amount of space required in an argument list for an arg of type TYPE
8 */
9 #define __va_rounded_size(TYPE) \
10 (((sizeof(TYPE) + sizeof(int)-1) / sizeof(int)) * sizeof(int))
12 #define va_start(AP,LASTARG) \
13 (AP = ((char *)&(LASTARG) + __va_rounded_size(LASTARG)))
15 void va_end (va_list);
16 #define va_end(AP)
18 #define va_arg(AP,TYPE) \
19 (AP += __va_rounded_size(TYPE), \
20 *((TYPE *)(AP - __va_rounded_size(TYPE))))
22 #endif /* stdarg.h */