dpkg 1.21.11
Functions
Package information display
Collaboration diagram for Package information display:

Functions

int pkg_sorter_by_nonambig_name_arch (const void *a, const void *b)
 Compare a package to be sorted by non-ambiguous name and architecture. More...
 
const char * pkgbin_synopsis (const struct pkginfo *pkg, const struct pkgbin *pkgbin, int *len_ret)
 Return a string representation of the package synopsis. More...
 
const char * pkg_synopsis (const struct pkginfo *pkg, int *len_ret)
 Return a string representation of the package synopsis. More...
 
int pkg_abbrev_want (const struct pkginfo *pkg)
 Return a character abbreviated representation of the package want status. More...
 
int pkg_abbrev_status (const struct pkginfo *pkg)
 Return a character abbreviated representation of the package current status. More...
 
int pkg_abbrev_eflag (const struct pkginfo *pkg)
 Return a character abbreviated representation of the package eflag status. More...
 

Detailed Description

Function Documentation

◆ pkg_abbrev_eflag()

int pkg_abbrev_eflag ( const struct pkginfo pkg)

Return a character abbreviated representation of the package eflag status.

Parameters
pkgThe package to consider.
Returns
The character abbreviated representation.

References pkginfo::eflag.

◆ pkg_abbrev_status()

int pkg_abbrev_status ( const struct pkginfo pkg)

Return a character abbreviated representation of the package current status.

Parameters
pkgThe package to consider.
Returns
The character abbreviated representation.

References pkginfo::status.

◆ pkg_abbrev_want()

int pkg_abbrev_want ( const struct pkginfo pkg)

Return a character abbreviated representation of the package want status.

Parameters
pkgThe package to consider.
Returns
The character abbreviated representation.

References pkginfo::want.

◆ pkg_sorter_by_nonambig_name_arch()

int pkg_sorter_by_nonambig_name_arch ( const void *  a,
const void *  b 
)

Compare a package to be sorted by non-ambiguous name and architecture.

Parameters
aA pointer of a pointer to a struct pkginfo.
bA pointer of a pointer to a struct pkginfo.
Returns
An integer with the result of the comparison.
Return values
-1a is earlier than b.
0a is equal to b.
1a is later than b.

References pkgbin::arch, pkginfo::installed, pkgset::name, and pkginfo::set.

Referenced by writedb_records().

Here is the caller graph for this function:

◆ pkg_synopsis()

const char * pkg_synopsis ( const struct pkginfo pkg,
int *  len 
)

Return a string representation of the package synopsis.

The returned string must not be freed, and it's permanently allocated so can be used as long as the non-freeing memory pool has not been freed.

It will try to use the installed version, otherwise it will fallback to use the available version.

The package synopsis is the short description, but it is not NUL terminated, so the output len argument should be used to limit the string length.

Parameters
pkgThe package to consider.
[out]lenThe length of the synopsis string within the description.
Returns
The string representation.

References _, pkginfo::available, pkgbin::description, and pkginfo::installed.

◆ pkgbin_synopsis()

const char * pkgbin_synopsis ( const struct pkginfo pkg,
const struct pkgbin pkgbin,
int *  len 
)

Return a string representation of the package synopsis.

The returned string must not be freed, and it's permanently allocated so can be used as long as the non-freeing memory pool has not been freed.

The package synopsis is the short description, but it is not NUL terminated, so the output len argument should be used to limit the string length.

Parameters
pkgThe package to consider.
pkgbinThe binary package instance to consider.
[out]lenThe length of the synopsis string within the description.
Returns
The string representation.

References _, and pkgbin::description.