added missing member initialization.
[swftools.git] / pdf2swf / ttf2pt1 / byteorder.h
blobc139817e51892789d131e4565c79b6652296fcc6
1 /*
2 * see COPYRIGHT
3 */
5 /* This defines the macroes ntohs and ntohl, which convert short and long
6 ints from network order (used on 68000 chips, and in TrueType font
7 files) to whatever order your computer uses. #define _BIG_ENDIAN or not
8 to control which set of definitions apply. If you don't know, try both. If
9 you have a peculiar machine you're on your own.
12 #if defined(_BIG_ENDIAN)
13 #define ntohl(x) (x)
14 #define ntohs(x) (x)
15 #else
16 #define ntohs(x) \
17 ((USHORT)((((USHORT)(x) & 0x00ff) << 8) | \
18 (((USHORT)(x) & 0xff00) >> 8)))
19 #define ntohl(x) \
20 ((ULONG)((((ULONG)(x) & 0x000000ffU) << 24) | \
21 (((ULONG)(x) & 0x0000ff00U) << 8) | \
22 (((ULONG)(x) & 0x00ff0000U) >> 8) | \
23 (((ULONG)(x) & 0xff000000U) >> 24)))
24 #endif