v3.5.6: S_New4 help == S_New4 --help

This commit is contained in:
Markus 2019-11-01 19:27:10 +01:00
parent 923e699d30
commit de69b0bc59
2 changed files with 9 additions and 8 deletions

View File

@ -69,22 +69,23 @@ int manageParameter(Settings &settings, int argc, char **argv)
return 1;
}

std::vector<std::string> res = compare("--help\ndefault\nurl\n--version\nsearch\ninfo\nclean\nnews\n--update\n--remove", argv[1]);
std::vector<std::string> res = compare("help\n--help\ndefault\nurl\n--version\nsearch\ninfo\nclean\nnews\n--update\n--remove", argv[1]);
if(res.size() != 1) {
if(res.size() == 0)
std::cout << " => Error: Keine Unteroption für " << argv[1] << " gefunden." << std::endl;
else if(res.size() > 1) {
std::cout << " => Error: Mehrere Unteroptionen für '" << argv[1] << "' gefunden:" << std::endl;
for (auto &e : res)
std::cout << " > '" << argv[1] << "' =? " << e << std::endl;
std::cout << " > '" << argv[1] << "' ?= '" << e << "'" << std::endl;
}
std::cout << "Aufruf: " << settings.programName << " [Unteroption] [PARAMETER]" << std::endl;
std::cout << "\"" << settings.programName << " --help\" liefert weitere Informationen." << std::endl;
return 2;
} res.clear();
std::cout << "Aufruf: " << settings.programName << " [Unteroption] [PARAMETER]" << std::endl;
std::cout << "\"" << settings.programName << " --help\" liefert weitere Informationen." << std::endl;
return 2;
}
res.clear();


if(strncmp(argv[1], "--help", strlen(argv[1])) == 0) {
if((strncmp(argv[1], "--help", strlen(argv[1])) == 0) || (strncmp(argv[1], "help", strlen(argv[1])) == 0)) {
argv[1][0] = '\0';
return unterOption_help(settings);


View File

@ -63,7 +63,7 @@ struct Settings {
proxy_ip = "127.0.0.1",
languages = "GerDub,GerSub,Eng,",
genaueHoster = "",
version = "3.5.5",
version = "3.5.6",
defaultFileVersion="1.6",
outputFilePath = "",
default_checkPath = "",