QP_fgets()

Synopsis

     #include <quintus/quintus.h>
     
     char *QP_fgets(s, n, stream)
     char      *s;
     int        n;
     QP_stream *stream;
     

Reads characters from the stream into the array pointed to by s, until n-1 characters are read, a NEWLINE character is read and transferred to s, or an EOF condition is encountered. The string is then terminated with a NULL character.

QP_fgets() is similar to the library function fgets(3S), however the return values differ and stream is a Prolog stream rather than a stdio stream.

Return Value


QP_SUCCESS
If function succeeds
QP_ERROR
Otherwise

See Also

fli-ios