From 5c4f2bd4d38b4865ff79287b62c31cac5b655301 Mon Sep 17 00:00:00 2001 From: nullableVoidPtr <30564701+nullableVoidPtr@users.noreply.github.com> Date: Sun, 4 Aug 2019 09:53:50 +0000 Subject: Add tools --- tools/mapjson/mapjson.h | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100755 tools/mapjson/mapjson.h (limited to 'tools/mapjson/mapjson.h') diff --git a/tools/mapjson/mapjson.h b/tools/mapjson/mapjson.h new file mode 100755 index 0000000..6e961a2 --- /dev/null +++ b/tools/mapjson/mapjson.h @@ -0,0 +1,31 @@ +// mapjson.h + +#ifndef MAPJSON_H +#define MAPJSON_H + +#include +using std::fprintf; using std::exit; + +#include + +#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 // MAPJSON_H -- cgit v1.2.3