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

br_mode_test_cbfn


The Call-Back Function

This type defines a mode test function, as required by BrFileOpenRead()
60.

The typedef

(See brfile.h for a precise declaration)

int br_mode_test_cbfn(const br_uint_8*, br_size_t) Test file's mode

Specification


CBFnModeTest()

Description:
An application defined call-back function determining the type of a file from a given number of characters (specified with the call-back function) from the start of the file.

Declaration:
int BR_CALLBACK CBFnModeTest(const br_uint_8* magics, br_size_t n_magics)

Arguments:
const br_uint_8 * magics

Pointer to n_magics characters.

br_size_t n_magics

Number of characters pointed to.

Effects:
Interpret the characters and determine the mode of the file (or file type).

Result:
int

If the file is binary return BR_FS_MODE_BINARY, if text return BR_FS_MODE_TEXT, otherwise return BR_FS_MODE_UNKNOWN.



Generated with
CERN WebMaker