diff options
author | PikalaxALT <PikalaxALT@users.noreply.github.com> | 2019-09-05 10:47:39 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-05 10:47:39 -0400 |
commit | 082093aa36ea82d7e7b8e6cf0c51aca17d73dd9b (patch) | |
tree | 8c160abe15cc2cd9040e99677d29e2bab05d116b /tools/jsonproc/jsonproc.h | |
parent | f89f80daec6d1e9ec85fdc898f1b7914a126612e (diff) | |
parent | d4dc5c755a4c60d42c726c33c8fb77071052fe85 (diff) |
Merge pull request #755 from garakmon/encounter_json
Wild Encounters to Json
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 |