/* INTEGER BYTE ORDER 16-BIT 32-BIT -------------------------------- FITS B1 B0 B3 B2 B1 B0 MOTOROLA B1 B0 B3 B2 B1 B0 DATA GENERAL B1 B0 B3 B2 B1 B0 MACINTOSH B1 B0 B3 B2 B1 B0 APOLLO B1 B0 B3 B2 B1 B0 SPARC B1 B0 B3 B2 B1 B0 SUN B1 B0 B3 B2 B1 B0 IBM 360/370 B1 B0 B3 B2 B1 B0 INTEL B0 B1 B0 B1 B2 B3 IBM PC B0 B1 B0 B1 B2 B3 VAX B0 B1 B0 B1 B2 B3 DEC STATION B0 B1 B0 B1 B2 B3 PDP B0 B1 B2 B3 B0 B1 -------------------------------- This program will swap bytes when SWAPBYTES is defined. Remove "#define SWAPBYTES" when swapping is not necessary. *****/ #define SWAPBYTES #define TWO_BYTES 2 /* Constants for the byte swapping function */ #define FOUR_BYTES 4 #define GOOD 1 #define BAD 0 short dcwSwapBytes( char *in, short Bytes ); short dcwSwapShort( short ); long dcwSwapLong( long );