diff options
author | Swastik Baranwal <swstkbaranwal@gmail.com> | 2019-06-23 18:47:35 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-23 18:47:35 +0530 |
commit | 99703c6ab831d34e6859d8a8f53ba8e73dc4d3d9 (patch) | |
tree | 3a712d3039d152616af58a45a13d82c40a87e58f /tools/mapjson/mapjson.h | |
parent | 6d190f861e3559eec922cd760778c0cba6e08397 (diff) | |
parent | 9ee0c34758a63f8c00724b6fc984b4e96be2f7af (diff) |
Merge pull request #5 from pret/master
Take files
Diffstat (limited to 'tools/mapjson/mapjson.h')
-rw-r--r-- | tools/mapjson/mapjson.h | 31 |
1 files changed, 31 insertions, 0 deletions
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 <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 // MAPJSON_H |