u.h 864 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. #define nil ((void*)0)
  2. #define float long
  3. #define double long
  4. typedef unsigned short ushort;
  5. typedef unsigned char uchar;
  6. typedef unsigned long ulong;
  7. typedef unsigned int uint;
  8. typedef signed char schar;
  9. typedef long vlong;
  10. typedef unsigned long uvlong;
  11. typedef ushort Rune;
  12. typedef union FPdbleword FPdbleword;
  13. typedef long jmp_buf[2];
  14. typedef unsigned int mpdigit; /* for /sys/include/mp.h */
  15. typedef unsigned int u32int;
  16. union FPdbleword
  17. {
  18. double x;
  19. struct { /* little endian */
  20. ulong lo;
  21. ulong hi;
  22. };
  23. };
  24. typedef char* va_list;
  25. #define va_start(list, start) list =\
  26. (sizeof(start) < 4?\
  27. (char*)((int*)&(start)+1):\
  28. (char*)(&(start)+1))
  29. #define va_end(list)\
  30. USED(list)
  31. #define va_arg(list, mode)\
  32. ((sizeof(mode) == 1)?\
  33. ((mode*)(list += 4))[-4]:\
  34. (sizeof(mode) == 2)?\
  35. ((mode*)(list += 4))[-2]:\
  36. ((mode*)(list += sizeof(mode)))[-1])