u.h 959 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  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 char u8int;
  16. typedef unsigned short u16int;
  17. typedef unsigned int u32int;
  18. typedef unsigned long long u64int;
  19. union FPdbleword
  20. {
  21. double x;
  22. struct { /* little endian */
  23. ulong lo;
  24. ulong hi;
  25. };
  26. };
  27. typedef char* va_list;
  28. #define va_start(list, start) list =\
  29. (sizeof(start) < 4?\
  30. (char*)((int*)&(start)+1):\
  31. (char*)(&(start)+1))
  32. #define va_end(list)\
  33. USED(list)
  34. #define va_arg(list, mode)\
  35. ((sizeof(mode) == 1)?\
  36. ((mode*)(list += 4))[-4]:\
  37. (sizeof(mode) == 2)?\
  38. ((mode*)(list += 4))[-2]:\
  39. ((mode*)(list += sizeof(mode)))[-1])