summaryrefslogtreecommitdiff
path: root/tools/jsonproc/jsonproc.h
diff options
context:
space:
mode:
authorSatoMew <SatoMew@users.noreply.github.com>2019-08-04 20:35:38 +0100
committerGitHub <noreply@github.com>2019-08-04 20:35:38 +0100
commit667f0837e2c0fecb03e4198a182cf04624a47fbd (patch)
tree4f11ff910478fdb34a4c40c465b30be2ac1a22da /tools/jsonproc/jsonproc.h
parent89da828794d036e33ef313ab95868c8be6bb039f (diff)
parentce941e6f56803b389c20a52c0a5b89f5ade12b7a (diff)
Merge branch 'master' into master
Diffstat (limited to 'tools/jsonproc/jsonproc.h')
-rwxr-xr-xtools/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 100755
index 000000000..575fb3756
--- /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