brfile_read_cbfn
read
member of the br_filesystem
125
structure.
typedef
brfile.h
for a precise declaration)
br_size_t brfile_read_cbfn(void*,br_size_t,unsigned,void*) Read block
Buffer to receive block.
Size of each element in block.
Maximum number of elements to read.
Specification
Description:
An application defined call-back function reading a block from a file.CBFnFileRead()
br_size_t BR_CALLBACK CBFnFileRead(void* buf, br_size_t size, unsigned int nelems, void* f)
void * buf
br_size_t size
unsigned int nelems
void * f
Preconditions: BRender has completed initialisation. BRender is the only direct caller of this function.
Effects: Read up to
nelems
elements of size
bytes from the file f
and store them in buf
.Result:
br_size_t
Return the number of complete elements read, which may be less than nelems
if the end of file is encountered before all the elements could be read.
Example: See
stdfile.c
for examples of filing system functions.