QP_getpos()

Synopsis

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

Get the current position for a Prolog stream

Arguments


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

Description

Upon successful return of this function call, the char_count, line_count, line_position and magic member of the QP_position structure pointed to by pos have the valid values indicating the current character count, line count, line position and system-dependent position. The pos can be passed as the second argument to QP_setpos() for seeking back to the current position later.

Return Value

Always returns QP_SUCCESS.

See Also

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