CrystalSpace

Public API Reference

Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

csendian.h File Reference

More...

#include <math.h>
#include "cstypes.h"
#include "qint.h"

Go to the source code of this file.

Helpers for dealing with endianness

uint64 big_endian_longlong (uint64 l)
 Convert a longlong from big-endian to machine format. More...

uint32 big_endian_long (uint32 l)
 Convert a long from big-endian to machine format. More...

uint16 big_endian_short (uint16 s)
 Convert a short from big-endian to machine format. More...

float big_endian_float (float f)
 Convert a big-endian floating-point number to machine format. More...

uint64 little_endian_longlong (uint64 l)
 Convert a longlong from little-endian to machine format. More...

uint32 little_endian_long (uint32 l)
 Convert a long from little-endian to machine format. More...

uint16 little_endian_short (uint16 s)
 Convert a short from little-endian to machine format. More...

float little_endian_float (float f)
 Convert a little-endian floating-point number to machine format. More...

int32 float2long (float f)
 Convert a float to a cross-platform 32-bit format (no endianess adjustments!). More...

float long2float (int32 l)
 Convert a 32-bit cross-platform float to native format (no endianess adjustments!). More...

int64 double2longlong (double d)
 Convert a double to a cross-platform 64-bit format (no endianess adjustments!). More...

double longlong2double (int64 i)
 Convert a 64-bit cross-platform double to native format (no endianess adjustments!). More...

short float2short (float f)
 Convert a float to a cross-platform 16-bit format (no endianess adjustments!). More...

float short2float (short s)
 Convert a 16-bit cross-platform float to native format (no endianess adjustments!). More...

uint64 convert_endian (uint64 l)
 Swap the bytes in a uint64 value. More...

int64 convert_endian (int64 l)
 Swap the bytes in a int64 value. More...

uint32 convert_endian (uint32 l)
 Swap the bytes in a uint32 value. More...

int32 convert_endian (int32 l)
 Swap the bytes in a int32 value. More...

int16 convert_endian (int16 s)
 Swap the bytes in a int16 value. More...

uint16 convert_endian (uint16 s)
 Swap the bytes in a uint16 value. More...

float convert_endian (float f)
 Swap the bytes in a float value. More...

uint16 get_le_short (void *buff)
 Read a little-endian short from address. More...

uint32 get_le_long (void *buff)
 Read a little-endian long from address. More...

float get_le_float32 (void *buff)
 Read a little-endian 32-bit float from address. More...

float get_le_float16 (void *buff)
 Read a little-endian 16-bit float from address. More...

void set_le_short (void *buff, uint16 s)
 Set a little-endian short on a address. More...

void set_le_long (void *buff, uint32 l)
 Set a little-endian long on a address. More...

void set_le_float32 (void *buff, float f)
 Set a little-endian 32-bit float on a address. More...

void set_le_float16 (void *buff, float f)
 Set a little-endian 16-bit float on a address. More...


Detailed Description

Definition in file csendian.h.


Generated for Crystal Space by doxygen 1.2.14