From de69b0bc59a227328be0f0740c88c474036fa1f6 Mon Sep 17 00:00:00 2001 From: Markus Date: Fri, 1 Nov 2019 19:27:10 +0100 Subject: [PATCH] v3.5.6: S_New4 help == S_New4 --help --- parameterManager.cpp | 15 ++++++++------- parameterManager.h | 2 +- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/parameterManager.cpp b/parameterManager.cpp index 66dd849..8e73fff 100644 --- a/parameterManager.cpp +++ b/parameterManager.cpp @@ -69,22 +69,23 @@ int manageParameter(Settings &settings, int argc, char **argv) return 1; } - std::vector res = compare("--help\ndefault\nurl\n--version\nsearch\ninfo\nclean\nnews\n--update\n--remove", argv[1]); + std::vector 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); diff --git a/parameterManager.h b/parameterManager.h index 381b4eb..52301f7 100644 --- a/parameterManager.h +++ b/parameterManager.h @@ -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 = "",