summaryrefslogtreecommitdiff
path: root/apt-pkg/pkgcache.cc
diff options
context:
space:
mode:
authorArch Librarian <arch@canonical.com>2004-09-20 16:50:38 +0000
committerArch Librarian <arch@canonical.com>2004-09-20 16:50:38 +0000
commit0149949bce07d3a15cb8a197df1240d56f7bcd26 (patch)
tree480da4e027332ba1d69d9e38a5bf67a0a946ea65 /apt-pkg/pkgcache.cc
parentf55a958ff2251f0061ab907157c99a350e56025f (diff)
Checkpoint
Author: jgg Date: 1998-07-04 22:32:11 GMT Checkpoint
Diffstat (limited to 'apt-pkg/pkgcache.cc')
-rw-r--r--apt-pkg/pkgcache.cc13
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() {}