-static bool ShowCommonHelp(APT_CMD const Binary, CommandLine &CmdL, std::vector<aptDispatchWithHelp> const &Cmds)/*{{{*/
+static bool ShowCommonHelp(APT_CMD const Binary, CommandLine &CmdL, std::vector<aptDispatchWithHelp> const &Cmds,/*{{{*/
+ bool (*ShowHelp)(CommandLine &))
{
std::cout << PACKAGE << " " << PACKAGE_VERSION << " (" << COMMON_ARCH << ")" << std::endl;
if (_config->FindB("version") == true && Binary != APT_CMD::APT_GET)
{
std::cout << PACKAGE << " " << PACKAGE_VERSION << " (" << COMMON_ARCH << ")" << std::endl;
if (_config->FindB("version") == true && Binary != APT_CMD::APT_GET)
_config->CndSet("Binary::apt::APT::Cmd::Show-Update-Stats", true);
_config->CndSet("Binary::apt::DPkg::Progress-Fancy", true);
_config->CndSet("Binary::apt::Acquire::AllowInsecureRepositories", false);
_config->CndSet("Binary::apt::APT::Cmd::Show-Update-Stats", true);
_config->CndSet("Binary::apt::DPkg::Progress-Fancy", true);
_config->CndSet("Binary::apt::Acquire::AllowInsecureRepositories", false);
- Configuration * const * const Cnf, pkgSystem ** const Sys, int const argc, const char *argv[])
+ Configuration * const * const Cnf, pkgSystem ** const Sys, int const argc, const char *argv[],
+ bool (*ShowHelp)(CommandLine &), std::vector<aptDispatchWithHelp> (*GetCommands)(void))
(Sys != NULL && pkgInitSystem(*_config, *Sys) == false))
{
if (_config->FindB("version") == true)
(Sys != NULL && pkgInitSystem(*_config, *Sys) == false))
{
if (_config->FindB("version") == true)
- ShowCommonHelp(Binary, CmdL, CmdsWithHelp);
+ ShowCommonHelp(Binary, CmdL, CmdsWithHelp, ShowHelp);
if (_config->FindB("help") == true || _config->FindB("version") == true ||
(CmdL.FileSize() > 0 && strcmp(CmdL.FileList[0], "help") == 0))
{
if (_config->FindB("help") == true || _config->FindB("version") == true ||
(CmdL.FileSize() > 0 && strcmp(CmdL.FileList[0], "help") == 0))
{
- ShowCommonHelp(Binary, CmdL, CmdsWithHelp);
+ ShowCommonHelp(Binary, CmdL, CmdsWithHelp, ShowHelp);
- ShowCommonHelp(Binary, CmdL, CmdsWithHelp);
+ ShowCommonHelp(Binary, CmdL, CmdsWithHelp, ShowHelp);