extern int cfl_init_from_file

(cflh_t HANDLE,
  const FILE* INPUT_FILE,
  const cfl_file_type_t FILE_TYPE )

Initializes a cfl handle with an opened file.

Documentation

Initializes a cfl handle with an opened file. The cfl HANDLE is flushed before re-initializing it with the content of the INPUT_FILE. The FILE_TYPE could be used to specify the type of the input file (see definition of cfl_file_type_t above to view the supported types).
Parameters:
HANDLE - The cfl handle to initialize
INPUT_FILE - The configuration file to read
FILE_TYPE - The type of the input file to read
Returns:
0 in case of success.
CFL_ERR_MALLOC in case of insufficient memory.
CFL_ERR_FILE_READ in case of INPUT_FILE is not readable.
CFL_ERR_FILE_PARSE in case of incorrect format of INPUT_FILE. WARNING: this function is *NOT* reentrant, so maybe you'll need to lock a mutex before calling it and unlock the mutex after the call.
Preconditions:
HANDLE must be a valid cflh_t & INPUT_FILE != NULL
See Also:
cfl_alloc()
cfl_free()
cfl_read()
cfl_write()
cfl_write_xml()

Alphabetic index


f