Record the command line options in the tileset metadata

This commit is contained in:
Eric Fischer
2019-04-04 17:03:36 -07:00
parent 945d80400b
commit 4f7459c797
152 changed files with 235 additions and 32 deletions
+21
View File
@@ -133,3 +133,24 @@ int integer_zoom(std::string where, std::string text) {
}
return d;
}
std::string format_commandline(int argc, char **argv) {
std::string out;
for (int i = 0; i < argc; i++) {
for (char *cp = argv[i]; *cp != '\0'; cp++) {
if (*cp == ' ' || *cp == '\\') {
out.push_back('\\');
out.push_back(*cp);
} else {
out.push_back(*cp);
}
}
if (i + 1 < argc) {
out.push_back(' ');
}
}
return out;
}