// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: pkgcache.cc,v 1.29 1999/10/02 03:11:50 jgg Exp $
+// $Id: pkgcache.cc,v 1.30 1999/12/05 05:37:45 jgg Exp $
/* ######################################################################
Package Cache - Accessor code for the cache
#include <apt-pkg/pkgcache.h>
#include <apt-pkg/version.h>
#include <apt-pkg/error.h>
+#include <apt-pkg/strutl.h>
#include <system.h>
#include <string>
/* Whenever the structures change the major version should be bumped,
whenever the generator changes the minor version should be bumped. */
MajorVersion = 3;
- MinorVersion = 4;
+ MinorVersion = 5;
Dirty = true;
HeaderSz = sizeof(pkgCache::Header);
{
unsigned long Hash = 0;
for (const char *I = Str.begin(); I != Str.end(); I++)
- Hash = 5*Hash + *I;
+ Hash = 5*Hash + tolower(*I);
return Hash % _count(HeaderP->HashTable);
}
{
unsigned long Hash = 0;
for (const char *I = Str; *I != 0; I++)
- Hash = 5*Hash + *I;
+ Hash = 5*Hash + tolower(*I);
return Hash % _count(HeaderP->HashTable);
}
for (; Pkg != PkgP; Pkg = PkgP + Pkg->NextPackage)
{
if (Pkg->Name != 0 && StrP[Pkg->Name] == Name[0] &&
- StrP + Pkg->Name == Name)
+ stringcasecmp(Name.begin(),Name.end(),StrP + Pkg->Name) == 0)
return PkgIterator(*this,Pkg);
-// cout << "b" << flush;
}
return PkgIterator(*this,0);
}