1
0

stdarg.h 464 B

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