xoreos  0.0.5
Macros | Typedefs
types.h File Reference

Low-level type definitions to handle fixed width types portably. More...

#include <cstddef>
#include <climits>
Include dependency graph for types.h:

Go to the source code of this file.

Macros

#define SIZE_MAX   ((size_t) -1)
 
#define PRId64   "lld"
 
#define Cd64(x)   ((signed long long) (x))
 
#define PRIu64   "llu"
 
#define Cu64(x)   ((unsigned long long) (x))
 
#define INT64_C(c)   (c ## LL)
 
#define UINT64_C(c)   (c ## ULL)
 
#define UINT8_MAX   0xFF
 
#define UINT16_MAX   0xFFFF
 
#define UINT32_MAX   0xFFFFFFFF
 
#define UINT64_MAX   UINT64_C(0xFFFFFFFFFFFFFFFF)
 
#define INT8_MAX   0x7F
 
#define INT16_MAX   0x7FFF
 
#define INT32_MAX   0x7FFFFFFF
 
#define INT64_MAX   INT64_C(0x7FFFFFFFFFFFFFFF)
 
#define INT8_MIN   (-INT8_MAX - 1)
 
#define INT16_MIN   (-INT16_MAX - 1)
 
#define INT32_MIN   (-INT32_MAX - 1)
 
#define INT64_MIN   (-INT64_MAX - INT64_C(1))
 

Typedefs

typedef int8_t int8
 
typedef uint8_t uint8
 
typedef int16_t int16
 
typedef uint16_t uint16
 
typedef int32_t int32
 
typedef uint32_t uint32
 
typedef int64_t int64
 
typedef uint64_t uint64
 
typedef uint8 byte
 
typedef unsigned int uint
 

Detailed Description

Low-level type definitions to handle fixed width types portably.

Definition in file types.h.

Macro Definition Documentation

◆ Cd64

#define Cd64 (   x)    ((signed long long) (x))

Definition at line 178 of file types.h.

◆ Cu64

#define Cu64 (   x)    ((unsigned long long) (x))

Definition at line 186 of file types.h.

◆ INT16_MAX

#define INT16_MAX   0x7FFF

Definition at line 241 of file types.h.

◆ INT16_MIN

#define INT16_MIN   (-INT16_MAX - 1)

Definition at line 254 of file types.h.

◆ INT32_MAX

#define INT32_MAX   0x7FFFFFFF

Definition at line 244 of file types.h.

◆ INT32_MIN

#define INT32_MIN   (-INT32_MAX - 1)

Definition at line 257 of file types.h.

◆ INT64_C

#define INT64_C (   c)    (c ## LL)

Definition at line 215 of file types.h.

◆ INT64_MAX

#define INT64_MAX   INT64_C(0x7FFFFFFFFFFFFFFF)

Definition at line 247 of file types.h.

◆ INT64_MIN

#define INT64_MIN   (-INT64_MAX - INT64_C(1))

Definition at line 260 of file types.h.

◆ INT8_MAX

#define INT8_MAX   0x7F

Definition at line 238 of file types.h.

◆ INT8_MIN

#define INT8_MIN   (-INT8_MAX - 1)

Definition at line 251 of file types.h.

◆ PRId64

#define PRId64   "lld"

Definition at line 177 of file types.h.

◆ PRIu64

#define PRIu64   "llu"

Definition at line 185 of file types.h.

◆ SIZE_MAX

#define SIZE_MAX   ((size_t) -1)

◆ UINT16_MAX

#define UINT16_MAX   0xFFFF

Definition at line 228 of file types.h.

◆ UINT32_MAX

#define UINT32_MAX   0xFFFFFFFF

◆ UINT64_C

#define UINT64_C (   c)    (c ## ULL)

Definition at line 220 of file types.h.

Referenced by readNintendoFixedPoint().

◆ UINT64_MAX

#define UINT64_MAX   UINT64_C(0xFFFFFFFFFFFFFFFF)

Definition at line 234 of file types.h.

◆ UINT8_MAX

#define UINT8_MAX   0xFF

Typedef Documentation

◆ byte

typedef uint8 byte

Definition at line 209 of file types.h.

◆ int16

typedef int16_t int16

Definition at line 201 of file types.h.

◆ int32

typedef int32_t int32

Definition at line 203 of file types.h.

◆ int64

typedef int64_t int64

Definition at line 205 of file types.h.

◆ int8

typedef int8_t int8

Definition at line 199 of file types.h.

◆ uint

typedef unsigned int uint

Definition at line 211 of file types.h.

◆ uint16

typedef uint16_t uint16

Definition at line 202 of file types.h.

◆ uint32

typedef uint32_t uint32

Definition at line 204 of file types.h.

◆ uint64

typedef uint64_t uint64

Definition at line 206 of file types.h.

◆ uint8

typedef uint8_t uint8

Definition at line 200 of file types.h.