X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/b2e465d6d32d2dc884f58b94acb7e35f671a87fe..89d88ac3ef3f82fdfeac6d8d231deddeeb0f02e9:/apt-pkg/version.h diff --git a/apt-pkg/version.h b/apt-pkg/version.h index 27e8e1f1b..92dbc2576 100644 --- a/apt-pkg/version.h +++ b/apt-pkg/version.h @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: version.h,v 1.6 2001/02/20 07:03:17 jgg Exp $ +// $Id: version.h,v 1.8 2001/05/27 05:55:27 jgg Exp $ /* ###################################################################### Version - Versioning system.. @@ -20,10 +20,7 @@ #ifndef PKGLIB_VERSION_H #define PKGLIB_VERSION_H -#ifdef __GNUG__ -#pragma interface "apt-pkg/version.h" -#endif - +#include #include class pkgVersioningSystem @@ -39,39 +36,22 @@ class pkgVersioningSystem // Compare versions.. virtual int DoCmpVersion(const char *A,const char *Aend, const char *B,const char *Bend) = 0; + virtual bool CheckDep(const char *PkgVer,int Op,const char *DepVer) = 0; virtual int DoCmpReleaseVer(const char *A,const char *Aend, const char *B,const char *Bend) = 0; - virtual string UpstreamVersion(const char *A) = 0; + virtual std::string UpstreamVersion(const char *A) = 0; // See if the given VS is compatible with this one.. virtual bool TestCompatibility(pkgVersioningSystem const &Against) {return this == &Against;}; // Shortcuts - inline int CmpVersion(const char *A, const char *B) - { - return DoCmpVersion(A,A+strlen(A),B,B+strlen(B)); - }; - inline int CmpVersion(string A,string B) - { - return DoCmpVersion(A.begin(),A.end(),B.begin(),B.end()); - }; - inline int CmpReleaseVer(const char *A, const char *B) - { - return DoCmpReleaseVer(A,A+strlen(A),B,B+strlen(B)); - }; - inline int CmpReleaseVer(string A,string B) - { - return DoCmpReleaseVer(A.begin(),A.end(),B.begin(),B.end()); - }; + APT_MKSTRCMP(CmpVersion,DoCmpVersion); + APT_MKSTRCMP(CmpReleaseVer,DoCmpReleaseVer); pkgVersioningSystem(); virtual ~pkgVersioningSystem() {}; }; -#ifdef APT_COMPATIBILITY -#include -#endif - #endif