summaryrefslogtreecommitdiff
path: root/tools/mapjson/mapjson.h
diff options
context:
space:
mode:
authorhuderlem <huderlem@gmail.com>2019-02-04 21:36:18 -0600
committerGitHub <noreply@github.com>2019-02-04 21:36:18 -0600
commitb0ee1009759ed1c46da81b1fb8410e2b75e42bb2 (patch)
treeceee3e124b987b8dd24cb3a7bba85d4effe1ef5d /tools/mapjson/mapjson.h
parent646533cfa3c8c42aee3efedaadfe49e495b64892 (diff)
parentd4125fef9bc9adb95c7a5fb5b8be903b34adc510 (diff)
Merge pull request #543 from pret/mapdata
Convert map data to JSON
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