QP_fgets()
#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.
QP_SUCCESS
QP_ERROR