BFILE library: bfseek() - buffered file seek

Name

bfseek() - buffered file seek

Synopsis

#include "bfile.h"

int bfseek(BFILE *bfp,
	off_t *pos,
	off_t offset,
	int whence);

Decription

The bfseek() function seeks to a specific positon in an open file. The BFILE must have been set up with bfsetup() and must not be in an error condition. The resulting position, as an offset from the start of the file, is stored in *pos. The offset and whence parameters have the same meaning as for the standard lseek() function.

If an error occurs, the BFILE is put into an error condition, which can only be cleared by bferror().

Return value

Returns 0 if successful, or an errno value otherwise.

See also

bfile(), bfile_dtor(), bferror().


This function is part of the BFILE library.