# lib/rpmevr.c File Reference

`#include "system.h"`
`#include <rpmio.h>`
`#include <rpmevr.h>`
`#include "debug.h"`

Include dependency graph for rpmevr.c:

Go to the source code of this file.

## Data Structures

struct | EVRop_s

## Defines

#define | _RPMEVR_INTERNAL
#define | MAX(x, y) ( ((x)>(y))?(x):(y) )

## Functions

static int | xisrpmalpha (int c)
| Return rpm's analogue of xisalpha.
int | rpmEVRcmp (const char *a, const char *b)
| Segmented string compare.
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.
int | rpmEVRcompare (const EVR_t a, const EVR_t b)
| Compare EVR containers.
rpmsenseFlags | rpmEVRflags (const char *op, const char **end)
| Return comparison operator sense flags.

## Variables

int | _rpmevr_debug = 0
static int | _invert_digits_alphas_comparison = -1
static const char * | _rpmnotalpha = ".:-"
int(* | rpmvercmp )(const char *a, const char *b) = rpmEVRcmp
| Segmented string compare vector.
static struct EVRop_s | cops []

## Detailed Description

Definition in file rpmevr.c.

## Define Documentation

#define _RPMEVR_INTERNAL

Definition at line 8 of file rpmevr.c.

#define MAX | ( | x,
|  | y |  | ) | ( ((x)>(y))?(x):(y) )

Definition at line 17 of file rpmevr.c.

Referenced by rpmEVRcmp().

## Function Documentation

static int compare_values | ( | const char * | a,
|  | const char * | b |
| ) |  |  | `[static]`

Dressed rpmEVRcmp, handling missing values.

Parameters:

  | a | 1st string
  | b | 2nd string

Returns:
  +1 if a is "newer", 0 if equal, -1 if b is "newer"

Definition at line 132 of file rpmevr.c.

References rpmvercmp.

Referenced by rpmEVRcompare().

rpmsenseFlags rpmEVRflags | ( | const char * | op,
|  | const char ** | end |
| ) |  |  |

Return comparison operator sense flags.

Parameters:

  | op | operator string (NULL or "" uses RPMSENSE_EQUAL)
  | *end | pointer to 1st character after operator (or NULL)

Returns:
  sense flags

Definition at line 177 of file rpmevr.c.

References cops, EVRop_s::operator, RPMSENSE_EQUAL, and EVRop_s::sense.

Referenced by parseRCPOT(), rpmdsPipe(), and rpmdsSysinfoFile().

static int xisrpmalpha | ( | int | c | ) | `[inline, static]`

Return rpm's analogue of xisalpha.

Parameters:

  | c | character to test

Returns:
  is this an alpha character?

Definition at line 33 of file rpmevr.c.

References _rpmnotalpha, xisalpha(), and xispunct().

Referenced by rpmEVRcmp().

## Variable Documentation

int _invert_digits_alphas_comparison = -1`[static]`

Definition at line 22 of file rpmevr.c.

Referenced by rpmEVRcmp().

int _rpmevr_debug = 0

Definition at line 14 of file rpmevr.c.

const char* _rpmnotalpha = ".:-"`[static]`

Definition at line 26 of file rpmevr.c.

Referenced by xisrpmalpha().

struct EVRop_s cops[]`[static]`

Referenced by rpmEVRflags().