TutSetFileReadFunc


Name

TutSetFileReadFunc — set the function to use when reading from a file

Synopsis

T_BOOL TutSetFileReadFunc(read_func) 
T_FILE_READ_FUNC read_func; 

Arguments

read_func — function to use when reading data from a file

Return Values

TRUE if successful, FALSE otherwise.

Diagnostics

None

Description

TutSetFileReadFunc specifies a user-defined function (read_func) to be used for future file reading operations. The only file read operations where this applies are those that process data in a non-line oriented fashion.

This function make is possible to redirect the input to come from any desired location (such as a database), rather than requiring the data to be stored in a file.

If a user-specified read function has not been specified, the file is read using fread. If a user-defined read function is no longer required, passing NULL for read_func causes fread to be used for subsequent reads.

Caution

None

See Also

TutSetFileOpenFunc, TutSetFileCloseFunc, TutFileTraverse


TIBCO SmartSockets™ Utilities
Software Release 6.8, July 2006
Copyright © TIBCO Software Inc. All rights reserved
www.tibco.com