|
Purpose |
Reads a line of text from an ASCII file | |
|
Old name |
#define _dfrdln tf_txt_read | |
|
Syntax |
char* tf_txt_read(file_handle) | |
|
Parameters |
int file_handle |
File handle of a file |
|
|
The file_handle parameter is obtained by calling the function tf_open() | |
|
Description |
The tf_txt_read() function reads a line of text from an ASCII file. The maximum length of a line that tf_txt_read() can read is given by: (2 * F_DATA_SIZE) - 1 where the symbolic constant F_DATA_SIZE is defined, in the header file DBFLAGS.H, as 256. You do not need to include this header file to use the function tf_txt_read(). The end-of-line characters are not returned. Only use this function for ASCII text. To determine the length of the line, use the C function strlen. Note that if the line contains binary zeros the wrong value is returned. | |
|
Return values |
Returns a null-terminated pointer to the line read in, or 0 if at the end of the file | |
|
See also |
||