Node:Low Level I/O Functions, Next:Installing a New Stream, Previous:Defining a New Stream, Up:Defining a New Stream
For each new stream the appropriate low level I/O functions have to be
defined. Error handling, prompt handling and character counting is
handled in a layer above these functions. They all operate on a user
defined private data structure pointed out by user_handle
in
SP_stream
.
User defined low level I/O functions may invoke Prolog code and use the support functions described in the other sections of this chapter.
int
my_fgetc(void *handle)
int
my_fputc(char c, void *handle)
c
and return the character written.
int
my_flush(void *handle)
int
my_eof(void *handle)
void
my_clrerr(void *handle)
EOF
indicators.
int
my_close(void *handle)