diff options
author | ubq323 <ubq323@ubq323.website> | 2024-06-24 16:49:15 +0100 |
---|---|---|
committer | ubq323 <ubq323@ubq323.website> | 2024-06-24 16:49:15 +0100 |
commit | 08d7465f5a841366ec4c66f11475ede4e9082a8d (patch) | |
tree | 556527c70b412034a4c7ae18f70a7f6906391900 /util.h | |
parent | 8c3037662ba572a6935170dbd4cb8cc8a3636417 (diff) |
refactor error checking and argument parsing
Diffstat (limited to 'util.h')
-rw-r--r-- | util.h | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -0,0 +1,10 @@ +#ifndef _util_h +#define _util_h + +#define CHECK(cond, ...) do { if (!(cond)) { fprintf(stderr, __VA_ARGS__); exit(1); } } while(0) +#define ERROR(...) CHECK(false, __VA_ARGS__) + + + +#endif + |