diff options
author | PikalaxALT <PikalaxALT@gmail.com> | 2019-07-29 09:01:55 -0400 |
---|---|---|
committer | PikalaxALT <PikalaxALT@gmail.com> | 2019-07-29 09:01:55 -0400 |
commit | 3e27227b83c2c602237f016f04f2c5fa1e31de87 (patch) | |
tree | 4bce050a1fc6c364f937c33dcf58daf283a241d1 /tools/jsonproc/jsonproc.h | |
parent | 7d02658bfce6a57a5f845f44cbda412b9777113a (diff) |
Add sources and compilation guide
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 0000000..575fb37 --- /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 |