summaryrefslogtreecommitdiff
path: root/tools/jsonproc/jsonproc.h
diff options
context:
space:
mode:
authormartmists <mail@martmists.com>2020-04-20 00:29:28 +0200
committerGitHub <noreply@github.com>2020-04-20 00:29:28 +0200
commit805f609248867463bce8b37940d2fcc12b5d1702 (patch)
treed76ef7b263db620053fe51bb374b15568e176cf2 /tools/jsonproc/jsonproc.h
parentafef55816689d7fdfbddc8858f15daa5b887234c (diff)
parent776d1ef8924dc9c46574b883b362294d7bb6d94b (diff)
Merge pull request #4 from PikalaxALT/finish_header
Initial dump of filesystem
Diffstat (limited to 'tools/jsonproc/jsonproc.h')
-rw-r--r--tools/jsonproc/jsonproc.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/tools/jsonproc/jsonproc.h b/tools/jsonproc/jsonproc.h
new file mode 100644
index 00000000..575fb375
--- /dev/null
+++ b/tools/jsonproc/jsonproc.h
@@ -0,0 +1,32 @@
+// jsonproc.h
+
+#ifndef JSONPROC_H
+#define JSONPROC_H
+
+#include <cstdlib>
+#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 // JSONPROC_H