Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
785 B

  1. #ifdef _WINDOWS
  2. #define PcToHostLong(x) (x)
  3. #define PcToHostWord(x) (x)
  4. #define HostToPcLong(x) (x)
  5. #define HostToPcWord(x) (x)
  6. #ifdef WIN32
  7. #include "api1632.h"
  8. #define byte unsigned char
  9. #endif
  10. #else
  11. #ifdef VAX
  12. #define PcToHostLong(x) (x)
  13. #define PcToHostWord(x) (x)
  14. #define HostToPcLong(x) (x)
  15. #define HostToPcWord(x) (x)
  16. #else
  17. #define PcToHostLong(x) ( (((x)&0xFF) << 24) | \
  18. ((((x)>>8)&0xFF) << 16) | \
  19. ((((x)>>16)&0xFF) << 8) | \
  20. ((((x)>>24)&0xFF)) )
  21. #define HostToPcLong(x) ( (((x)&0xFF) << 24) | \
  22. ((((x)>>8)&0xFF) << 16) | \
  23. ((((x)>>16)&0xFF) << 8) | \
  24. ((((x)>>24)&0xFF)) )
  25. #define PcToHostWord(x) ( (((x)>>8) & 0xFF) | (((x) & 0xFF)<<8) )
  26. #define HostToPcWord(x) ( (((x)>>8) & 0xFF) | (((x) & 0xFF)<<8) )
  27. #endif
  28. #endif
  29.