diff options
author | PikalaxALT <PikalaxALT@users.noreply.github.com> | 2019-06-21 13:12:56 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-21 13:12:56 -0400 |
commit | 010db05e735e0ac11efcf0d800205324cc0f2be9 (patch) | |
tree | 9109eaf029ee3253a554e50df5584d540ff243f8 /tools/jsonproc/jsonproc.h | |
parent | caa193364bf786cb567ed16eb4670ed2cc4cb362 (diff) | |
parent | 3444ac708a0dfc9e99c34a3c19159e786d8ab9f1 (diff) |
Merge pull request #71 from pret/item_use
item_use and item
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 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 |