QP_setpos()

Synopsis

     #include <quintus/quintus.h>
     
     int QP_setpos(stream, pos)
     QP_stream   *stream;
     QP_position *pos;
     

Reset a specified Prolog stream back to a previous read/written position.

Arguments


stream
pointer to a valid stream structure
pos
pointer to a QP_position structure.

Description

Upon successful return of this function call, the stream is repositioned to the value specified in the magic member pointed to by pos. The character, line and line position counts of stream are also reset to the values specified in char_count, line_count and line_position members in pos.

The specified stream must have the permission to seek back to a previous read/written position. Typically, the value of pos is obtained through a previous QP_getpos() call.

See Also

QP_getpos(), QP_seek(), stream_position/[2,3] QP_char_count(), QP_line_count(), QP_line_position() fli-ios