Changeset View
Changeset View
Standalone View
Standalone View
src/util/system.cpp
Show First 20 Lines • Show All 554 Lines • ▼ Show 20 Lines | std::string ArgsManager::GetHelpMessage() const { | ||||
return usage; | return usage; | ||||
} | } | ||||
bool HelpRequested(const ArgsManager &args) { | bool HelpRequested(const ArgsManager &args) { | ||||
return args.IsArgSet("-?") || args.IsArgSet("-h") || | return args.IsArgSet("-?") || args.IsArgSet("-h") || | ||||
args.IsArgSet("-help") || args.IsArgSet("-help-debug"); | args.IsArgSet("-help") || args.IsArgSet("-help-debug"); | ||||
} | } | ||||
void SetupHelpOptions(ArgsManager &args) { | |||||
args.AddArg("-?", "Print this help message and exit", false, | |||||
OptionsCategory::OPTIONS); | |||||
args.AddHiddenArgs({"-h", "-help"}); | |||||
} | |||||
static const int screenWidth = 79; | static const int screenWidth = 79; | ||||
static const int optIndent = 2; | static const int optIndent = 2; | ||||
static const int msgIndent = 7; | static const int msgIndent = 7; | ||||
std::string HelpMessageGroup(const std::string &message) { | std::string HelpMessageGroup(const std::string &message) { | ||||
return std::string(message) + std::string("\n\n"); | return std::string(message) + std::string("\n\n"); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 718 Lines • Show Last 20 Lines |