convert mapjson.py to mapjson.cpp

This commit is contained in:
garak
2019-02-02 14:22:41 -05:00
committed by huderlem
parent 29d6221935
commit 82abc164dc
8 changed files with 1592 additions and 390 deletions

31
tools/mapjson/mapjson.h Normal file
View File

@@ -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