From 50739385a384eeafe2ce3d213ce74512827eaed8 Mon Sep 17 00:00:00 2001 From: Guillem Jover Date: Tue, 22 Jan 2008 10:35:12 +0200 Subject: [PATCH] libdpkg: Remove dead verrevcmp function --- ChangeLog | 4 ++++ lib/vercmp.c | 36 ------------------------------------ 2 files changed, 4 insertions(+), 36 deletions(-) diff --git a/ChangeLog b/ChangeLog index 527cb67e..885181ba 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2008-01-22 Guillem Jover + + * lib/vercmp.c [0] (verrevcmp): Remove dead code. + 2008-01-22 Guillem Jover * lib/dpkg.h [!offsetof] (offsetof): New compatibilty macro. diff --git a/lib/vercmp.c b/lib/vercmp.c index 5e9b006c..2360724f 100644 --- a/lib/vercmp.c +++ b/lib/vercmp.c @@ -65,42 +65,6 @@ static int verrevcmp(const char *val, const char *ref) { return 0; } - -#if 0 -static int verrevcmp(const char *ival, const char *iref) { - static char empty[] = ""; - int vc, rc; - long vl, rl; - char *vp, *rp; - char *val, *ref; - memcpy(&val,&ival,sizeof(char*)); - memcpy(&ref,&iref,sizeof(char*)); - - if (!val) val= empty; - if (!ref) ref= empty; - for (;;) { - vp= val; while (*vp && !isdigit(*vp)) vp++; - rp= ref; while (*rp && !isdigit(*rp)) rp++; - for (;;) { - vc= val == vp ? 0 : *val++; - rc= ref == rp ? 0 : *ref++; - if (!rc && !vc) break; - if (vc && !isalpha(vc)) vc += 256; /* assumes ASCII character set */ - if (rc && !isalpha(rc)) rc += 256; - if (vc != rc) return vc - rc; - } - val= vp; - ref= rp; - vl=0; if (isdigit(*vp)) vl= strtol(val,&val,10); - rl=0; if (isdigit(*rp)) rl= strtol(ref,&ref,10); - if (vl != rl) return vl - rl; - if (!*val && !*ref) return 0; - if (!*val) return -1; - if (!*ref) return +1; - } -} -#endif - int versioncompare(const struct versionrevision *version, const struct versionrevision *refversion) { int r; -- 2.39.5