summaryrefslogtreecommitdiff
path: root/tools/mapjson/mapjson.h
diff options
context:
space:
mode:
authorDiegoisawesome <diego@domoreaweso.me>2019-02-05 14:35:42 -0600
committerDiegoisawesome <diego@domoreaweso.me>2019-02-05 14:35:42 -0600
commitbc4cc9f78a705636228c39311bb6e3c393f090d3 (patch)
treed2b59408df53676ffb65e217cc1a62cbcba05f97 /tools/mapjson/mapjson.h
parent37e86d75788f4ed364db19aabce11e6e054a1084 (diff)
parentb0ee1009759ed1c46da81b1fb8410e2b75e42bb2 (diff)
Merge branch 'master' of github.com:pret/pokeemerald
Diffstat (limited to 'tools/mapjson/mapjson.h')
-rw-r--r--tools/mapjson/mapjson.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/tools/mapjson/mapjson.h b/tools/mapjson/mapjson.h
new file mode 100644
index 000000000..6e961a28e
--- /dev/null
+++ b/tools/mapjson/mapjson.h
@@ -0,0 +1,31 @@
+// mapjson.h
+
+#ifndef MAPJSON_H
+#define MAPJSON_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 // MAPJSON_H