X-Git-Url: https://git.saurik.com/apt-legacy.git/blobdiff_plain/05d8d51418584fb3b032dd5f877a099aa10bbf7e..01d22655e3a095de0884c63545dddcf1fab12efc:/apt-pkg/pkgcachegen.h diff --git a/apt-pkg/pkgcachegen.h b/apt-pkg/pkgcachegen.h index 5ddb4cd..306b117 100644 --- a/apt-pkg/pkgcachegen.h +++ b/apt-pkg/pkgcachegen.h @@ -28,11 +28,11 @@ class OpProgress; class MMap; class pkgIndexFile; -class pkgCacheGenerator +class pkgCacheGenerator /*{{{*/ { private: - pkgCache::StringItem *UniqHash[32768*2]; + pkgCache::StringItem *UniqHash[26]; public: @@ -52,9 +52,11 @@ class pkgCacheGenerator bool FoundFileDeps; bool NewPackage(pkgCache::PkgIterator &Pkg,const string &PkgName); + bool NewPackage(pkgCache::PkgIterator &Pkg,const srkString &PkgName); bool NewFileVer(pkgCache::VerIterator &Ver,ListParser &List); bool NewFileDesc(pkgCache::DescIterator &Desc,ListParser &List); unsigned long NewVersion(pkgCache::VerIterator &Ver,const string &VerStr,unsigned long Next); + unsigned long NewVersion(pkgCache::VerIterator &Ver,const srkString &VerStr,unsigned long Next); map_ptrloc NewDescription(pkgCache::DescIterator &Desc,const string &Lang,const MD5SumValue &md5sum,map_ptrloc Next); public: @@ -76,8 +78,8 @@ class pkgCacheGenerator pkgCacheGenerator(DynamicMMap *Map,OpProgress *Progress); ~pkgCacheGenerator(); }; - -// This is the abstract package list parser class. + /*}}}*/ +// This is the abstract package list parser class. /*{{{*/ class pkgCacheGenerator::ListParser { pkgCacheGenerator *Owner; @@ -96,11 +98,17 @@ class pkgCacheGenerator::ListParser inline unsigned long WriteUniqString(const char *S,unsigned int Size) {return Owner->WriteUniqString(S,Size);}; inline unsigned long WriteString(const string &S) {return Owner->Map.WriteString(S);}; inline unsigned long WriteString(const char *S,unsigned int Size) {return Owner->Map.WriteString(S,Size);}; + inline unsigned long WriteString(const srkString &S) {return Owner->Map.WriteString(S.Start,S.Size);}; bool NewDepends(pkgCache::VerIterator Ver,const string &Package, const string &Version,unsigned int Op, unsigned int Type); + bool NewDepends(pkgCache::VerIterator Ver,const srkString &Package, + const srkString &Version,unsigned int Op, + unsigned int Type); bool NewProvides(pkgCache::VerIterator Ver,const string &Package, const string &Version); + bool NewProvides(pkgCache::VerIterator Ver,const srkString &Package, + const srkString &Version); bool NewTag(pkgCache::PkgIterator Pkg,const char *NameStart,unsigned int NameSize); public: @@ -127,7 +135,7 @@ class pkgCacheGenerator::ListParser ListParser() : FoundFileDeps(false) {}; virtual ~ListParser() {}; }; - + /*}}}*/ bool pkgMakeStatusCache(pkgSourceList &List,OpProgress &Progress, MMap **OutMap = 0,bool AllowMem = false); bool pkgMakeOnlyStatusCache(OpProgress &Progress,DynamicMMap **OutMap);