csutil/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. | |
uint32 | big_endian_long (uint32 l) |
Convert a long from big-endian to machine format. | |
uint16 | big_endian_short (uint16 s) |
Convert a short from big-endian to machine format. | |
float | big_endian_float (float f) |
Convert a big-endian floating-point number to machine format. | |
uint64 | little_endian_longlong (uint64 l) |
Convert a longlong from little-endian to machine format. | |
uint32 | little_endian_long (uint32 l) |
Convert a long from little-endian to machine format. | |
uint16 | little_endian_short (uint16 s) |
Convert a short from little-endian to machine format. | |
float | little_endian_float (float f) |
Convert a little-endian floating-point number to machine format. | |
int32 | float2long (float f) |
Convert a float to a cross-platform 32-bit format (no endianess adjustments!). | |
float | long2float (int32 l) |
Convert a 32-bit cross-platform float to native format (no endianess adjustments!). | |
int64 | double2longlong (double d) |
Convert a double to a cross-platform 64-bit format (no endianess adjustments!). | |
double | longlong2double (int64 i) |
Convert a 64-bit cross-platform double to native format (no endianess adjustments!). | |
short | float2short (float f) |
Convert a float to a cross-platform 16-bit format (no endianess adjustments!). | |
float | short2float (short s) |
Convert a 16-bit cross-platform float to native format (no endianess adjustments!). | |
uint64 | convert_endian (uint64 l) |
Swap the bytes in a uint64 value. | |
int64 | convert_endian (int64 l) |
Swap the bytes in a int64 value. | |
uint32 | convert_endian (uint32 l) |
Swap the bytes in a uint32 value. | |
int32 | convert_endian (int32 l) |
Swap the bytes in a int32 value. | |
int16 | convert_endian (int16 s) |
Swap the bytes in a int16 value. | |
uint16 | convert_endian (uint16 s) |
Swap the bytes in a uint16 value. | |
float | convert_endian (float f) |
Swap the bytes in a float value. | |
uint16 | get_le_short (void *buff) |
Read a little-endian short from address. | |
uint32 | get_le_long (void *buff) |
Read a little-endian long from address. | |
float | get_le_float32 (void *buff) |
Read a little-endian 32-bit float from address. | |
float | get_le_float16 (void *buff) |
Read a little-endian 16-bit float from address. | |
void | set_le_short (void *buff, uint16 s) |
Set a little-endian short on a address. | |
void | set_le_long (void *buff, uint32 l) |
Set a little-endian long on a address. | |
void | set_le_float32 (void *buff, float f) |
Set a little-endian 32-bit float on a address. | |
void | set_le_float16 (void *buff, float f) |
Set a little-endian 16-bit float on a address. |
Detailed Description
Definition in file csendian.h.
Generated for Crystal Space by doxygen 1.2.18