OpenTTD Source 20241224-master-gee860a5c8e
endian_func.hpp File Reference

Function to handling different endian machines. More...

#include "endian_type.hpp"
#include "bitmath_func.hpp"

Go to the source code of this file.

Macros

#define FROM_BE16(x)   (x)
 
#define FROM_BE32(x)   (x)
 
#define TO_BE16(x)   (x)
 
#define TO_BE32(x)   (x)
 
#define TO_BE32X(x)   (x)
 
#define FROM_LE16(x)   BSWAP16(x)
 
#define FROM_LE32(x)   BSWAP32(x)
 
#define TO_LE16(x)   BSWAP16(x)
 
#define TO_LE32(x)   BSWAP32(x)
 
#define TO_LE32X(x)   BSWAP32(x)
 

Detailed Description

Function to handling different endian machines.

Definition in file endian_func.hpp.

Macro Definition Documentation

◆ FROM_BE16

#define FROM_BE16 (   x)    (x)

Definition at line 18 of file endian_func.hpp.

◆ FROM_BE32

#define FROM_BE32 (   x)    (x)

Definition at line 19 of file endian_func.hpp.

◆ FROM_LE16

#define FROM_LE16 (   x)    BSWAP16(x)

Definition at line 23 of file endian_func.hpp.

◆ FROM_LE32

#define FROM_LE32 (   x)    BSWAP32(x)

Definition at line 24 of file endian_func.hpp.

◆ TO_BE16

#define TO_BE16 (   x)    (x)

Definition at line 20 of file endian_func.hpp.

◆ TO_BE32

#define TO_BE32 (   x)    (x)

Definition at line 21 of file endian_func.hpp.

◆ TO_BE32X

#define TO_BE32X (   x)    (x)

Definition at line 22 of file endian_func.hpp.

◆ TO_LE16

#define TO_LE16 (   x)    BSWAP16(x)

Definition at line 25 of file endian_func.hpp.

◆ TO_LE32

#define TO_LE32 (   x)    BSWAP32(x)

Definition at line 26 of file endian_func.hpp.

◆ TO_LE32X

#define TO_LE32X (   x)    BSWAP32(x)

Definition at line 27 of file endian_func.hpp.