// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: pkgcache.cc,v 1.18 1998/11/27 00:07:24 jgg Exp $
+// $Id: pkgcache.cc,v 1.20 1998/12/07 07:26:19 jgg Exp $
/* ######################################################################
Package Cache - Accessor code for the cache
Package *Pkg = PkgP + HeaderP->HashTable[Hash(Name)];
for (; Pkg != PkgP; Pkg = PkgP + Pkg->NextPackage)
{
- if (Pkg->Name != 0 && StrP + Pkg->Name == Name)
+ if (Pkg->Name != 0 && StrP[Pkg->Name] == Name[0] &&
+ StrP + Pkg->Name == Name)
return PkgIterator(*this,Pkg);
}
return PkgIterator(*this,0);
// Compute a single dependency element (glob or)
Start = *this;
End = *this;
- for (bool LastOR = true; end() == false && LastOR == true; (*this)++)
+ for (bool LastOR = true; end() == false && LastOR == true;)
{
LastOR = (Dep->CompareOp & pkgCache::Dep::Or) == pkgCache::Dep::Or;
+ (*this)++;
if (LastOR == true)
End = (*this);
}