diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2010-05-13 12:32:03 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2010-05-13 12:32:03 (GMT) |
commit | 118a668adbf6ca9d4c549618e54f58330f46ce58 (patch) | |
tree | 10e75f1a7e83ab48aba82a5a595441a065a6037e /src/common/endianness.h | |
parent | e56b4db3aae87f0458319019635dea4968a5c529 (diff) |
Supported Dalvik VM / DEX (partially).
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@155 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
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) |