Next: , Previous: bpipe_matrix_delete, Up: Utility Functions


A.4.11 bpipe_matrix_dup

duplicate a BPipe matrix structure

Synopsis

     #include <bpipe/bpipe.h>
     
     
     
BPMatrix *bpipe_matrix_dup(BPMatrix *src);

Parameters

BPMatrix *src
the matrix to duplicate

Description

This routine duplicates a binary pipe matrix and its accompanying data. It does not perform special processing for NULL matrix pointers.

Returns

On successful completion, a pointer to a new matrix structure is returned. upon error bpipe_errno is set and NULL is returned.

Errors

Upon error bpipe_errno is set to one of the following errors:

BPEBADARG
the passed argument is bogus or the matrix specification was illegal
BPENOMEM
a memory allocation failed