brfile_getline_cbfn
getline
member of the br_filesystem
125
structure.
typedef
brfile.h
for a precise declaration)
br_size_t brfile_getline_cbfn(char*,br_size_t,void*) Getline
Buffer to hold text read.
Length of buffer (maximum number of characters to store - including
Specification
Description:
An application defined call-back function reading a line of text (excluding terminators) from a file.CBFnFileGetLine()
br_size_t BR_CALLBACK CBFnFileGetLine(char* buf, br_size_t buf_len, void* f)
char * buf
br_size_t buf_len
`\0'
).void * f
Preconditions: BRender has completed initialisation. BRender is the only direct caller of this function.
Effects: Read characters into supplied buffer until
buf_len
-1
characters have been read, end of line has been read, or end of file has been reached. If the last character read was `\n'
it is removed from the buffer.Result:
br_size_t
The number of characters stored in the buffer is returned. If at the end of file upon entry, zero will be returned.
Example: See
stdfile.c
for examples of filing system functions.