Next: , Previous: bpipe_hdr_cleanup, Up: Internal Functions


A.5.13 bpipe_hdr_setup

Initialize hdr data structure.

Synopsis

     #include <bpipe/bpipe.h>
     
     
     
int bpipe_hdr_setup(BPipe *bpipe);

Parameters

BPipe *bpipe
binary pipe

Description

This routine is called by bpipe_new to initialize the header data structures of a new BPipe.

Returns

It returns zero upon success, non-zero upon failure. It sets bpipe_errno upon failure.

Errors

Upon error bpipe_errno is set to one of the following:

BPENOMEM
a memory allocation failed