X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/578bfd0aed2ec993f4ad85fa6a7094a852261422..1d9fd7a2528bfb3ce95cfe65c227fafa912f38e8:/apt-pkg/version.h diff --git a/apt-pkg/version.h b/apt-pkg/version.h index a30246946..127519583 100644 --- a/apt-pkg/version.h +++ b/apt-pkg/version.h @@ -1,13 +1,12 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: version.h,v 1.1 1998/07/02 02:58:13 jgg Exp $ +// $Id: version.h,v 1.5 1999/04/19 06:03:09 jgg Exp $ /* ###################################################################### - Version - Version string + Version - Version comparison routines - This class implements storage and operators for version strings. - - The client is responsible for stripping epochs should it be desired. + These routines provide some means to compare versions and check + dependencies. ##################################################################### */ /*}}}*/ @@ -15,31 +14,17 @@ #ifndef PKGLIB_VERSION_H #define PKGLIB_VERSION_H -#include - -class pkgVersion -{ - string Value; - - public: - - inline operator string () const {return Value;}; +#ifdef __GNUG__ +#pragma interface "apt-pkg/version.h" +#endif - // Assignmnet - void operator =(string rhs) {Value = rhs;}; - - // Comparitors. STL will provide the rest - bool operator ==(const pkgVersion &rhs) const; - bool operator <(const pkgVersion &rhs) const; - - pkgVersion(); - pkgVersion(string Version) : Value(Version) {}; -}; +#include int pkgVersionCompare(const char *A, const char *B); int pkgVersionCompare(const char *A, const char *AEnd, const char *B, const char *BEnd); int pkgVersionCompare(string A,string B); bool pkgCheckDep(const char *DepVer,const char *PkgVer,int Op); +string pkgBaseVersion(const char *Ver); #endif