BRender Technical Reference Manual:4 Data Structures (Alphabetical Reference):brfile_getchr_cbfn
Next|Prev|Up
The Call-Back Function
Specification
CBFnFileGetChr()

brfile_getchr_cbfn


The Call-Back Function

This type defines a get character function, primarily intended for the getchr member of the br_filesystem
125 structure.

The typedef

(See brfile.h for a precise declaration)

int brfile_getchr_cbfn(void *) Get character

Specification


CBFnFileGetChr()

Description:
An application defined call-back function reading a character from a file.

Declaration:
int BR_CALLBACK CBFnFileGetChr(void* f)

Arguments:
void * f

Valid file handle - as returned by CBFnFileOpenRead()376.

Preconditions:
BRender has completed initialisation. BRender is the only direct caller of this function.

Effects:
If the file position is at the end of the file, the file enters the end-of-file state, otherwise a character is read and the file position is advanced.

Result:
int

The character read from the file is returned (as though the character had been cast as (int)(unsigned char)). If a character could not be read because the file position was at the end of the file, BR_EOF is returned.

Example:
See stdfile.c for examples of filing system functions.



Generated with
CERN WebMaker