Next: , Previous: , Up: cpg-bif   [Contents][Index]


12.3.93 SP_set_user_stream_hook()   preinit

Synopsis

#include <sicstus/sicstus.h>

typedef SP_stream *
SP_UserStreamHook(void *user_data, int which);

SP_UserStreamHook *
SP_set_user_stream_hook(SP_UserStreamHook *hook, void *user_data);

Sets the user-stream hook to hook. Must be called before SP_initialize().

Arguments

hook

It is called three times, one for each stream. The which argument indicates which stream it is called for. The value of which is one of:

SP_STREAMHOOK_STDIN

Create stream for standard input.

SP_STREAMHOOK_STDOUT

Create stream for standard output.

SP_STREAMHOOK_STDERR

Create stream for standard error.

The hook should return a standard SICStus text I/O stream, as described in Defining a New Stream.

user_data

An arbitrary pointer that will be passed to the hook.

See Also

Hookable Standard Streams.


Send feedback on this subject.