<!DOCTYPE File PUBLIC "-//Liam Quin//DTD C API Documentation v1.1//EN" "doc.dtd"><File>
<Entry dir="liblqutil">
<Function File="../../src/liblqutil/freadln.c">
<Name>LQU_fReadLine</Name>
<Class>Utilities/Files
<Purpose>
<P>Reads the next input line from the given file into a static buffer.
The buffer is allocated with malloc and resized dynamically, but
is owned by LQU_fReadLine and should not be free'd or overwritten.</P>
<P>The LQU_StealReadLineBuffer function can be used to obtain the
buffer; LQU_fReadLine will allocate a new one the next time it
is called.</P>
<P>The given Flags are treated as for
LQU_fReadFile, which currently calls this routine directly.
Note that, as for LQU_fReadFile, blank lines are skipped if the
corresponding flag is given.  In this case, LQU_fReadLine will never
return a pointer to a blank line, but will continue reading lines
from the file until a non-blank one is found.</P>
<Returns>
a pointer to the line, in Line, and also the number of bytes in
the line; -1 is returned on EOF, in which case the Line pointer should
not be used.
</Function>
<Decl>
API int
LQU_fReadLine(f, Linep, Flags)
    FILE *f;
    char **Linep;
    int Flags;
</Decl>
</Entry>
