diff options
author | Marcus Huderle <huderlem@gmail.com> | 2019-04-27 14:50:53 -0500 |
---|---|---|
committer | huderlem <huderlem@gmail.com> | 2019-05-08 17:06:39 -0500 |
commit | 483648e372eb468909c79e2e1acd4949a8984acc (patch) | |
tree | 04fdc502d48edea41d2a2ffad639665fa907943d /tools/jsonproc/jsonproc.h | |
parent | fe59902b8a0608eafb746222e8e6800cad2fca8b (diff) |
Create jsonproc tool
Add custom function hooks to jsonproc
Add jsonproc to build_tools.sh
Newer g++
Diffstat (limited to 'tools/jsonproc/jsonproc.h')
-rwxr-xr-x | tools/jsonproc/jsonproc.h | 32 |
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 |