libaaruformat 1.0 Aaru Data Preservation Suite - Format Library

Loading...
Searching...
No Matches
endian.h File Reference
`#include <stdint.h>`

Go to the source code of this file.

## Macros
#define | bswap_16(x)
#define | bswap_32(x)
#define | bswap_64(x)

## Macro Definition Documentation

## ◆ bswap_16

#define bswap_16 | ( |  | x | ) |

Value:
((uint16_t)((((uint16_t)(x) & 0xff00) >> 8) | (((uint16_t)(x) & 0x00ff) << 8)))

Definition at line 77 of file endian.h.

## ◆ bswap_32

#define bswap_32 | ( |  | x | ) |

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

Definition at line 78 of file endian.h.

## ◆ bswap_64

#define bswap_64 | ( |  | x | ) |

Value:
((uint64_t)((((uint64_t)(x) & 0xff00000000000000ULL) >> 56) | (((uint64_t)(x) & 0x00ff000000000000ULL) >> 40) | \
(((uint64_t)(x) & 0x0000ff0000000000ULL) >> 24) | (((uint64_t)(x) & 0x000000ff00000000ULL) >> 8) | \
(((uint64_t)(x) & 0x00000000ff000000ULL) << 8) | (((uint64_t)(x) & 0x0000000000ff0000ULL) << 24) | \
(((uint64_t)(x) & 0x000000000000ff00ULL) << 40) | (((uint64_t)(x) & 0x00000000000000ffULL) << 56)))

Definition at line 81 of file endian.h.

Referenced by aaruf_verify_image(), process_data_block(), process_dumphw_block(), process_tracks_block(), verify_index_v1(), verify_index_v2(), and verify_index_v3().