dpkg 1.21.11
Data Structures | Macros | Functions
.deb format version handling
Collaboration diagram for .deb format version handling:

Data Structures

struct  deb_version
 Data structure representing a .deb format version. More...
 

Macros

#define DEB_VERSION(X, Y)    { .major = (X), .minor = (Y) }
 Constant initializer for a deb_version. More...
 
#define DEB_VERSION_OBJECT(X, Y)    (struct deb_version)DEB_VERSION(X, Y)
 Compound literal for a deb_version. More...
 

Functions

const char * deb_version_parse (struct deb_version *version, const char *str)
 Parse a .deb format version. More...
 

Detailed Description

Macro Definition Documentation

◆ DEB_VERSION

#define DEB_VERSION (   X,
 
)     { .major = (X), .minor = (Y) }

Constant initializer for a deb_version.

◆ DEB_VERSION_OBJECT

#define DEB_VERSION_OBJECT (   X,
 
)     (struct deb_version)DEB_VERSION(X, Y)

Compound literal for a deb_version.

Function Documentation

◆ deb_version_parse()

const char * deb_version_parse ( struct deb_version version,
const char *  str 
)

Parse a .deb format version.

It takes a string and parses a .deb archive format version in the form of "X.Y", without any leading whitespace, and ending in either a newline or a NUL. If there is any syntax error a descriptive error string is returned.

Parameters
versionThe version to return.
strThe string to parse.
Returns
An error string, or NULL if there was no error.