Initial commit

This commit is contained in:
Georgi Gerganov
2020-11-29 11:02:17 +02:00
commit 69efeca387
25 changed files with 2949 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
#include "ggwave-common.h"
#include <cstring>
std::map<std::string, std::string> parseCmdArguments(int argc, char ** argv) {
int last = argc;
std::map<std::string, std::string> res;
for (int i = 1; i < last; ++i) {
if (argv[i][0] == '-') {
if (strlen(argv[i]) > 1) {
res[std::string(1, argv[i][1])] = strlen(argv[i]) > 2 ? argv[i] + 2 : "";
}
}
}
return res;
}