FrontISTR  5.7.0
Large-scale structural analysis program with finit element method
hecmw_vis_endian.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define SWAP_SHORT(Var)   Var = *(short*)SwapEndian((void*)&Var, sizeof(short))
 
#define SWAP_INT(Var)   Var = *(int*)SwapEndian((void*)&Var, sizeof(int))
 
#define SWAP_USHORT(Var)   Var = *(unsigned short*)SwapEndian((void*)&Var, sizeof(short))
 
#define SWAP_LONG(Var)   Var = *(long*)SwapEndian((void*)&Var, sizeof(long))
 
#define SWAP_ULONG(Var)   Var = *(unsigned long*)SwapEndian((void*)&Var, sizeof(long))
 
#define SWAP_RGB(Var)   Var = *(int*)SwapEndian((void*)&Var, 3)
 
#define SWAP_FLOAT(Var)   Var = *(float*)SwapEndian((void*)&Var, sizeof(float))
 
#define SWAP_DOUBLE(Var)   Var = *(double*)SwapEndian((void*)&Var, sizeof(double))
 

Functions

int IsLittleEndian (void)
 
void * SwapEndian (void *Addr, const int Nb)
 

Macro Definition Documentation

◆ SWAP_DOUBLE

#define SWAP_DOUBLE (   Var)    Var = *(double*)SwapEndian((void*)&Var, sizeof(double))

Definition at line 26 of file hecmw_vis_endian.h.

◆ SWAP_FLOAT

#define SWAP_FLOAT (   Var)    Var = *(float*)SwapEndian((void*)&Var, sizeof(float))

Definition at line 25 of file hecmw_vis_endian.h.

◆ SWAP_INT

#define SWAP_INT (   Var)    Var = *(int*)SwapEndian((void*)&Var, sizeof(int))

Definition at line 18 of file hecmw_vis_endian.h.

◆ SWAP_LONG

#define SWAP_LONG (   Var)    Var = *(long*)SwapEndian((void*)&Var, sizeof(long))

Definition at line 21 of file hecmw_vis_endian.h.

◆ SWAP_RGB

#define SWAP_RGB (   Var)    Var = *(int*)SwapEndian((void*)&Var, 3)

Definition at line 24 of file hecmw_vis_endian.h.

◆ SWAP_SHORT

#define SWAP_SHORT (   Var)    Var = *(short*)SwapEndian((void*)&Var, sizeof(short))

Definition at line 17 of file hecmw_vis_endian.h.

◆ SWAP_ULONG

#define SWAP_ULONG (   Var)    Var = *(unsigned long*)SwapEndian((void*)&Var, sizeof(long))

Definition at line 22 of file hecmw_vis_endian.h.

◆ SWAP_USHORT

#define SWAP_USHORT (   Var)    Var = *(unsigned short*)SwapEndian((void*)&Var, sizeof(short))

Definition at line 19 of file hecmw_vis_endian.h.

Function Documentation

◆ IsLittleEndian()

int IsLittleEndian ( void  )

Definition at line 10 of file hecmw_vis_endian.c.

◆ SwapEndian()

void* SwapEndian ( void *  Addr,
const int  Nb 
)

Definition at line 18 of file hecmw_vis_endian.c.