From 7f920b887f9a060524347b4cc3a5e3f3abdd3b03 Mon Sep 17 00:00:00 2001 From: scnorton Date: Tue, 9 Apr 2019 10:04:41 -0400 Subject: Add mapjson; update gbagfx, scaninc --- tools/mapjson/mapjson.h | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 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 100644 index 000000000..6e961a28e --- /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