User Tools

Site Tools


Sidebar

Table Of Contents

endurox:v7.5.x:api:ubf:bprojcpy.3

bprojcpy

Name

Bprojcpy — perform projection copy from one buffer to another

Synopsis

#include <ubf.h>

int Bprojcpy (UBFH *p_ub_dst, UBFH *p_ub_src, BFLDID *fldlist);

Link with -lubf -lnstd -lm -lpthread

DESCRIPTION

This function copies fields from p_ub_src to p_ub_dst buffer. The list of field which needs to be copied is marked in fldlist array. The array must be terminated with BBADFLDID. Matched field names are copied including all it’s occurrences. Before performing copy, p_ub_dest buffer is erased by Binit(3).

RETURN VALUE

On success, Bproj() return zero; on error, -1 is returned, with Berror set to indicate the error.

ERRORS

Note that Bstrerror() returns generic error message plus custom message with debug info from last function call.

BALIGNERR Source or dest buffer corrupted or pointing to not aligned memory area.

BNOTFLD Source or dest buffer not fielded, not correctly allocated or corrupted.

BNOSPACE No space left in target buffer.

EXAMPLE

See ubftest/test_bproj.c for sample code.

BUGS

Report bugs to support@mavimax.com

COPYING

© Mavimax, Ltd