#include <sicstus/sicstus.h> spio_t_error_code SP_next_stream(SP_stream *stream, SP_stream **pnext);
Iterate through all Prolog streams.
If this is
*pnext is set to the first stream in the list of streams. If this is non-
NULL then the stream following stream in the list of streams is returned in
The returned stream is returned in
*pnext is assigned, and
SPIO_S_NOERR or some other success code is returned. You should
SPIO_FAILED() macro to determine if the return value
signifies failure or success.
stream is the last stream
*pnext is set to
This function can be used to iterate over all Prolog streams. One way
to use this is together with
SP_get_stream_user_data to find
all currently open user defined streams of a particular type.