diff options
author | David Kalnischkies <david@kalnischkies.de> | 2015-10-26 11:42:32 +0100 |
---|---|---|
committer | David Kalnischkies <david@kalnischkies.de> | 2015-11-04 18:04:04 +0100 |
commit | 6079b276a959086ff18302cab752b6d7cfe5ad9f (patch) | |
tree | 151f75397170a05635202a604dd45d1fb9be85ca /cmdline | |
parent | 011188e3920f21e6883c2dab956b3d4fb4e8cbfa (diff) |
move apts cmdline helper type into -private
Its not as simple as I initially thought to abstract this enough to make
it globally usable, so lets not pollute global namespace with this for
now.
Git-Dch: Ignore
Diffstat (limited to 'cmdline')
-rw-r--r-- | cmdline/apt-cache.cc | 5 | ||||
-rw-r--r-- | cmdline/apt-cdrom.cc | 5 | ||||
-rw-r--r-- | cmdline/apt-config.cc | 5 | ||||
-rw-r--r-- | cmdline/apt-extracttemplates.cc | 5 | ||||
-rw-r--r-- | cmdline/apt-get.cc | 5 | ||||
-rw-r--r-- | cmdline/apt-helper.cc | 4 | ||||
-rw-r--r-- | cmdline/apt-internal-solver.cc | 6 | ||||
-rw-r--r-- | cmdline/apt-mark.cc | 5 | ||||
-rw-r--r-- | cmdline/apt-sortpkgs.cc | 5 | ||||
-rw-r--r-- | cmdline/apt.cc | 4 |
10 files changed, 21 insertions, 28 deletions
diff --git a/cmdline/apt-cache.cc b/cmdline/apt-cache.cc index 2933db218..50af3f329 100644 --- a/cmdline/apt-cache.cc +++ b/cmdline/apt-cache.cc @@ -1522,8 +1522,7 @@ static bool GenCaches(CommandLine &) return CacheFile.BuildCaches(&Progress, true); } /*}}}*/ -// ShowHelp - Show a help screen /*{{{*/ -bool ShowHelp(CommandLine &, CommandLine::DispatchWithHelp const * Cmds) +bool ShowHelp(CommandLine &, aptDispatchWithHelp const * Cmds) /*{{{*/ { ioprintf(cout, "%s %s (%s)\n", PACKAGE, PACKAGE_VERSION, COMMON_ARCH); @@ -1558,7 +1557,7 @@ bool ShowHelp(CommandLine &, CommandLine::DispatchWithHelp const * Cmds) return true; } /*}}}*/ -std::vector<CommandLine::DispatchWithHelp> GetCommands() /*{{{*/ +std::vector<aptDispatchWithHelp> GetCommands() /*{{{*/ { return { {"gencaches",&GenCaches, nullptr}, diff --git a/cmdline/apt-cdrom.cc b/cmdline/apt-cdrom.cc index 397ff2b65..699cc550c 100644 --- a/cmdline/apt-cdrom.cc +++ b/cmdline/apt-cdrom.cc @@ -203,8 +203,7 @@ static bool DoIdent(CommandLine &) return AddOrIdent(false); } /*}}}*/ -// ShowHelp - Show the help screen /*{{{*/ -bool ShowHelp(CommandLine &, CommandLine::DispatchWithHelp const * Cmds) +bool ShowHelp(CommandLine &, aptDispatchWithHelp const * Cmds) /*{{{*/ { ioprintf(cout, "%s %s (%s)\n", PACKAGE, PACKAGE_VERSION, COMMON_ARCH); @@ -241,7 +240,7 @@ bool ShowHelp(CommandLine &, CommandLine::DispatchWithHelp const * Cmds) return true; } /*}}}*/ -std::vector<CommandLine::DispatchWithHelp> GetCommands() /*{{{*/ +std::vector<aptDispatchWithHelp> GetCommands() /*{{{*/ { return { {"add", &DoAdd, "Add a CDROM"}, diff --git a/cmdline/apt-config.cc b/cmdline/apt-config.cc index 9d80e4ebf..47e37c2f7 100644 --- a/cmdline/apt-config.cc +++ b/cmdline/apt-config.cc @@ -76,8 +76,7 @@ static bool DoDump(CommandLine &CmdL) return true; } /*}}}*/ -// ShowHelp - Show the help screen /*{{{*/ -bool ShowHelp(CommandLine &, CommandLine::DispatchWithHelp const * Cmds) +bool ShowHelp(CommandLine &, aptDispatchWithHelp const * Cmds) /*{{{*/ { ioprintf(cout, "%s %s (%s)\n", PACKAGE, PACKAGE_VERSION, COMMON_ARCH); if (_config->FindB("version") == true) @@ -104,7 +103,7 @@ bool ShowHelp(CommandLine &, CommandLine::DispatchWithHelp const * Cmds) return true; } /*}}}*/ -std::vector<CommandLine::DispatchWithHelp> GetCommands() /*{{{*/ +std::vector<aptDispatchWithHelp> GetCommands() /*{{{*/ { return { {"shell", &DoShell, _("get configuration values via shell evaluation")}, diff --git a/cmdline/apt-extracttemplates.cc b/cmdline/apt-extracttemplates.cc index c5c37d122..1b16542fe 100644 --- a/cmdline/apt-extracttemplates.cc +++ b/cmdline/apt-extracttemplates.cc @@ -215,8 +215,7 @@ bool DebFile::ParseInfo() return true; } /*}}}*/ -// ShowHelp - show a short help text /*{{{*/ -bool ShowHelp(CommandLine &, CommandLine::DispatchWithHelp const *) +bool ShowHelp(CommandLine &, aptDispatchWithHelp const *) /*{{{*/ { ioprintf(std::cout, "%s %s (%s)\n", PACKAGE, PACKAGE_VERSION, COMMON_ARCH); @@ -341,7 +340,7 @@ static bool Go(CommandLine &CmdL) return !_error->PendingError(); } /*}}}*/ -std::vector<CommandLine::DispatchWithHelp> GetCommands() /*{{{*/ +std::vector<aptDispatchWithHelp> GetCommands() /*{{{*/ { return { {nullptr, nullptr, nullptr} diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc index fd7f045c6..69b12b2c7 100644 --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@ -1526,8 +1526,7 @@ static bool DoIndexTargets(CommandLine &CmdL) return true; } /*}}}*/ -// ShowHelp - Show a help screen /*{{{*/ -bool ShowHelp(CommandLine &, CommandLine::DispatchWithHelp const * Cmds) +bool ShowHelp(CommandLine &, aptDispatchWithHelp const * Cmds) /*{{{*/ { ioprintf(cout, "%s %s (%s)\n", PACKAGE, PACKAGE_VERSION, COMMON_ARCH); @@ -1611,7 +1610,7 @@ bool ShowHelp(CommandLine &, CommandLine::DispatchWithHelp const * Cmds) return true; } /*}}}*/ -std::vector<CommandLine::DispatchWithHelp> GetCommands() /*{{{*/ +std::vector<aptDispatchWithHelp> GetCommands() /*{{{*/ { return { {"update", &DoUpdate, _("Retrieve new lists of packages")}, diff --git a/cmdline/apt-helper.cc b/cmdline/apt-helper.cc index aef10828d..b0c1ddacf 100644 --- a/cmdline/apt-helper.cc +++ b/cmdline/apt-helper.cc @@ -105,7 +105,7 @@ static bool DoSrvLookup(CommandLine &CmdL) /*{{{*/ return true; } /*}}}*/ -bool ShowHelp(CommandLine &, CommandLine::DispatchWithHelp const * Cmds)/*{{{*/ +bool ShowHelp(CommandLine &, aptDispatchWithHelp const * Cmds) /*{{{*/ { ioprintf(std::cout, "%s %s (%s)\n", PACKAGE, PACKAGE_VERSION, COMMON_ARCH); @@ -132,7 +132,7 @@ bool ShowHelp(CommandLine &, CommandLine::DispatchWithHelp const * Cmds)/*{{{*/ return true; } /*}}}*/ -std::vector<CommandLine::DispatchWithHelp> GetCommands() /*{{{*/ +std::vector<aptDispatchWithHelp> GetCommands() /*{{{*/ { return { {"download-file", &DoDownloadFile, _("download the given uri to the target-path")}, diff --git a/cmdline/apt-internal-solver.cc b/cmdline/apt-internal-solver.cc index f6eaa11f7..28989f6cd 100644 --- a/cmdline/apt-internal-solver.cc +++ b/cmdline/apt-internal-solver.cc @@ -41,8 +41,8 @@ #include <apti18n.h> /*}}}*/ -// ShowHelp - Show a help screen /*{{{*/ -bool ShowHelp(CommandLine &, CommandLine::DispatchWithHelp const *) { +bool ShowHelp(CommandLine &, aptDispatchWithHelp const *) /*{{{*/ +{ ioprintf(std::cout, "%s %s (%s)\n", PACKAGE, PACKAGE_VERSION, COMMON_ARCH); std::cout << @@ -65,7 +65,7 @@ APT_NORETURN static void DIE(std::string const &message) { /*{{{*/ exit(EXIT_FAILURE); } /*}}}*/ -std::vector<CommandLine::DispatchWithHelp> GetCommands() /*{{{*/ +std::vector<aptDispatchWithHelp> GetCommands() /*{{{*/ { return {}; } diff --git a/cmdline/apt-mark.cc b/cmdline/apt-mark.cc index c49476c7c..d02e80beb 100644 --- a/cmdline/apt-mark.cc +++ b/cmdline/apt-mark.cc @@ -280,8 +280,7 @@ static bool ShowSelection(CommandLine &CmdL) /*{{{*/ return true; } /*}}}*/ -// ShowHelp - Show a help screen /*{{{*/ -bool ShowHelp(CommandLine &, CommandLine::DispatchWithHelp const * Cmds) +bool ShowHelp(CommandLine &, aptDispatchWithHelp const * Cmds) /*{{{*/ { ioprintf(std::cout, "%s %s (%s)\n", PACKAGE, PACKAGE_VERSION, COMMON_ARCH); @@ -314,7 +313,7 @@ bool ShowHelp(CommandLine &, CommandLine::DispatchWithHelp const * Cmds) return true; } /*}}}*/ -std::vector<CommandLine::DispatchWithHelp> GetCommands() /*{{{*/ +std::vector<aptDispatchWithHelp> GetCommands() /*{{{*/ { return { {"auto",&DoAuto, _("Mark the given packages as automatically installed")}, diff --git a/cmdline/apt-sortpkgs.cc b/cmdline/apt-sortpkgs.cc index 82c9c333d..b5a2c12df 100644 --- a/cmdline/apt-sortpkgs.cc +++ b/cmdline/apt-sortpkgs.cc @@ -132,8 +132,7 @@ static bool DoIt(string InFile) return true; } /*}}}*/ -// ShowHelp - Show the help text /*{{{*/ -bool ShowHelp(CommandLine &, CommandLine::DispatchWithHelp const *) +bool ShowHelp(CommandLine &, aptDispatchWithHelp const *) /*{{{*/ { ioprintf(std::cout, "%s %s (%s)\n", PACKAGE, PACKAGE_VERSION, COMMON_ARCH); if (_config->FindB("version") == true) @@ -154,7 +153,7 @@ bool ShowHelp(CommandLine &, CommandLine::DispatchWithHelp const *) return true; } /*}}}*/ -std::vector<CommandLine::DispatchWithHelp> GetCommands() /*{{{*/ +std::vector<aptDispatchWithHelp> GetCommands() /*{{{*/ { return { {nullptr, nullptr, nullptr} diff --git a/cmdline/apt.cc b/cmdline/apt.cc index e32a9f1e3..be2f7663e 100644 --- a/cmdline/apt.cc +++ b/cmdline/apt.cc @@ -37,7 +37,7 @@ #include <apti18n.h> /*}}}*/ -bool ShowHelp(CommandLine &, CommandLine::DispatchWithHelp const * Cmds)/*{{{*/ +bool ShowHelp(CommandLine &, aptDispatchWithHelp const * Cmds) /*{{{*/ { ioprintf(std::cout, "%s %s (%s)\n", PACKAGE, PACKAGE_VERSION, COMMON_ARCH); @@ -58,7 +58,7 @@ bool ShowHelp(CommandLine &, CommandLine::DispatchWithHelp const * Cmds)/*{{{*/ return true; } /*}}}*/ -std::vector<CommandLine::DispatchWithHelp> GetCommands() /*{{{*/ +std::vector<aptDispatchWithHelp> GetCommands() /*{{{*/ { return { // query |