Electroneum
Loading...
Searching...
No Matches
int-util.h File Reference
#include <assert.h>
#include <stdbool.h>
#include <stdint.h>
#include <string.h>
#include <sys/param.h>
Include dependency graph for int-util.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define IDENT32(x)
#define IDENT64(x)
#define SWAP32(x)
#define SWAP64(x)
#define UNUSED
#define SWAP32LE   IDENT32
#define SWAP32BE   SWAP32
#define swap32le   ident32
#define swap32be   swap32
#define mem_inplace_swap32le   mem_inplace_ident
#define mem_inplace_swap32be   mem_inplace_swap32
#define memcpy_swap32le   memcpy_ident32
#define memcpy_swap32be   memcpy_swap32
#define SWAP64LE   IDENT64
#define SWAP64BE   SWAP64
#define swap64le   ident64
#define swap64be   swap64
#define mem_inplace_swap64le   mem_inplace_ident
#define mem_inplace_swap64be   mem_inplace_swap64
#define memcpy_swap64le   memcpy_ident64
#define memcpy_swap64be   memcpy_swap64

Macro Definition Documentation

◆ IDENT32

#define IDENT32 ( x)
Value:
((uint32_t) (x))
unsigned int uint32_t
Definition stdint.h:126

Definition at line 133 of file int-util.h.

◆ IDENT64

#define IDENT64 ( x)
Value:
((uint64_t) (x))
unsigned __int64 uint64_t
Definition stdint.h:136

Definition at line 134 of file int-util.h.

◆ mem_inplace_swap32be

#define mem_inplace_swap32be   mem_inplace_swap32

Definition at line 229 of file int-util.h.

◆ mem_inplace_swap32le

#define mem_inplace_swap32le   mem_inplace_ident

Definition at line 228 of file int-util.h.

◆ mem_inplace_swap64be

#define mem_inplace_swap64be   mem_inplace_swap64

Definition at line 237 of file int-util.h.

◆ mem_inplace_swap64le

#define mem_inplace_swap64le   mem_inplace_ident

Definition at line 236 of file int-util.h.

◆ memcpy_swap32be

#define memcpy_swap32be   memcpy_swap32

Definition at line 231 of file int-util.h.

◆ memcpy_swap32le

#define memcpy_swap32le   memcpy_ident32

Definition at line 230 of file int-util.h.

◆ memcpy_swap64be

#define memcpy_swap64be   memcpy_swap64

Definition at line 239 of file int-util.h.

◆ memcpy_swap64le

#define memcpy_swap64le   memcpy_ident64

Definition at line 238 of file int-util.h.

◆ SWAP32

#define SWAP32 ( x)
Value:
((((uint32_t) (x) & 0x000000ff) << 24) | \
(((uint32_t) (x) & 0x0000ff00) << 8) | \
(((uint32_t) (x) & 0x00ff0000) >> 8) | \
(((uint32_t) (x) & 0xff000000) >> 24))

Definition at line 136 of file int-util.h.

136#define SWAP32(x) ((((uint32_t) (x) & 0x000000ff) << 24) | \
137 (((uint32_t) (x) & 0x0000ff00) << 8) | \
138 (((uint32_t) (x) & 0x00ff0000) >> 8) | \
139 (((uint32_t) (x) & 0xff000000) >> 24))

◆ SWAP32BE

#define SWAP32BE   SWAP32

Definition at line 225 of file int-util.h.

◆ swap32be

#define swap32be   swap32

Definition at line 227 of file int-util.h.

◆ SWAP32LE

#define SWAP32LE   IDENT32

Definition at line 224 of file int-util.h.

◆ swap32le

#define swap32le   ident32

Definition at line 226 of file int-util.h.

◆ SWAP64

#define SWAP64 ( x)
Value:
((((uint64_t) (x) & 0x00000000000000ff) << 56) | \
(((uint64_t) (x) & 0x000000000000ff00) << 40) | \
(((uint64_t) (x) & 0x0000000000ff0000) << 24) | \
(((uint64_t) (x) & 0x00000000ff000000) << 8) | \
(((uint64_t) (x) & 0x000000ff00000000) >> 8) | \
(((uint64_t) (x) & 0x0000ff0000000000) >> 24) | \
(((uint64_t) (x) & 0x00ff000000000000) >> 40) | \
(((uint64_t) (x) & 0xff00000000000000) >> 56))

Definition at line 140 of file int-util.h.

140#define SWAP64(x) ((((uint64_t) (x) & 0x00000000000000ff) << 56) | \
141 (((uint64_t) (x) & 0x000000000000ff00) << 40) | \
142 (((uint64_t) (x) & 0x0000000000ff0000) << 24) | \
143 (((uint64_t) (x) & 0x00000000ff000000) << 8) | \
144 (((uint64_t) (x) & 0x000000ff00000000) >> 8) | \
145 (((uint64_t) (x) & 0x0000ff0000000000) >> 24) | \
146 (((uint64_t) (x) & 0x00ff000000000000) >> 40) | \
147 (((uint64_t) (x) & 0xff00000000000000) >> 56))

◆ SWAP64BE

#define SWAP64BE   SWAP64

Definition at line 233 of file int-util.h.

◆ swap64be

#define swap64be   swap64

Definition at line 235 of file int-util.h.

◆ SWAP64LE

#define SWAP64LE   IDENT64

Definition at line 232 of file int-util.h.

◆ swap64le

#define swap64le   ident64

Definition at line 234 of file int-util.h.

◆ UNUSED

#define UNUSED

Definition at line 175 of file int-util.h.