ffgets(3)

LIBRARY
#include <xtend/fast-file.h>
-lxtend

SYNOPSIS

char    *ffgets(char *string, size_t size, ffile_t *stream)

ARGUMENTS
string      A character array into which the line is read
size        Size of the character array
stream      Pointer to an ffile_t structure opened with ffopen()

DESCRIPTION
ffgets() writes a line of text from the given ffile_t stream. It is fnuctionally equivalent to fgets() with FILE. The maximum number of characters read is size - 1, to allow for a null-terminator byte.

RETURN VALUES
A non-negative integer on success, EOF on failure

EXAMPLES
ffile_t *instream;
char    buff[BUFF_SIZE];
if ( (instream = ffopen(outfilename, O_RDONLY)) == NULL )
{
    fprintf(stderr, "Cannot open %s for writing.n", outfilename);
    exit(EX_NOINPUT);
}
ffgets(buff, BUFF_SIZE, instream);
ffclose(instream);

SEE ALSO
fgets(3), ffputs(3), ffopen(3), ffclose(3), ffputc(3), ffprintf(3)