9 #define _RPMEVR_INTERNAL
35 if (a == NULL) a =
"";
36 if (b == NULL) b =
"";
44 if (vc != rc)
return vc - rc;
48 while (*a ==
'0') a++;
49 while (*b ==
'0') b++;
51 if (!first_diff) first_diff = (int)(*a - *b);
56 if (first_diff)
return first_diff;
70 if (a->Elong > b->Elong)
return 1;
71 if (a->Elong < b->Elong)
return -1;
72 r =
dpkgEVRcmp(a->F[RPMEVR_V], b->F[RPMEVR_V]);
if (r)
return r;
73 return dpkgEVRcmp(a->F[RPMEVR_R], b->F[RPMEVR_R]);
int rpmEVRparse(const char *evrstr, EVR_t evr)
Split EVR string into epoch, version, and release components.
static int xisalpha(int c)
int dpkgEVRcompare(const EVR_t a, const EVR_t b)
Compare EVR containers.
int dpkgEVRparse(const char *evrstr, EVR_t evr)
Split EVR string into epoch, version, and release components.
static int xisdigit(int c)
Structure(s) and routine(s) used for dpkg EVR parsing and comparison.
static int dpkgEVRctype(char x)
int dpkgEVRcmp(const char *a, const char *b)
Segmented string compare.