SWAPBYTE - Functions to SWAP the BYTE order of binary data swap_short_2 swap a short integer swap_u_short_2 swap an unsigned short integer swap_int_4 swap a 4 byte integer swap_u_int_4 swap an unsigned integer swap_long_4 swap a long integer swap_u_long_4 swap an unsigned long integer swap_float_4 swap a float swap_double_8 swap a double Function Prototypes: void swap_short_2(short *tni2); void swap_u_short_2(unsigned short *tni2); void swap_int_4(int *tni4); void swap_u_int_4(unsigned int *tni4); void swap_long_4(long *tni4); void swap_u_long_4(unsigned long *tni4); void swap_float_4(float *tnf4); void swap_double_8(double *tndd8); Notes: These routines are necessary for reversing the byte order of binary data for transportation between big-endian and little-endian machines. Examples of big-endian machines are IBM RS6000, SUN, NeXT. Examples of little endian machines are PC's and DEC. These routines have been tested with PC data and run on PC's running several PC versions of UNIX, but have not been tested on DEC. Also, the number appended to the name of the routine refers to the number of bytes that the item is assumed to be. Authors: Jens Hartmann, Institut fur Geophysik, Hamburg, Jun 1993 John Stockwell, CWP, Colorado School of Mines, Jan 1994