summaryrefslogtreecommitdiff
path: root/tools/jsonproc/jsonproc.h
diff options
context:
space:
mode:
authorgarak <garakmon@gmail.com>2019-07-30 16:20:20 -0400
committergarak <garakmon@gmail.com>2019-07-30 16:20:20 -0400
commit02f4d3e4200292d484f81f2563d48d7a1ccdf4bb (patch)
tree968090decae790840dbf057aa7f0ab763f68112f /tools/jsonproc/jsonproc.h
parentb8393b3a799f92e7064c266600607d98f6baf4d9 (diff)
add jsonproc tool
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