diff options
author | Tomasz Kramkowski <tk@the-tk.com> | 2020-09-12 00:52:46 +0100 |
---|---|---|
committer | Tomasz Kramkowski <tk@the-tk.com> | 2020-09-12 00:52:46 +0100 |
commit | 2c54cca234c95b232f59d9e5e478dcfac903823f (patch) | |
tree | abcc36f0cb1ba81878830be66613d67644a512f4 /common.h | |
parent | 2661c26164b52be7c029eb735f6932d17054fc62 (diff) | |
download | pack-2c54cca234c95b232f59d9e5e478dcfac903823f.tar.gz pack-2c54cca234c95b232f59d9e5e478dcfac903823f.tar.xz pack-2c54cca234c95b232f59d9e5e478dcfac903823f.zip |
Move BITMASK and endian enum to common.h
Diffstat (limited to 'common.h')
-rw-r--r-- | common.h | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -5,8 +5,13 @@ #ifndef PACK_INTERNAL_H #define PACK_INTERNAL_H +#include <limits.h> #include <stddef.h> +#define BITMASK(n) (UINTMAX_MAX >> (sizeof (uintmax_t) * CHAR_BIT - n)) + +enum endian { BIG, LITTLE }; + size_t getsize(char c); #endif // !PACK_INTERNAL_H |