1
0

stdarg.h 403 B

12345678910111213141516
  1. #ifndef __STDARG
  2. #define __STDARG
  3. typedef char *va_list;
  4. #define va_start(list, start) list = (sizeof(start)<4 ? (char *)((int *)&(start)+1) : \
  5. (char *)(&(start)+1))
  6. #define va_end(list)
  7. #define va_arg(list, mode)\
  8. ((sizeof(mode) == 1)?\
  9. ((list += 4), (mode*)list)[-4]:\
  10. (sizeof(mode) == 2)?\
  11. ((list += 4), (mode*)list)[-2]:\
  12. ((list += sizeof(mode)), (mode*)list)[-1])
  13. #endif /* __STDARG */