Next: xmap_process, Previous: write_hdrf_def, Up: Internal Functions
Compact a list of transformation maps
#include <bpipe/bpipe.h>static Xmap *xmap_compact(size_t *nmap);
size_t *nmap
- the number of elements in the resultant
Xmap
array
xmap_compact
operates on the file global linked list
xmap_ll
. This list consists of Xmap
structures which
specify the copy operations required to map between two data packet images.
xmap_compact
combines contigous copy operations. xmap_ll
must contain at least one element.
xmap_ll
is deleted after it is processed, even upon error.
On error it returns NULL
and sets bpipe_errno
, else it returns
a pointer to an array of Xmap
structures which define the
transformations. It returns the length of the array via the
parameter nmap
.
Upon error bpipe_errno
is set to one of the following:
BPEBADARG
BPENOMEM