mirror of
https://github.com/thornAvery/kep-hack.git
synced 2026-02-21 22:52:15 +13:00
Add COUNTOF macro to tools/common.h
This commit is contained in:
parent
c37cc15f44
commit
9d7b581310
3 changed files with 13 additions and 11 deletions
|
|
@ -19,6 +19,8 @@
|
|||
#error Define USAGE_OPTS before including common.h!
|
||||
#endif
|
||||
|
||||
#define COUNTOF(...) (sizeof(__VA_ARGS__) / sizeof(*(__VA_ARGS__)))
|
||||
|
||||
#define error_exit(...) exit((fprintf(stderr, PROGRAM_NAME ": " __VA_ARGS__), 1))
|
||||
|
||||
noreturn void usage_exit(int status) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue