summaryrefslogtreecommitdiff
path: root/apt-pkg/pkgcache.cc
diff options
context:
space:
mode:
Diffstat (limited to 'apt-pkg/pkgcache.cc')
-rw-r--r--apt-pkg/pkgcache.cc14
1 files changed, 13 insertions, 1 deletions
diff --git a/apt-pkg/pkgcache.cc b/apt-pkg/pkgcache.cc
index 02b28fa47..2e62f2ea4 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.8 1998/07/19 04:22:00 jgg Exp $
+// $Id: pkgcache.cc,v 1.9 1998/10/02 04:39:46 jgg Exp $
/* ######################################################################
Package Cache - Accessor code for the cache
@@ -336,6 +336,18 @@ pkgCache::Version **pkgCache::DepIterator::AllTargets()
return Res;
}
/*}}}*/
+// DepIterator::CompType - Return a string describing the compare type /*{{{*/
+// ---------------------------------------------------------------------
+/* This returns a string representation of the dependency compare
+ type */
+const char *pkgCache::DepIterator::CompType()
+{
+ const char *Ops[] = {"","<=",">=","<",">","=","!="};
+ if ((Dep->CompareOp & 0xF) < sizeof(Ops))
+ return Ops[Dep->CompareOp & 0xF];
+ return "";
+}
+ /*}}}*/
// VerIterator::CompareVer - Fast version compare for same pkgs /*{{{*/
// ---------------------------------------------------------------------
/* This just looks over the version list to see if B is listed before A. In