summaryrefslogtreecommitdiff
path: root/common/common.h
diff options
context:
space:
mode:
Diffstat (limited to 'common/common.h')
-rw-r--r--common/common.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/common/common.h b/common/common.h
index 85ac0df9..012bf5e1 100644
--- a/common/common.h
+++ b/common/common.h
@@ -20,6 +20,9 @@
#define DIRECTORY_SEPARATOR '/'
#endif // _WIN32
+#define die(msg) do { fputs("error: " msg "\n", stderr); exit(1); } while (0)
+#define die_fmt(fmt, ...) do { fprintf(stderr, "error: " fmt "\n", ##__VA_ARGS__); exit(1); } while (0)
+
//
// CLI argument parsing
//