Open Inventor Reference
SoMachine.h File Reference

Go to the source code of this file.

Macros

#define __i386__   1
 
#define MACHINE_WORD_FORMAT   DGL_LITTLE_ENDIAN
 
#define MACHINE_FLOAT_FORMAT   DGL_NON_IEEE
 
#define MACHINE_WORD_FORMAT   DGL_LITTLE_ENDIAN
 
#define MACHINE_FLOAT_FORMAT   DGL_NON_IEEE
 
#define M_SIZEOF(x)   sizeof(x)
 
#define DGL_LITTLE_ENDIAN   1 /* integer formats */
 
#define DGL_BIG_ENDIAN   2
 
#define DGL_BIG_IEEE   1 /* floating point formats */
 
#define DGL_NON_IEEE   3
 
#define DGL_HTON_SHORT(t, f)
 
#define DGL_NTOH_SHORT   DGL_HTON_SHORT
 
#define DGL_HTON_INT32(t, f)
 
#define DGL_NTOH_INT32   DGL_HTON_INT32
 
#define DGL_HTON_FLOAT(t, f)   mem_hton_float(&t,&f)
 
#define DGL_NTOH_FLOAT(t, f)   mem_ntoh_float(&t,&f)
 
#define DGL_HTON_DOUBLE(t, f)   mem_hton_double(&t,&f)
 
#define DGL_NTOH_DOUBLE(t, f)   mem_ntoh_double(&t,&f)
 
#define INT32(p)   (*(int32_t *)(p))
 
#define FLOAT(p)   (*(float *)(p))
 
#define DOUBLE(p)   (*(double *)(p))
 
#define SHORT(p)   (*(short *)(p))
 

Functions

void mem_hton_float (float *t, float *f)
 
void mem_ntoh_float (float *t, float *f)
 
void mem_hton_double (double *t, double *f)
 
void mem_ntoh_double (double *t, double *f)
 

Macro Definition Documentation

◆ __i386__

#define __i386__   1

Definition at line 76 of file SoMachine.h.

◆ DGL_BIG_ENDIAN

#define DGL_BIG_ENDIAN   2

Definition at line 126 of file SoMachine.h.

◆ DGL_BIG_IEEE

#define DGL_BIG_IEEE   1 /* floating point formats */

Definition at line 128 of file SoMachine.h.

◆ DGL_HTON_DOUBLE

#define DGL_HTON_DOUBLE (   t,
 
)    mem_hton_double(&t,&f)

Definition at line 201 of file SoMachine.h.

◆ DGL_HTON_FLOAT

#define DGL_HTON_FLOAT (   t,
 
)    mem_hton_float(&t,&f)

Definition at line 199 of file SoMachine.h.

◆ DGL_HTON_INT32

#define DGL_HTON_INT32 (   t,
 
)
Value:
{ \
int32_t _from = f,_to; \
((char *)&_to)[0] = ((char *)&_from)[3]; \
((char *)&_to)[1] = ((char *)&_from)[2]; \
((char *)&_to)[2] = ((char *)&_from)[1]; \
((char *)&_to)[3] = ((char *)&_from)[0]; \
t = _to; \
}

Definition at line 173 of file SoMachine.h.

◆ DGL_HTON_SHORT

#define DGL_HTON_SHORT (   t,
 
)
Value:
{ \
short _from = f,_to; \
((char *)&_to)[0] = ((char *)&_from)[1]; \
((char *)&_to)[1] = ((char *)&_from)[0]; \
t = _to; \
}

Definition at line 165 of file SoMachine.h.

◆ DGL_LITTLE_ENDIAN

#define DGL_LITTLE_ENDIAN   1 /* integer formats */

Definition at line 125 of file SoMachine.h.

◆ DGL_NON_IEEE

#define DGL_NON_IEEE   3

Definition at line 129 of file SoMachine.h.

◆ DGL_NTOH_DOUBLE

#define DGL_NTOH_DOUBLE (   t,
 
)    mem_ntoh_double(&t,&f)

Definition at line 202 of file SoMachine.h.

◆ DGL_NTOH_FLOAT

#define DGL_NTOH_FLOAT (   t,
 
)    mem_ntoh_float(&t,&f)

Definition at line 200 of file SoMachine.h.

◆ DGL_NTOH_INT32

#define DGL_NTOH_INT32   DGL_HTON_INT32

Definition at line 182 of file SoMachine.h.

◆ DGL_NTOH_SHORT

#define DGL_NTOH_SHORT   DGL_HTON_SHORT

Definition at line 172 of file SoMachine.h.

◆ DOUBLE

#define DOUBLE (   p)    (*(double *)(p))

Definition at line 212 of file SoMachine.h.

◆ FLOAT

#define FLOAT (   p)    (*(float *)(p))

Definition at line 211 of file SoMachine.h.

◆ INT32

#define INT32 (   p)    (*(int32_t *)(p))

Definition at line 210 of file SoMachine.h.

◆ M_SIZEOF

#define M_SIZEOF (   x)    sizeof(x)

Definition at line 119 of file SoMachine.h.

◆ MACHINE_FLOAT_FORMAT [1/2]

#define MACHINE_FLOAT_FORMAT   DGL_NON_IEEE

Definition at line 105 of file SoMachine.h.

◆ MACHINE_FLOAT_FORMAT [2/2]

#define MACHINE_FLOAT_FORMAT   DGL_NON_IEEE

Definition at line 105 of file SoMachine.h.

◆ MACHINE_WORD_FORMAT [1/2]

#define MACHINE_WORD_FORMAT   DGL_LITTLE_ENDIAN

Definition at line 104 of file SoMachine.h.

◆ MACHINE_WORD_FORMAT [2/2]

#define MACHINE_WORD_FORMAT   DGL_LITTLE_ENDIAN

Definition at line 104 of file SoMachine.h.

◆ SHORT

#define SHORT (   p)    (*(short *)(p))

Definition at line 213 of file SoMachine.h.

Function Documentation

◆ mem_hton_double()

void mem_hton_double ( double *  t,
double *  f 
)

◆ mem_hton_float()

void mem_hton_float ( float *  t,
float *  f 
)

◆ mem_ntoh_double()

void mem_ntoh_double ( double *  t,
double *  f 
)

◆ mem_ntoh_float()

void mem_ntoh_float ( float *  t,
float *  f 
)