/*====================================================================*
 *
 *   _bswap.c - byte swap functions;
 *
 *   endian.h
 *
 *   alternative byte-swap functions for systems without them, such 
 *   as Microsoft Windows;
 *
 *.  Motley Tools by Charles Maier <cmaier@cmassoc.net>;
 *:  Published 2001-2006 by Charles Maier Associates Limited;
 *;  Released under the GNU General Public Licence v2 and later;
 *
 *--------------------------------------------------------------------*/

#ifndef _BSWAP_SOURCE
#define _BSWAP_SOURCE

#include <stdint.h>

#include "../tools/endian.h"

uint16_t __bswap_16 (uint16_t x) 

{
	endian (&x, sizeof (x));
	return (x);
}

uint32_t __bswap_32 (uint32_t x) 

{
	endian (&x, sizeof (x));
	return (x);
}

uint64_t __bswap_64 (uint64_t x) 

{
	endian (&x, sizeof (x));
	return (x);
}

#endif