diff options
Diffstat (limited to 'apt-pkg/pkgcache.cc')
-rw-r--r-- | apt-pkg/pkgcache.cc | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/apt-pkg/pkgcache.cc b/apt-pkg/pkgcache.cc index fa0c363f7..e2602c88f 100644 --- a/apt-pkg/pkgcache.cc +++ b/apt-pkg/pkgcache.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: pkgcache.cc,v 1.2 1998/07/04 05:57:35 jgg Exp $ +// $Id: pkgcache.cc,v 1.3 1998/07/04 22:32:11 jgg Exp $ /* ###################################################################### Package Cache - Accessor code for the cache @@ -158,6 +158,17 @@ pkgCache::PkgIterator pkgCache::FindPkg(string Name) return PkgIterator(*this,0); } /*}}}*/ +// Cache::Priority - Convert a priority value to a string /*{{{*/ +// --------------------------------------------------------------------- +/* */ +const char *pkgCache::Priority(unsigned char Prio) +{ + const char *Mapping[] = {0,"important","required","standard","optional","extra"}; + if (Prio < _count(Mapping)) + return Mapping[Prio]; + return 0; +} + /*}}}*/ // Bases for iterator classes /*{{{*/ void pkgCache::VerIterator::_dummy() {} |