windows-nt/Source/XPSP1/NT/windows/netdde/incs/host.h
2020-09-26 16:20:57 +08:00

29 lines
785 B
C
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#ifdef _WINDOWS
#define PcToHostLong(x) (x)
#define PcToHostWord(x) (x)
#define HostToPcLong(x) (x)
#define HostToPcWord(x) (x)
#ifdef WIN32
#include "api1632.h"
#define byte unsigned char
#endif
#else
#ifdef VAX
#define PcToHostLong(x) (x)
#define PcToHostWord(x) (x)
#define HostToPcLong(x) (x)
#define HostToPcWord(x) (x)
#else
#define PcToHostLong(x) ( (((x)&0xFF) << 24) | \
((((x)>>8)&0xFF) << 16) | \
((((x)>>16)&0xFF) << 8) | \
((((x)>>24)&0xFF)) )
#define HostToPcLong(x) ( (((x)&0xFF) << 24) | \
((((x)>>8)&0xFF) << 16) | \
((((x)>>16)&0xFF) << 8) | \
((((x)>>24)&0xFF)) )
#define PcToHostWord(x) ( (((x)>>8) & 0xFF) | (((x) & 0xFF)<<8) )
#define HostToPcWord(x) ( (((x)>>8) & 0xFF) | (((x) & 0xFF)<<8) )
#endif
#endif