diff options
author | David Kalnischkies <kalnischkies@gmail.com> | 2013-08-30 17:18:20 +0200 |
---|---|---|
committer | David Kalnischkies <kalnischkies@gmail.com> | 2013-09-03 23:11:58 +0200 |
commit | ee0167c4a0bf0c6de5437d3b641e7e7c0c614f17 (patch) | |
tree | de508eb59b34f978f70aac3641601dc2a91f04cb | |
parent | 968179cf7b9e1a633c283745da15755d8de4acbd (diff) |
fix vim-style foldmarker
Git-Dch: Ignore
-rw-r--r-- | apt-private/private-install.cc | 10 | ||||
-rw-r--r-- | apt-private/private-list.cc | 15 | ||||
-rw-r--r-- | apt-private/private-output.cc | 38 | ||||
-rw-r--r-- | apt-private/private-search.cc | 6 | ||||
-rw-r--r-- | apt-private/private-show.cc | 5 | ||||
-rw-r--r-- | apt-private/private-upgrade.cc | 7 | ||||
-rw-r--r-- | cmdline/apt-get.cc | 8 |
7 files changed, 39 insertions, 50 deletions
diff --git a/apt-private/private-install.cc b/apt-private/private-install.cc index b03f131a4..9808c3dde 100644 --- a/apt-private/private-install.cc +++ b/apt-private/private-install.cc @@ -94,8 +94,6 @@ static bool CheckAuth(pkgAcquire& Fetcher) return _error->Error(_("There are problems and -y was used without --force-yes")); } /*}}}*/ - - // InstallPackages - Actually download and install the packages /*{{{*/ // --------------------------------------------------------------------- /* This displays the informative messages describing what is going to @@ -429,8 +427,6 @@ bool InstallPackages(CacheFile &Cache,bool ShwKept,bool Ask, bool Safety) return true; } /*}}}*/ - - // DoAutomaticRemove - Remove all automatic unused packages /*{{{*/ // --------------------------------------------------------------------- /* Remove unused automatic packages */ @@ -576,7 +572,7 @@ bool DoAutomaticRemove(CacheFile &Cache) return true; } /*}}}*/ - +// DoCacheManipulationFromCommandLine /*{{{*/ static const unsigned short MOD_REMOVE = 1; static const unsigned short MOD_INSTALL = 2; @@ -585,7 +581,6 @@ bool DoCacheManipulationFromCommandLine(CommandLine &CmdL, CacheFile &Cache) std::map<unsigned short, APT::VersionSet> verset; return DoCacheManipulationFromCommandLine(CmdL, Cache, verset); } - bool DoCacheManipulationFromCommandLine(CommandLine &CmdL, CacheFile &Cache, std::map<unsigned short, APT::VersionSet> &verset) { @@ -719,8 +714,7 @@ bool DoCacheManipulationFromCommandLine(CommandLine &CmdL, CacheFile &Cache, return true; } - - + /*}}}*/ // DoInstall - Install packages from the command line /*{{{*/ // --------------------------------------------------------------------- /* Install named packages */ diff --git a/apt-private/private-list.cc b/apt-private/private-list.cc index c3a21aafc..8c61fcae8 100644 --- a/apt-private/private-list.cc +++ b/apt-private/private-list.cc @@ -42,7 +42,7 @@ #include <apti18n.h> /*}}}*/ -struct PackageSortAlphabetic +struct PackageSortAlphabetic /*{{{*/ { bool operator () (const pkgCache::PkgIterator &p_lhs, const pkgCache::PkgIterator &p_rhs) @@ -52,12 +52,12 @@ struct PackageSortAlphabetic return (l_name < r_name); } }; - + /*}}}*/ +class PackageNameMatcher : public Matcher /*{{{*/ +{ #ifdef PACKAGE_MATCHER_ABI_COMPAT #define PackageMatcher PackageNameMatchesFnmatch #endif -class PackageNameMatcher : public Matcher -{ public: PackageNameMatcher(const char **patterns) { @@ -98,9 +98,8 @@ private: std::vector<APT::CacheFilter::PackageMatcher*>::const_iterator J; #undef PackageMatcher }; - - -void ListAllVersions(pkgCacheFile &CacheFile, pkgRecords &records, + /*}}}*/ +void ListAllVersions(pkgCacheFile &CacheFile, pkgRecords &records, /*{{{*/ pkgCache::PkgIterator P, std::ostream &outs) { @@ -108,7 +107,7 @@ void ListAllVersions(pkgCacheFile &CacheFile, pkgRecords &records, Ver.end() == false; Ver++) ListSingleVersion(CacheFile, records, Ver, outs); } - + /*}}}*/ // list - list package based on criteria /*{{{*/ // --------------------------------------------------------------------- bool List(CommandLine &Cmd) diff --git a/apt-private/private-output.cc b/apt-private/private-output.cc index 659975476..6fadf7274 100644 --- a/apt-private/private-output.cc +++ b/apt-private/private-output.cc @@ -28,8 +28,7 @@ std::ostream c2out(0); std::ofstream devnull("/dev/null"); unsigned int ScreenWidth = 80 - 1; /* - 1 for the cursor */ - -bool InitOutput() +bool InitOutput() /*{{{*/ { c0out.rdbuf(cout.rdbuf()); c1out.rdbuf(cout.rdbuf()); @@ -60,8 +59,8 @@ bool InitOutput() return true; } - -std::string GetArchiveSuite(pkgCacheFile &CacheFile, pkgCache::VerIterator ver) + /*}}}*/ +std::string GetArchiveSuite(pkgCacheFile &CacheFile, pkgCache::VerIterator ver) /*{{{*/ { std::string suite = ""; if (ver && ver.FileList() && ver.FileList()) @@ -77,8 +76,8 @@ std::string GetArchiveSuite(pkgCacheFile &CacheFile, pkgCache::VerIterator ver) } return suite; } - -std::string GetFlagsStr(pkgCacheFile &CacheFile, pkgCache::PkgIterator P) + /*}}}*/ +std::string GetFlagsStr(pkgCacheFile &CacheFile, pkgCache::PkgIterator P)/*{{{*/ { pkgDepCache *DepCache = CacheFile.GetDepCache(); pkgDepCache::StateCache &state = (*DepCache)[P]; @@ -94,23 +93,23 @@ std::string GetFlagsStr(pkgCacheFile &CacheFile, pkgCache::PkgIterator P) flags_str = "-"; return flags_str; } - -std::string GetCandidateVersion(pkgCacheFile &CacheFile, pkgCache::PkgIterator P) + /*}}}*/ +std::string GetCandidateVersion(pkgCacheFile &CacheFile, pkgCache::PkgIterator P)/*{{{*/ { pkgPolicy *policy = CacheFile.GetPolicy(); pkgCache::VerIterator cand = policy->GetCandidateVer(P); return cand ? cand.VerStr() : "(none)"; } - -std::string GetInstalledVersion(pkgCacheFile &CacheFile, pkgCache::PkgIterator P) + /*}}}*/ +std::string GetInstalledVersion(pkgCacheFile &CacheFile, pkgCache::PkgIterator P)/*{{{*/ { pkgCache::VerIterator inst = P.CurrentVer(); return inst ? inst.VerStr() : "(none)"; } - -std::string GetVersion(pkgCacheFile &CacheFile, pkgCache::VerIterator V) + /*}}}*/ +std::string GetVersion(pkgCacheFile &CacheFile, pkgCache::VerIterator V)/*{{{*/ { pkgCache::PkgIterator P = V.ParentPkg(); if (V == P.CurrentVer()) @@ -127,8 +126,8 @@ std::string GetVersion(pkgCacheFile &CacheFile, pkgCache::VerIterator V) return DeNull(V.VerStr()); return "(none)"; } - -std::string GetArchitecture(pkgCacheFile &CacheFile, pkgCache::PkgIterator P) + /*}}}*/ +std::string GetArchitecture(pkgCacheFile &CacheFile, pkgCache::PkgIterator P)/*{{{*/ { pkgPolicy *policy = CacheFile.GetPolicy(); pkgCache::VerIterator inst = P.CurrentVer(); @@ -136,8 +135,8 @@ std::string GetArchitecture(pkgCacheFile &CacheFile, pkgCache::PkgIterator P) return inst ? inst.Arch() : cand.Arch(); } - -std::string GetShortDescription(pkgCacheFile &CacheFile, pkgRecords &records, pkgCache::PkgIterator P) + /*}}}*/ +std::string GetShortDescription(pkgCacheFile &CacheFile, pkgRecords &records, pkgCache::PkgIterator P)/*{{{*/ { pkgPolicy *policy = CacheFile.GetPolicy(); @@ -157,8 +156,8 @@ std::string GetShortDescription(pkgCacheFile &CacheFile, pkgRecords &records, pk } return ShortDescription; } - -void ListSingleVersion(pkgCacheFile &CacheFile, pkgRecords &records, + /*}}}*/ +void ListSingleVersion(pkgCacheFile &CacheFile, pkgRecords &records, /*{{{*/ pkgCache::VerIterator V, std::ostream &out) { pkgCache::PkgIterator P = V.ParentPkg(); @@ -230,8 +229,7 @@ void ListSingleVersion(pkgCacheFile &CacheFile, pkgRecords &records, << std::endl; } } - - + /*}}}*/ // ShowList - Show a list /*{{{*/ // --------------------------------------------------------------------- /* This prints out a string of space separated words with a title and diff --git a/apt-private/private-search.cc b/apt-private/private-search.cc index 6881f482f..ff4140fa7 100644 --- a/apt-private/private-search.cc +++ b/apt-private/private-search.cc @@ -1,3 +1,4 @@ +// Includes /*{{{*/ #include <apt-pkg/error.h> #include <apt-pkg/cachefile.h> #include <apt-pkg/cachefilter.h> @@ -34,9 +35,9 @@ #include "private-search.h" #include "private-cacheset.h" + /*}}}*/ - -bool FullTextSearch(CommandLine &CmdL) +bool FullTextSearch(CommandLine &CmdL) /*{{{*/ { pkgCacheFile CacheFile; pkgCache *Cache = CacheFile.GetPkgCache(); @@ -97,3 +98,4 @@ bool FullTextSearch(CommandLine &CmdL) return true; } + /*}}}*/ diff --git a/apt-private/private-show.cc b/apt-private/private-show.cc index e26a2b30a..7f4beb7d0 100644 --- a/apt-private/private-show.cc +++ b/apt-private/private-show.cc @@ -1,3 +1,4 @@ +// Includes /*{{{*/ #include <apt-pkg/error.h> #include <apt-pkg/cachefile.h> #include <apt-pkg/cachefilter.h> @@ -23,6 +24,7 @@ #include "private-output.h" #include "private-cacheset.h" + /*}}}*/ namespace APT { namespace Cmd { @@ -87,8 +89,7 @@ bool DisplayRecord(pkgCacheFile &CacheFile, pkgCache::VerIterator V, return true; } /*}}}*/ - -bool ShowPackage(CommandLine &CmdL) +bool ShowPackage(CommandLine &CmdL) /*{{{*/ { pkgCacheFile CacheFile; CacheSetHelperVirtuals helper(true, GlobalError::NOTICE); diff --git a/apt-private/private-upgrade.cc b/apt-private/private-upgrade.cc index 09085c2db..9a5286b57 100644 --- a/apt-private/private-upgrade.cc +++ b/apt-private/private-upgrade.cc @@ -1,13 +1,13 @@ - +// Includes /*{{{*/ #include <apt-pkg/algorithms.h> #include "private-install.h" #include "private-cachefile.h" #include "private-upgrade.h" #include "private-output.h" + /*}}}*/ - -// DoUpgradeNoNewPackages - Upgrade all packages /*{{{*/ +// DoUpgradeNoNewPackages - Upgrade all packages /*{{{*/ // --------------------------------------------------------------------- /* Upgrade all packages without installing new packages or erasing old packages */ @@ -31,7 +31,6 @@ bool DoUpgradeNoNewPackages(CommandLine &CmdL) return InstallPackages(Cache,true); } /*}}}*/ - // DoSafeUpgrade - Upgrade all packages with install but not remove /*{{{*/ bool DoUpgradeWithAllowNewPackages(CommandLine &CmdL) { diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc index c273dfaaa..8a30ac38d 100644 --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@ -84,11 +84,8 @@ #include <apti18n.h> /*}}}*/ - using namespace std; - - // TryToInstallBuildDep - Try to install a single package /*{{{*/ // --------------------------------------------------------------------- /* This used to be inlined in DoInstall, but with the advent of regex package @@ -1625,15 +1622,14 @@ void SigWinch(int) #endif } /*}}}*/ - -bool DoUpgrade(CommandLine &CmdL) +bool DoUpgrade(CommandLine &CmdL) /*{{{*/ { if (_config->FindB("APT::Get::UpgradeAllowNew", false) == true) return DoUpgradeWithAllowNewPackages(CmdL); else return DoUpgradeNoNewPackages(CmdL); } - + /*}}}*/ int main(int argc,const char *argv[]) /*{{{*/ { CommandLine::Dispatch Cmds[] = {{"update",&DoUpdate}, |