summaryrefslogtreecommitdiff
path: root/tools/jsonproc/jsonproc.h
diff options
context:
space:
mode:
authorMartmists <martmists@gmail.com>2020-04-22 13:57:09 +0200
committerMartmists <martmists@gmail.com>2020-04-22 13:57:09 +0200
commit9b3107c478c9f39c17ef4171c9c5330adcb1385a (patch)
treee63d60215b5ba9405d7aeb3322873d26c5f03cc1 /tools/jsonproc/jsonproc.h
parentdcdf58739922de3b3bbc828f46e36b83f53c52a0 (diff)
parent5ee605688aaea7fe6b4573dc2ce5ce24cd671855 (diff)
Merge branch 'master' into os_lib
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