_FGets( ) API Library Routine

See Also   Example

Copies to the buffer a single line from the specified file, starting at the current position in the file.

Syntax

unsigned int _FGets(FCHAN chan, char FAR *buffer, int maxlen)
FCHAN chan;               /* File channel of file from which to copy. */
char FAR *buffer;            /* Buffer address. */
int maxlen;                  /* Maximum length of line in bytes. */

Remarks

_FGets( ) copies a line of maxlen length, delimited with a carriage return. The carriage return is translated to a null terminator and stored in the buffer. Line feeds are ignored and aren't copied into the buffer. _FGets( ) returns the number of bytes copied to the buffer.

For more information on how to create an API library and integrate it with Visual FoxPro, see Chapter 28, Accessing the Visual FoxPro API, in the Programmer's Guide.