diff options
author | PikalaxALT <PikalaxALT@gmail.com> | 2020-04-15 08:58:21 -0400 |
---|---|---|
committer | PikalaxALT <PikalaxALT@gmail.com> | 2020-04-15 08:58:21 -0400 |
commit | a5332e2f9e029ca7c0003a5cd096af3c68ace5bb (patch) | |
tree | df717f7c0590419d59e9dc246469dc6e5956b6e8 /tools/jsonproc/jsonproc.h | |
parent | f9b7d7411b74e29e048ea7d48cf6d8302e50d2d4 (diff) |
Finish filling out header
Diffstat (limited to 'tools/jsonproc/jsonproc.h')
-rw-r--r-- | 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 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 |