BFILE library: bfile(), bfile_dtor() - create and destroy a BFILE

Name

bfile(), bfile_dtor() - create and destroy a BFILE

Synopsis

#include "bfile.h"

int bfile(BFILE **bfilepp);
int bfile_dtor(BFILE *bfp);

Decription

The bfile() function creates a BFILE object. If it is successfully created, it must eventually be destroyed by calling the bfile_dtor() function which destroys a BFILE object, closing the related file, if any. If the bfile() function indicates an error, no object has been created. The bfile_dtor() function always succeeds.

Return value

bfile() returns 0 if successful, or an errno value otherwise.

bfile_dtor() returns the error status of the destroyed BFILE object, which is closed by the destruction of the BFILE.

See also

bfsetup(), bfopenhandle(), bfopen(), bfread(), bfseek(), bfwrite(), bfflush(), bferror().


This function is part of the BFILE library.