aboutsummaryrefslogtreecommitdiff
path: root/error.h
diff options
context:
space:
mode:
authorKirill Petrashin <kirill8201@yandex.ru>2026-03-19 23:06:55 +0300
committerKirill Petrashin <kirill8201@yandex.ru>2026-03-19 23:06:55 +0300
commite92c9c1eb410f39f55fd80c8895b545902406ea7 (patch)
treec1ed69f0511bedbc2ca6101a76347fb5905f2777 /error.h
parent055dd4d62b5c670272b18789c95e0e08b4b823c8 (diff)
Add macros for errors and todos, outline priority_queue.c
Diffstat (limited to 'error.h')
-rw-r--r--error.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/error.h b/error.h
new file mode 100644
index 0000000..3bb74ed
--- /dev/null
+++ b/error.h
@@ -0,0 +1,10 @@
+#ifndef ERROR_H_
+#define ERROR_H_
+
+#include <stdlib.h>
+
+/* Clean up and exit, printing a message */
+#define error(...) { endwin(); printf(__FILE__ ": %i", __LINE__); printf(": " __VA_ARGS__); exit(1); }
+#define todo() { endwin(); printf(__FILE__": %i: Not yet implemented\n", __LINE__); exit(1); }
+
+#endif /* ERROR_H_ */