From f6777222f82f6279c104138216b0e5e50d8caa67 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Sun, 29 Nov 2015 16:57:58 +0100 Subject: [PATCH] drop some needlessly public declarations in libapt-private Git-Dch: Ignore --- apt-private/private-cacheset.h | 6 +++--- apt-private/private-cmndline.h | 3 --- apt-private/private-download.h | 6 +++--- apt-private/private-install.h | 4 ++-- apt-private/private-output.h | 2 +- cmdline/apt-cache.cc | 4 ++-- cmdline/apt-cdrom.cc | 4 ++-- cmdline/apt-config.cc | 4 ++-- cmdline/apt-extracttemplates.cc | 4 ++-- cmdline/apt-get.cc | 4 ++-- cmdline/apt-helper.cc | 4 ++-- cmdline/apt-mark.cc | 4 ++-- cmdline/apt-sortpkgs.cc | 4 ++-- cmdline/apt.cc | 4 ++-- ftparchive/apt-ftparchive.cc | 4 ++-- 15 files changed, 29 insertions(+), 32 deletions(-) diff --git a/apt-private/private-cacheset.h b/apt-private/private-cacheset.h index 4cbc4efa1..0f7430fa0 100644 --- a/apt-private/private-cacheset.h +++ b/apt-private/private-cacheset.h @@ -15,7 +15,7 @@ class OpProgress; -struct APT_PUBLIC VersionSortDescriptionLocality /*{{{*/ +struct VersionSortDescriptionLocality /*{{{*/ { bool operator () (const pkgCache::VerIterator &v_lhs, const pkgCache::VerIterator &v_rhs) @@ -65,7 +65,7 @@ bool GetLocalitySortedVersionSet(pkgCacheFile &CacheFile, // CacheSetHelper saving virtual packages /*{{{*/ -class APT_PUBLIC CacheSetHelperVirtuals: public APT::CacheSetHelper { +class CacheSetHelperVirtuals: public APT::CacheSetHelper { public: APT::PackageSet virtualPkgs; @@ -78,7 +78,7 @@ public: /*}}}*/ // CacheSetHelperAPTGet - responsible for message telling from the CacheSets/*{{{*/ -class APT_PUBLIC CacheSetHelperAPTGet : public APT::CacheSetHelper { +class CacheSetHelperAPTGet : public APT::CacheSetHelper { /** \brief stream message should be printed to */ std::ostream &out; /** \brief were things like Task or RegEx used to select packages? */ diff --git a/apt-private/private-cmndline.h b/apt-private/private-cmndline.h index 05690964d..6235ef9f5 100644 --- a/apt-private/private-cmndline.h +++ b/apt-private/private-cmndline.h @@ -22,15 +22,12 @@ enum class APT_CMD { APT_MARK, APT_SORTPKG, }; - -APT_PUBLIC bool ShowHelp(CommandLine &CmdL) APT_WEAK; struct aptDispatchWithHelp { const char *Match; bool (*Handler)(CommandLine &); const char *Help; }; -APT_PUBLIC std::vector GetCommands() APT_WEAK; APT_PUBLIC std::vector ParseCommandLine(CommandLine &CmdL, APT_CMD const Binary, Configuration * const * const Cnf, pkgSystem ** const Sys, int const argc, const char * argv[], diff --git a/apt-private/private-download.h b/apt-private/private-download.h index 587165166..d829e8b24 100644 --- a/apt-private/private-download.h +++ b/apt-private/private-download.h @@ -10,15 +10,15 @@ #include // Check if all files in the fetcher are authenticated -APT_PUBLIC bool CheckAuth(pkgAcquire& Fetcher, bool const PromptUser); +bool CheckAuth(pkgAcquire& Fetcher, bool const PromptUser); // show a authentication warning prompt and return true if the system // should continue -APT_PUBLIC bool AuthPrompt(std::vector const &UntrustedList, bool const PromptUser); +bool AuthPrompt(std::vector const &UntrustedList, bool const PromptUser); APT_PUBLIC bool AcquireRun(pkgAcquire &Fetcher, int const PulseInterval, bool * const Failure, bool * const TransientNetworkFailure); -APT_PUBLIC bool CheckFreeSpaceBeforeDownload(std::string const &Dir, unsigned long long FetchBytes); +bool CheckFreeSpaceBeforeDownload(std::string const &Dir, unsigned long long FetchBytes); class APT_PUBLIC aptAcquireWithTextStatus : public pkgAcquire { diff --git a/apt-private/private-install.h b/apt-private/private-install.h index 551787c38..7a8cd5513 100644 --- a/apt-private/private-install.h +++ b/apt-private/private-install.h @@ -28,7 +28,7 @@ APT_PUBLIC bool InstallPackages(CacheFile &Cache,bool ShwKept,bool Ask = true, // TryToInstall - Mark a package for installation /*{{{*/ -struct APT_PUBLIC TryToInstall { +struct TryToInstall { pkgCacheFile* Cache; pkgProblemResolver* Fix; bool FixBroken; @@ -44,7 +44,7 @@ struct APT_PUBLIC TryToInstall { }; /*}}}*/ // TryToRemove - Mark a package for removal /*{{{*/ -struct APT_PUBLIC TryToRemove { +struct TryToRemove { pkgCacheFile* Cache; pkgProblemResolver* Fix; bool PurgePkgs; diff --git a/apt-private/private-output.h b/apt-private/private-output.h index 4930fd981..8e4b50ed1 100644 --- a/apt-private/private-output.h +++ b/apt-private/private-output.h @@ -34,7 +34,7 @@ void ListSingleVersion(pkgCacheFile &CacheFile, pkgRecords &records, APT_PUBLIC void ShowBroken(std::ostream &out, CacheFile &Cache, bool const Now); APT_PUBLIC void ShowBroken(std::ostream &out, pkgCacheFile &Cache, bool const Now); -template APT_PUBLIC bool ShowList(std::ostream &out, std::string const &Title, +template bool ShowList(std::ostream &out, std::string const &Title, Container const &cont, PredicateC Predicate, DisplayP PkgDisplay, diff --git a/cmdline/apt-cache.cc b/cmdline/apt-cache.cc index f68e739b1..247f612c2 100644 --- a/cmdline/apt-cache.cc +++ b/cmdline/apt-cache.cc @@ -1100,7 +1100,7 @@ static bool GenCaches(CommandLine &) return CacheFile.BuildCaches(&Progress, true); } /*}}}*/ -bool ShowHelp(CommandLine &) /*{{{*/ +static bool ShowHelp(CommandLine &) /*{{{*/ { std::cout << _("Usage: apt-cache [options] command\n" @@ -1115,7 +1115,7 @@ bool ShowHelp(CommandLine &) /*{{{*/ return true; } /*}}}*/ -std::vector GetCommands() /*{{{*/ +static std::vector GetCommands() /*{{{*/ { return { {"gencaches",&GenCaches, nullptr}, diff --git a/cmdline/apt-cdrom.cc b/cmdline/apt-cdrom.cc index d8a2d84cf..ba01a4c74 100644 --- a/cmdline/apt-cdrom.cc +++ b/cmdline/apt-cdrom.cc @@ -203,7 +203,7 @@ static bool DoIdent(CommandLine &) return AddOrIdent(false); } /*}}}*/ -bool ShowHelp(CommandLine &) /*{{{*/ +static bool ShowHelp(CommandLine &) /*{{{*/ { std::cout << _("Usage: apt-cdrom [options] command\n" @@ -214,7 +214,7 @@ bool ShowHelp(CommandLine &) /*{{{*/ return true; } /*}}}*/ -std::vector GetCommands() /*{{{*/ +static std::vector GetCommands() /*{{{*/ { return { {"add", &DoAdd, "Add a CDROM"}, diff --git a/cmdline/apt-config.cc b/cmdline/apt-config.cc index b86a0fd97..69485de90 100644 --- a/cmdline/apt-config.cc +++ b/cmdline/apt-config.cc @@ -76,7 +76,7 @@ static bool DoDump(CommandLine &CmdL) return true; } /*}}}*/ -bool ShowHelp(CommandLine &) /*{{{*/ +static bool ShowHelp(CommandLine &) /*{{{*/ { std::cout << _("Usage: apt-config [options] command\n" @@ -86,7 +86,7 @@ bool ShowHelp(CommandLine &) /*{{{*/ return true; } /*}}}*/ -std::vector GetCommands() /*{{{*/ +static std::vector GetCommands() /*{{{*/ { return { {"shell", &DoShell, _("get configuration values via shell evaluation")}, diff --git a/cmdline/apt-extracttemplates.cc b/cmdline/apt-extracttemplates.cc index d1345400b..8f77425e4 100644 --- a/cmdline/apt-extracttemplates.cc +++ b/cmdline/apt-extracttemplates.cc @@ -215,7 +215,7 @@ bool DebFile::ParseInfo() return true; } /*}}}*/ -bool ShowHelp(CommandLine &) /*{{{*/ +static bool ShowHelp(CommandLine &) /*{{{*/ { cout << _("Usage: apt-extracttemplates file1 [file2 ...]\n" @@ -330,7 +330,7 @@ static bool Go(CommandLine &CmdL) return !_error->PendingError(); } /*}}}*/ -std::vector GetCommands() /*{{{*/ +static std::vector GetCommands() /*{{{*/ { return { {nullptr, nullptr, nullptr} diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc index b8d72a0bc..3bd483426 100644 --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@ -343,7 +343,7 @@ static bool DoIndexTargets(CommandLine &CmdL) return true; } /*}}}*/ -bool ShowHelp(CommandLine &) /*{{{*/ +static bool ShowHelp(CommandLine &) /*{{{*/ { if (_config->FindB("version") == true) { @@ -399,7 +399,7 @@ bool ShowHelp(CommandLine &) /*{{{*/ return true; } /*}}}*/ -std::vector GetCommands() /*{{{*/ +static std::vector GetCommands() /*{{{*/ { return { {"update", &DoUpdate, _("Retrieve new lists of packages")}, diff --git a/cmdline/apt-helper.cc b/cmdline/apt-helper.cc index 1be122ad0..c0575bea1 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 &) /*{{{*/ +static bool ShowHelp(CommandLine &) /*{{{*/ { std::cout << _("Usage: apt-helper [options] command\n" @@ -116,7 +116,7 @@ bool ShowHelp(CommandLine &) /*{{{*/ return true; } /*}}}*/ -std::vector GetCommands() /*{{{*/ +static std::vector GetCommands() /*{{{*/ { return { {"download-file", &DoDownloadFile, _("download the given uri to the target-path")}, diff --git a/cmdline/apt-mark.cc b/cmdline/apt-mark.cc index 2491a8ebf..8b615a83b 100644 --- a/cmdline/apt-mark.cc +++ b/cmdline/apt-mark.cc @@ -280,7 +280,7 @@ static bool ShowSelection(CommandLine &CmdL) /*{{{*/ return true; } /*}}}*/ -bool ShowHelp(CommandLine &) /*{{{*/ +static bool ShowHelp(CommandLine &) /*{{{*/ { std::cout << _("Usage: apt-mark [options] {auto|manual} pkg1 [pkg2 ...]\n" @@ -292,7 +292,7 @@ bool ShowHelp(CommandLine &) /*{{{*/ return true; } /*}}}*/ -std::vector GetCommands() /*{{{*/ +static std::vector GetCommands() /*{{{*/ { return { {"auto",&DoAuto, _("Mark the given packages as automatically installed")}, diff --git a/cmdline/apt-sortpkgs.cc b/cmdline/apt-sortpkgs.cc index 7e3301a05..9495ee354 100644 --- a/cmdline/apt-sortpkgs.cc +++ b/cmdline/apt-sortpkgs.cc @@ -132,7 +132,7 @@ static bool DoIt(string InFile) return true; } /*}}}*/ -bool ShowHelp(CommandLine &) /*{{{*/ +static bool ShowHelp(CommandLine &) /*{{{*/ { std::cout << _("Usage: apt-sortpkgs [options] file1 [file2 ...]\n" @@ -143,7 +143,7 @@ bool ShowHelp(CommandLine &) /*{{{*/ return true; } /*}}}*/ -std::vector GetCommands() /*{{{*/ +static std::vector GetCommands() /*{{{*/ { return { {nullptr, nullptr, nullptr} diff --git a/cmdline/apt.cc b/cmdline/apt.cc index 64d374e1f..3c3d3ca1c 100644 --- a/cmdline/apt.cc +++ b/cmdline/apt.cc @@ -40,7 +40,7 @@ #include /*}}}*/ -bool ShowHelp(CommandLine &) /*{{{*/ +static bool ShowHelp(CommandLine &) /*{{{*/ { std::cout << _("Usage: apt [options] command\n" @@ -53,7 +53,7 @@ bool ShowHelp(CommandLine &) /*{{{*/ return true; } /*}}}*/ -std::vector GetCommands() /*{{{*/ +static std::vector GetCommands() /*{{{*/ { return { // query diff --git a/ftparchive/apt-ftparchive.cc b/ftparchive/apt-ftparchive.cc index 003a186be..d985646f7 100644 --- a/ftparchive/apt-ftparchive.cc +++ b/ftparchive/apt-ftparchive.cc @@ -615,7 +615,7 @@ static void LoadBinDir(vector &PkgList,Configuration &Setup) } /*}}}*/ -bool ShowHelp(CommandLine &) /*{{{*/ +static bool ShowHelp(CommandLine &) /*{{{*/ { std::cout << _("Usage: apt-ftparchive [options] command\n" @@ -1029,7 +1029,7 @@ static bool Clean(CommandLine &CmdL) } /*}}}*/ -std::vector GetCommands() /*{{{*/ +static std::vector GetCommands() /*{{{*/ { return { {"packages",&SimpleGenPackages, nullptr}, -- 2.45.2