Previous: xmap_compact, Up: Internal Functions   [Contents]


A.5.60 xmap_process

xmap_process

Synopsis

#include <bpipe/bpipe.h>

static int xmap_process(
  void *udata,
  size_t dst,
  size_t src,
  size_t size
);

Parameters

void *udata

copy routine specific data

size_t dst

destination of chunk

size_t src

source of chunk

size_t size

size of chunk in bytes

Description

This is a callback routine invoked by bpipe_datatype_copy. Instead of copying, it stores the source, destination, and length in a file global linked list, which will be compacted by xmap_compact after all data packet fields have been processed.

Returns

It returns zero upon success, non-zero upon failure (out of memoryb). It sets bpipe_errno to BPENOMEM upon failure.