#include "system.h"
#include <rpmiotypes.h>
#include <rpmmacro.h>
#include <mire.h>
#include <rpmtag.h>
#include <rpmevr.h>
#include "debug.h"
Go to the source code of this file.
Data Structures | |
struct | EVRop_s |
Defines | |
#define | _MIRE_INTERNAL |
#define | _RPMEVR_INTERNAL |
#define | MAX(x, y) ( ((x)>(y))?(x):(y) ) |
Functions | |
EVR_t | rpmEVRnew (rpmuint32_t Flags, int initialize) |
Create a new EVR container. | |
EVR_t | rpmEVRfree (EVR_t evr) |
Destroy an EVR container. | |
static int | xisrpmalpha (int c) |
Return rpm's analogue of xisalpha. | |
int | rpmEVRcmp (const char *a, const char *b) |
Segmented string compare. | |
static miRE | rpmEVRmire (void) |
int | rpmEVRparse (const char *evrstr, EVR_t evr) |
Split EVR string into epoch, version, and release components. | |
static int | compare_values (const char *a, const char *b) |
Dressed rpmEVRcmp, handling missing values. | |
static const char * | rpmEVRorder (void) |
Return precedence permutation string. | |
int | rpmEVRcompare (const EVR_t a, const EVR_t b) |
Compare EVR containers for equality. | |
int | rpmEVRoverlap (EVR_t a, EVR_t b) |
Compare EVR containers for overlap. | |
rpmsenseFlags | rpmEVRflags (const char *op, const char **end) |
Return comparison operator sense flags. | |
int | rpmVersionCompare (Header A, Header B) |
Compare headers to determine which header is "newer". | |
Variables | |
int | _rpmevr_debug = 0 |
static int | _invert_digits_alphas_comparison = 1 |
static const char * | _rpmnotalpha = ".:-" |
static const char * | _evr_tuple_match = "^(?:([^:-]+):)?([^:-]+)(?:-([^:-]+))?(?::([^:-]+))?$" |
const char * | evr_tuple_match = NULL |
miRE | evr_tuple_mire = NULL |
static const char * | evr_tuple_order = NULL |
int(* | rpmvercmp )(const char *a, const char *b) = rpmEVRcmp |
Segmented string compare vector. | |
static struct EVRop_s | cops [] |
#define MAX | ( | x, | |
y | |||
) | ( ((x)>(y))?(x):(y) ) |
Definition at line 21 of file rpmevr.c.
Referenced by rpmEVRcmp().
static int compare_values | ( | const char * | a, |
const char * | b | ||
) | [static] |
Dressed rpmEVRcmp, handling missing values.
a | 1st string |
b | 2nd string |
Definition at line 234 of file rpmevr.c.
References rpmvercmp.
Referenced by rpmEVRcompare().
rpmsenseFlags rpmEVRflags | ( | const char * | op, |
const char ** | end | ||
) |
Return comparison operator sense flags.
op | operator string (NULL or "" uses RPMSENSE_EQUAL) |
*end | pointer to 1st character after operator (or NULL) |
Definition at line 357 of file rpmevr.c.
References cops, EVRop_s::operator, RPMSENSE_EQUAL, and EVRop_s::sense.
Referenced by parseRCPOT(), and rpmdsSysinfoFile().
Destroy an EVR container.
EVR | container |
Definition at line 39 of file rpmevr.c.
References _free().
Referenced by labelCompare(), nwlookupTag(), and wnlookupTag().
static miRE rpmEVRmire | ( | void | ) | [static] |
Definition at line 149 of file rpmevr.c.
References _evr_tuple_match, evr_tuple_match, evr_tuple_mire, mireNew(), mireRegcomp(), mireSetCOptions(), rpmExpand(), RPMMIRE_REGEX, and xstrdup().
Referenced by rpmEVRparse().
static const char* rpmEVRorder | ( | void | ) | [static] |
Return precedence permutation string.
Definition at line 248 of file rpmevr.c.
References evr_tuple_order, rpmExpand(), and xstrdup().
Referenced by rpmEVRcompare(), and rpmVersionCompare().
Compare headers to determine which header is "newer".
A | 1st header |
B | 2nd header |
Definition at line 376 of file rpmevr.c.
References _free(), alloca(), headerGet(), _HE_s::p, rpmDataType_u::ptr, rpmEVRorder(), rpmvercmp, rpmDataType_u::str, _HE_s::tag, and rpmDataType_u::ui32p.
Referenced by hdr_compare(), and rpmcliInstall().
static int xisrpmalpha | ( | int | c ) | [inline, static] |
Return rpm's analogue of xisalpha.
c | character to test |
Definition at line 66 of file rpmevr.c.
References _rpmnotalpha, xisalpha(), and xispunct().
Referenced by rpmEVRcmp().
const char* _evr_tuple_match = "^(?:([^:-]+):)?([^:-]+)(?:-([^:-]+))?(?::([^:-]+))?$" [static] |
Definition at line 142 of file rpmevr.c.
Referenced by rpmEVRmire().
int _invert_digits_alphas_comparison = 1 [static] |
Definition at line 54 of file rpmevr.c.
Referenced by rpmEVRcmp().
int _rpmevr_debug = 0 |
const char* _rpmnotalpha = ".:-" [static] |
Definition at line 59 of file rpmevr.c.
Referenced by xisrpmalpha().
Referenced by rpmEVRflags().
const char* evr_tuple_match = NULL |
Definition at line 145 of file rpmevr.c.
Referenced by rpmcliFini(), and rpmEVRmire().
miRE evr_tuple_mire = NULL |
Definition at line 147 of file rpmevr.c.
Referenced by rpmcliFini(), and rpmEVRmire().
const char* evr_tuple_order = NULL [static] |
Definition at line 241 of file rpmevr.c.
Referenced by rpmcliFini(), and rpmEVRorder().