X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/3c124dde9567dd8c45d271bf2eaadffa5754f7d9..099a47599805a7050bc788a4a94f7f9bae929554:/apt-pkg/pkgcache.h?ds=sidebyside diff --git a/apt-pkg/pkgcache.h b/apt-pkg/pkgcache.h index 2d174cc01..f7349c7a1 100644 --- a/apt-pkg/pkgcache.h +++ b/apt-pkg/pkgcache.h @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: pkgcache.h,v 1.15 1998/12/14 08:07:29 jgg Exp $ +// $Id: pkgcache.h,v 1.20 1999/05/23 22:55:54 jgg Exp $ /* ###################################################################### Cache - Structure definitions for the cache file @@ -80,8 +80,7 @@ class pkgCache struct Flag { - enum PkgFlags {Auto=(1<<0),New=(1<<1),Obsolete=(1<<2),Essential=(1<<3), - ImmediateConf=(1<<4)}; + enum PkgFlags {Auto=(1<<0),Essential=(1<<3),Important=(1<<4)}; enum PkgFFlags {NotSource=(1<<0),NotAutomatic=(1<<1)}; }; @@ -91,8 +90,8 @@ class pkgCache string CacheFile; MMap ⤅ - static unsigned long sHash(string S); - static unsigned long sHash(const char *S); + unsigned long sHash(string S) const; + unsigned long sHash(const char *S) const; public: @@ -125,6 +124,7 @@ class pkgCache inline PkgIterator PkgEnd(); inline PkgFileIterator FileBegin(); inline PkgFileIterator FileEnd(); + VerIterator GetCandidateVer(PkgIterator Pkg,bool AllowCurrent = true); pkgCache(MMap &Map); virtual ~pkgCache() {}; @@ -166,7 +166,7 @@ struct pkgCache::Header DynamicMMap::Pool Pools[7]; // Rapid package name lookup - __apt_ptrloc HashTable[2048]; + __apt_ptrloc HashTable[2*1048]; bool CheckSizes(Header &Against) const; Header(); @@ -227,7 +227,8 @@ struct pkgCache::Version { __apt_ptrloc VerStr; // Stringtable __apt_ptrloc Section; // StringTable (StringItem) - + __apt_ptrloc Arch; // StringTable + // Lists __apt_ptrloc FileList; // VerFile __apt_ptrloc NextVer; // Version @@ -237,6 +238,7 @@ struct pkgCache::Version __apt_ptrloc Size; // These are the .deb size __apt_ptrloc InstalledSize; + unsigned short Hash; unsigned short ID; unsigned char Priority; };