From 2c54cca234c95b232f59d9e5e478dcfac903823f Mon Sep 17 00:00:00 2001 From: Tomasz Kramkowski Date: Sat, 12 Sep 2020 00:52:46 +0100 Subject: Move BITMASK and endian enum to common.h --- common.h | 5 +++++ unpack.c | 5 ----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/common.h b/common.h index 821b1cb..0547e3f 100644 --- a/common.h +++ b/common.h @@ -5,8 +5,13 @@ #ifndef PACK_INTERNAL_H #define PACK_INTERNAL_H +#include #include +#define BITMASK(n) (UINTMAX_MAX >> (sizeof (uintmax_t) * CHAR_BIT - n)) + +enum endian { BIG, LITTLE }; + size_t getsize(char c); #endif // !PACK_INTERNAL_H diff --git a/unpack.c b/unpack.c index ebd48f8..8691519 100644 --- a/unpack.c +++ b/unpack.c @@ -5,7 +5,6 @@ #include #include #include -#include #include #include #include @@ -16,10 +15,6 @@ #include "pack.h" #include "trace.h" -enum endian { BIG, LITTLE }; - -#define BITMASK(n) (UINTMAX_MAX >> (sizeof (uintmax_t) * CHAR_BIT - n)) - #define GEN_CONV_IEEE754B(type, total, nexp, nfrac) \ static type convert_ieee754b##total(uintmax_t b) \ { \ -- cgit v1.2.3-54-g00ecf