summaryrefslogtreecommitdiff
path: root/tools/jsonproc/jsonproc.h
diff options
context:
space:
mode:
authornullableVoidPtr <30564701+nullableVoidPtr@users.noreply.github.com>2019-08-04 10:18:13 +0000
committernullableVoidPtr <30564701+nullableVoidPtr@users.noreply.github.com>2019-08-04 10:18:13 +0000
commitba6f243c728de5d5c024aeb177026bcc59909e2e (patch)
treeaf8fdeb1c6cdf9cd8584f0d693a4049bfc408b9d /tools/jsonproc/jsonproc.h
parent6211b0c5ecbe4a43aa3f6e8fd96e99af29caa77a (diff)
parent250a331df9dbd312d572aaf0d629503417cfc9d4 (diff)
Forgot upstream tools tracking
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 0000000..575fb37
--- /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