Reads a line from the specified input (buffered)
Source position: amigados.pas line 2488
function FGets( |
Fh: LongInt; |
Buf: PChar; |
BufLen: LongWord |
):PChar; |
Fh |
|
filehandle to use for buffered I/O |
Buf |
|
Area to read bytes into. |
BufLen |
|
Number of bytes to read, must be > 0. |
Pointer to buffer passed in, or nil for immediate EOF or for an error. If nil is returnd for an EOF, IoErr() will return 0.
This routine reads in a single line from the specified input stopping at a NEWLINE character or EOF. In either event, UP TO the number of len specified bytes minus 1 will be copied into the buffer. Hence if a length of 50 is passed and the input line is longer than 49 bytes, it will return 49 characters. It returns the buffer pointer normally, or NULL if EOF is the first thing read.
If terminated by a newline, the newline WILL be the last character in the buffer. This is a buffered read routine. The string read in IS null-terminated.
|
Reads a number of blocks from an input (buffered) |
|
|
Writes a string the the specified output |
|
|
Read a character from the specified input (buffered) |