aboutsummaryrefslogtreecommitdiffstats
path: root/common.h
diff options
context:
space:
mode:
authorTomasz Kramkowski <tk@the-tk.com>2021-08-06 20:14:04 +0100
committerTomasz Kramkowski <tk@the-tk.com>2021-08-06 20:14:04 +0100
commit5edfaf66958a7ea7ae6fb7b58c037b86465340ad (patch)
tree0dfd146c999d9b6dae9a1d21fa450677a956fad4 /common.h
parent63aa341af24ac7e4d33b817997ab7f2c6f258a40 (diff)
downloadpack-5edfaf66958a7ea7ae6fb7b58c037b86465340ad.tar.gz
pack-5edfaf66958a7ea7ae6fb7b58c037b86465340ad.tar.xz
pack-5edfaf66958a7ea7ae6fb7b58c037b86465340ad.zip
add pack_type and pack_endian and use them
Diffstat (limited to 'common.h')
-rw-r--r--common.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/common.h b/common.h
index e4eebb0..183392a 100644
--- a/common.h
+++ b/common.h
@@ -8,6 +8,8 @@
#include <limits.h>
#include <stddef.h>
+#include "pack.h"
+
#define BITMASK(n) (UINTMAX_MAX >> (sizeof (uintmax_t) * CHAR_BIT - n))
#ifndef PRIuSIZE
@@ -22,8 +24,6 @@
#endif
#endif
-enum endian { BIG, LITTLE };
-
-size_t getsize(char c);
+size_t getsize(enum pack_type t);
#endif // !PACK_COMMON_H