VR-Forces 5.0.3 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Functions
trpage_swap.h File Reference

Go to the source code of this file.

Functions

short trpg_byteswap_short (short number)
 
TX_CPPDECL int trpg_byteswap_int (int number)
 
long trpg_byteswap_long (long number)
 
trpgllong trpg_byteswap_llong (trpgllong number)
 
void trpg_byteswap_float_to_4bytes (float number, char result[4])
 
void trpg_byteswap_double_to_8bytes (double number, char result[8])
 
float trpg_byteswap_4bytes_to_float (const char result[4])
 
double trpg_byteswap_8bytes_to_double (const char result[8])
 
TX_CPPDECL trpgEndian trpg_cpu_byte_order (void)
 
void trpg_swap_two (const char *in, char *out)
 
void trpg_swap_four (const char *in, char *out)
 
void trpg_swap_eight (const char *in, char *out)
 
void trpg_swap_sixteen (const char *in, char *out)
 

Function Documentation

short trpg_byteswap_short ( short  number)

Byte swap and return a short {group:Byte Ordering Utilities}.

TX_CPPDECL int trpg_byteswap_int ( int  number)

Byte swap and return an integer {group:Byte Ordering Utilities}.

long trpg_byteswap_long ( long  number)

Byte swap and return a long {group:Byte Ordering Utilities}.

trpgllong trpg_byteswap_llong ( trpgllong  number)

Byte swap and return a 64 bit long {group:Byte Ordering Utilities}.

void trpg_byteswap_float_to_4bytes ( float  number,
char  result[4] 
)

Byte swap a float value into 4 characters. We do it this way to avoid floating point exceptions. {group:Byte Ordering Utilities}.

void trpg_byteswap_double_to_8bytes ( double  number,
char  result[8] 
)

Byte swap a double value into 8 characters. We do it this way to avoid floating point exceptions. {group:Byte Ordering Utilities}.

float trpg_byteswap_4bytes_to_float ( const char  result[4])

Swap 4 bytes into a float and return it {group:Byte Ordering Utilities}.

double trpg_byteswap_8bytes_to_double ( const char  result[8])

Swap 8 bytes into a double and return it {group:Byte Ordering Utilities}.

TX_CPPDECL trpgEndian trpg_cpu_byte_order ( void  )

Determine the current CPU's byte ordering {group:Byte Ordering Utilities}.

void trpg_swap_two ( const char in,
char out 
)

Swap two chars {group:Byte Ordering Utilities}.

void trpg_swap_four ( const char in,
char out 
)

Swap 4 chars {group:Byte Ordering Utilities}.

void trpg_swap_eight ( const char in,
char out 
)

Swap 8 chars {group:Byte Ordering Utilities}.

void trpg_swap_sixteen ( const char in,
char out 
)

Swap sixteen chars {group:Byte Ordering Utilities}.


Document ID: Generated on Thu Jun 1 17:58:13 EDT 2023 from SVN revision 255404
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)