diff options
author | huderlem <huderlem@gmail.com> | 2019-02-04 21:36:25 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-04 21:36:25 -0600 |
commit | fd7fe1507df78ed3b0109815a58a0f36401225c8 (patch) | |
tree | 48fca0c77881fff6c68f13b965d9ace87529800a /tools/mapjson/mapjson.h | |
parent | 548f05cb3227c69bf28665f0a3b9a333f816dcc4 (diff) | |
parent | f91325d4a5aa324835a7b24e4159398ed0256310 (diff) |
Merge pull request #723 from pret/mapdata
Convert map data to JSON
Diffstat (limited to 'tools/mapjson/mapjson.h')
-rwxr-xr-x | 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 100755 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 |