diff options
author | PikalaxALT <PikalaxALT@users.noreply.github.com> | 2019-10-02 11:50:17 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-02 11:50:17 -0400 |
commit | 99e6a6639efa5d2113fe2787e5be4f0d98f0bf78 (patch) | |
tree | aed3fe304abc22c33c6e4c3e1ca1f233f8b37afc /tools/jsonproc/jsonproc.h | |
parent | dcd7c8a2412bf389b694b47892085b7684bca15e (diff) | |
parent | 1bd678656c735bbeb603ccb80367c7a85f820f61 (diff) |
Merge branch 'master' into debug-english
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 |