00001
00002
00003
00004
00005
00006 #ifndef STDARG_H
00007 #define STDARG_H
00008
00009 typedef char *va_list;
00010
00011 #define va_rounded_size(type) \
00012 (((sizeof (type) + sizeof (int) - 1) / sizeof (int)) * sizeof (int))
00013
00014 #define va_start(ap, v) \
00015 ((void) (ap = (va_list) &v + va_rounded_size (v)))
00016
00017 #define va_arg(ap, type) \
00018 (ap += va_rounded_size (type), *((type *)(ap - va_rounded_size (type))))
00019
00020 #define va_end(ap) ((void) (ap = 0))
00021
00022 #endif