diff options
Diffstat (limited to 'src/common/endianness.h')
-rwxr-xr-x | src/common/endianness.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/common/endianness.h b/src/common/endianness.h index f9d421e..f729ac5 100755 --- a/src/common/endianness.h +++ b/src/common/endianness.h @@ -26,7 +26,6 @@ #include <stdbool.h> -#include <sys/types.h> #include "../arch/archbase.h" @@ -43,6 +42,9 @@ typedef enum _SourceEndian } SourceEndian; +/* Lit un nombre non signé sur 4 bits. */ +bool read_u4(uint8_t *, const bin_t *, off_t *, off_t, bool *, SourceEndian); + /* Lit un nombre non signé sur un octet. */ bool read_u8(uint8_t *, const bin_t *, off_t *, off_t, SourceEndian); @@ -56,6 +58,7 @@ bool read_u32(uint32_t *, const bin_t *, off_t *, off_t, SourceEndian); bool read_u64(uint64_t *, const bin_t *, off_t *, off_t, SourceEndian); +#define read_s4(target, data, pos, len, low, endian) read_u4((uint8_t *)target, data, pos, len, low, endian) #define read_s8(target, data, pos, len, endian) read_u8((uint8_t *)target, data, pos, len, endian) #define read_s16(target, data, pos, len, endian) read_u16((uint16_t *)target, data, pos, len, endian) #define read_s32(target, data, pos, len, endian) read_u32((uint32_t *)target, data, pos, len, endian) |