summaryrefslogtreecommitdiff
path: root/tools/dungeonjson/dungeonjson.h
diff options
context:
space:
mode:
Diffstat (limited to 'tools/dungeonjson/dungeonjson.h')
-rw-r--r--tools/dungeonjson/dungeonjson.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/tools/dungeonjson/dungeonjson.h b/tools/dungeonjson/dungeonjson.h
new file mode 100644
index 0000000..c6c724b
--- /dev/null
+++ b/tools/dungeonjson/dungeonjson.h
@@ -0,0 +1,31 @@
+// dungeonjson.h
+
+#ifndef DUNGEONJSON_H
+#define DUNGEONJSON_H
+
+#include <cstdio>
+using std::fprintf; using std::exit;
+
+#include <cstdlib>
+
+#ifdef _MSC_VER
+
+#define FATAL_ERROR(format, ...) \
+do \
+{ \
+ fprintf(stderr, format, __VA_ARGS__); \
+ exit(1); \
+} while (0)
+
+#else
+
+#define FATAL_ERROR(format, ...) \
+do \
+{ \
+ fprintf(stderr, format, ##__VA_ARGS__); \
+ exit(1); \
+} while (0)
+
+#endif // _MSC_VER
+
+#endif // DUNGEONJSON_H