QU_stream_param() user-redefinable

Synopsis

     #include <quintus/quintus.h>
     
     void QU_stream_param(filename, mode, format, option)
     char          *filename;
     int            mode;
     unsigned char  format;
     QP_stream     *option;
     

Embedding function, which sets up default values of user-accessible fields in a Prolog stream structure.

Arguments


filename
name of the file to be opened. If the stream does not have a filename, the filename is the empty string, "". If the filename is /dev/tty, the caller requests QU_stream_param() to set the field values as a tty stream.
mode

format
format of the stream, which could have one of the following values:
option
pointer to a QP_stream structure whose fields are to be set up.

Description

The format is used in assisting QU_stream_param() to determine the best values for the other member fields of the QP_stream structure.

All of the fields listed below of the QP_stream structure, described in fli-ios-sst, are set by QU_stream_param(). Under UNIX, they are given the indicated values:


field
value
filename
filename argument to QU_stream_param()
mode
mode argument to QU_stream_param()
format
format argument to QU_stream_param()
max_reclen
8192 bytes for a file, 256 bytes for a tty
line_border
QP_LF
file_border
QP_EOF
peof_act
QP_PASTEOF_ERROR
prompt
"" (empty string)
trim
0
seek_type
QP_SEEK_PREVIOUS for a file, QP_SEEK_ERROR for a tty
flush_type
QP_FLUSH_FLUSH
overflow
QP_OV_FLUSH
errno
0
magic
(byteno) 0
read
bad_read -- a function that returns QP_ERROR
write
bad_write -- a function that returns QP_ERROR
flush
bad_flush -- a function that returns QP_ERROR
seek
bad_seek -- a function that returns QP_ERROR
close
bad_close -- a function that returns QP_ERROR