QP_fdopen()
#include <quintus/quintus.h> QP_stream *QP_fdopen(fildes, type) int fildes; char *type;
Associates a stream with the file descriptor files. File
descriptors are obtained from system calls like open(2V)
, dup(2)
,
creat(2)
, or pipe(2)
,
which open files but do not return streams. Streams are necessary
input for many of the system functions. The type of the
stream must agree with the mode of the open file.
QP_fdopen()
is similar to the library function fdopen(3V)
,
however the return values differ and the normal return value is a
Prolog stream rather than a stdio
stream.
QP_SUCCESS
QP_ERROR
QP_fclose()
, QP_fopen()
,
QP_prepare_stream/[3,4]
fli-ios