aboutsummaryrefslogtreecommitdiffstats
path: root/common.h
diff options
context:
space:
mode:
authorTomasz Kramkowski <tk@the-tk.com>2021-08-06 20:16:31 +0100
committerTomasz Kramkowski <tk@the-tk.com>2021-08-06 20:16:31 +0100
commit07d540498026f59622130e1f44534e32a73f23d0 (patch)
tree6582db36b005513a7be623b5b4db28010d45cb8d /common.h
parent5edfaf66958a7ea7ae6fb7b58c037b86465340ad (diff)
downloadpack-07d540498026f59622130e1f44534e32a73f23d0.tar.gz
pack-07d540498026f59622130e1f44534e32a73f23d0.tar.xz
pack-07d540498026f59622130e1f44534e32a73f23d0.zip
use xmacros to generate type related code
Diffstat (limited to 'common.h')
-rw-r--r--common.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/common.h b/common.h
index 183392a..f22f588 100644
--- a/common.h
+++ b/common.h
@@ -24,6 +24,18 @@
#endif
#endif
+#define ITYPE_MACROS \
+ T(SCHAR, signed, char, int) \
+ T(UCHAR, unsigned, char, int) \
+ T(SHORT, signed, short, int) \
+ T(USHORT, unsigned, short, int) \
+ T(INT, signed, int, int) \
+ T(UINT, unsigned, int, int) \
+ T(LONG, signed, long, long) \
+ T(ULONG, unsigned, long, long) \
+ T(LLONG, signed, long long, long long) \
+ T(ULLONG, unsigned, long long, long long)
+
size_t getsize(enum pack_type t);
#endif // !PACK_COMMON_H