// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: debversion.h,v 1.2 2001/02/20 07:03:17 jgg Exp $
+// $Id: debversion.h,v 1.3 2001/05/03 05:25:04 jgg Exp $
/* ######################################################################
Debian Version - Versioning system for Debian
#include <apt-pkg/version.h>
class debVersioningSystem : public pkgVersioningSystem
-{
+{
+ public:
+
static int CmpFragment(const char *A, const char *AEnd, const char *B,
const char *BEnd);
- public:
-
// Compare versions..
virtual int DoCmpVersion(const char *A,const char *Aend,
const char *B,const char *Bend);
--- /dev/null
+#include <apt-pkg/debversion.h>
+#include <rpm/rpmio.h>
+#include <rpm/misc.h>
+#include <stdlib.h>
+
+int main(int argc,const char *argv[])
+{
+ printf("'%s' <> '%s': ",argv[1],argv[2]);
+ printf("rpm: %i deb: %i\n",rpmvercmp(argv[1],argv[2]),
+ debVS.CmpFragment(argv[1],argv[1]+strlen(argv[1]),
+ argv[2],argv[2]+strlen(argv[2])));
+
+ printf("'%s' <> '%s': ",argv[2],argv[1]);
+ printf("rpm: %i deb: %i\n",rpmvercmp(argv[2],argv[1]),
+ debVS.CmpFragment(argv[2],argv[2]+strlen(argv[2]),
+ argv[1],argv[1]+strlen(argv[1])));
+ return 0;
+}