diff options
author | Leo Tenenbaum <pommicket@gmail.com> | 2020-12-22 17:24:03 -0500 |
---|---|---|
committer | Leo Tenenbaum <pommicket@gmail.com> | 2020-12-22 17:24:03 -0500 |
commit | bf906b2d5e1ddc5d77c06197d1105246e77b101a (patch) | |
tree | b4e5ec39bdc077206b2e0cb0e35dd39c560a113e /base.h | |
parent | c65b9f4b9faa734cb9c8804ccda0fa97f60e6381 (diff) |
undo actually not quite done yet
Diffstat (limited to 'base.h')
-rw-r--r-- | base.h | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -24,16 +24,26 @@ typedef uint16_t u16; typedef uint32_t u32; typedef uint64_t u64; +// (for u8 and u16, you can use %u) #define U32_FMT "%" PRIu32 #define U64_FMT "%" PRIu64 +#define U8_MAX 0xff +#define U16_MAX 0xffff +#define U32_MAX 0xffffffff +#define U64_MAX 0xffffffffffffffff typedef int8_t i8; typedef int16_t i16; typedef int32_t i32; typedef int64_t i64; +// (for i8 and i16, you can use %d) #define I32_FMT "%" PRId32 #define I64_FMT "%" PRId64 +#define I8_MAX 0x7f +#define I16_MAX 0x7fff +#define I32_MAX 0x7fffffff +#define I64_MAX 0x7fffffffffffffff typedef unsigned int uint; typedef unsigned long ulong; |