Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

bytes.h File Reference

#include <config.h>
#include <byteswap.h>

Include dependency graph for bytes.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define BE_TO_CPU_FLOAT(ret, val)   SWAP_FLOAT(ret, val)
#define BE_TO_CPU_INT16(ret, val)   (ret = bswap_16(val))
#define BE_TO_CPU_INT32(ret, val)   (ret = bswap_32(val))
#define LE_TO_CPU_FLOAT(ret, val)   (ret = val)
#define LE_TO_CPU_INT16(ret, val)   (ret = val)
#define LE_TO_CPU_INT32(ret, val)   (ret = val)
#define SWAP_FLOAT(x, y)   do { *(unsigned int *)&x = bswap_32( *(unsigned int *)&y ); } while (0)


Define Documentation

#define BE_TO_CPU_FLOAT ret,
val   )     SWAP_FLOAT(ret, val)
 

Definition at line 56 of file bytes.h.

#define BE_TO_CPU_INT16 ret,
val   )     (ret = bswap_16(val))
 

Definition at line 52 of file bytes.h.

#define BE_TO_CPU_INT32 ret,
val   )     (ret = bswap_32(val))
 

Definition at line 54 of file bytes.h.

Referenced by readUint().

#define LE_TO_CPU_FLOAT ret,
val   )     (ret = val)
 

Definition at line 62 of file bytes.h.

Referenced by StarDatabase::loadBinary(), StarDatabase::loadOldFormatBinary(), readFloat(), and writeFloat().

#define LE_TO_CPU_INT16 ret,
val   )     (ret = val)
 

Definition at line 58 of file bytes.h.

Referenced by ignoreValue(), StarDatabase::loadBinary(), StarDatabase::loadCrossIndex(), StarDatabase::loadOldFormatBinary(), readInt16(), readShort(), readTypeString(), readUshort(), writeInt16(), writeShort(), and writeUshort().

#define LE_TO_CPU_INT32 ret,
val   )     (ret = val)
 

Definition at line 60 of file bytes.h.

Referenced by StarDatabase::loadBinary(), StarDatabase::loadCrossIndex(), LoadDDSImage(), StarDatabase::loadOldFormatBinary(), readInt(), readUint(), and writeUint().

#define SWAP_FLOAT x,
y   )     do { *(unsigned int *)&x = bswap_32( *(unsigned int *)&y ); } while (0)
 

Definition at line 34 of file bytes.h.


Generated on Sat Jan 14 22:32:56 2006 for Celestia by  doxygen 1.4.1