dpkg 1.21.11
Functions
pkg-array.c File Reference

(31eb54491)

#include <config.h>
#include <compat.h>
#include <string.h>
#include <stdlib.h>
#include <dpkg/dpkg.h>
#include <dpkg/dpkg-db.h>
#include <dpkg/pkg-spec.h>
#include <dpkg/pkg-array.h>
Include dependency graph for pkg-array.c:

Functions

void pkg_array_init_from_names (struct pkg_array *a, pkg_mapper_func pkg_mapper, const char **pkg_names)
 Initialize a package array from package names. More...
 
void pkg_array_init_from_hash (struct pkg_array *a)
 Initialize a package array from the package database. More...
 
void pkg_array_foreach (struct pkg_array *a, pkg_array_visitor_func *pkg_visitor, void *pkg_data)
 Visit each non-NULL package in a package array. More...
 
void pkg_array_sort (struct pkg_array *a, pkg_sorter_func *pkg_sort)
 Sort a package array. More...
 
void pkg_array_destroy (struct pkg_array *a)
 Destroy a package array. More...
 

Function Documentation

◆ pkg_array_init_from_names()

void pkg_array_init_from_names ( struct pkg_array a,
pkg_mapper_func  pkg_mapper,
const char **  pkg_names 
)

Initialize a package array from package names.

Parameters
aThe array to initialize.
pkg_mapperA function that maps a package name to a package instance.
pkg_namesThe package names list.

References m_malloc(), pkg_array::n_pkgs, and pkg_array::pkgs.

Referenced by audit().

Here is the call graph for this function:
Here is the caller graph for this function: