dpkg 1.21.11
Data Structures | Macros | Enumerations | Functions
version.h File Reference

(9022f9e0f)

#include <stdbool.h>
#include <dpkg/macros.h>
Include dependency graph for version.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  dpkg_version
 Data structure representing a Debian version. More...
 

Macros

#define DPKG_VERSION_OBJECT(e, v, r)    (struct dpkg_version){ .epoch = (e), .version = (v), .revision = (r) }
 Compound literal for a dpkg_version. More...
 
#define DPKG_VERSION_INIT    DPKG_VERSION_OBJECT(0, NULL, NULL)
 

Enumerations

enum  dpkg_relation {
  DPKG_RELATION_NONE = 0 , DPKG_RELATION_EQ = DPKG_BIT(0) , DPKG_RELATION_LT = DPKG_BIT(1) , DPKG_RELATION_LE = DPKG_RELATION_LT | DPKG_RELATION_EQ ,
  DPKG_RELATION_GT = DPKG_BIT(2) , DPKG_RELATION_GE = DPKG_RELATION_GT | DPKG_RELATION_EQ
}
 Enum constants for the supported relation operations that can be done on Debian versions. More...
 

Functions

void dpkg_version_blank (struct dpkg_version *version)
 Turn the passed version into an empty version. More...
 
bool dpkg_version_is_informative (const struct dpkg_version *version)
 Test if a version is not empty. More...
 
int dpkg_version_compare (const struct dpkg_version *a, const struct dpkg_version *b)
 Compares two Debian versions. More...
 
bool dpkg_version_relate (const struct dpkg_version *a, enum dpkg_relation rel, const struct dpkg_version *b)
 Check if two versions have a certain relation. More...