Top |
When you close a Glk stream, you have the opportunity to examine the character counts — the number of characters written to or read from the stream.
void glk_stream_close (strid_t str
,stream_result_t *result
);
Closes the stream str
. The result
argument points to a structure which is
filled in with the final character counts of the stream. If you do not care
about these, you may pass NULL
as the result
argument.
If str
is the current output stream, the current output stream is set to
NULL
.
You cannot close window streams; use glk_window_close()
instead.
See Window Opening, Closing, and
Constraints.
typedef struct { glui32 readcount; glui32 writecount; } stream_result_t;
If you are interested in the character counts of a stream (see
Streams), then you can pass a pointer to stream_result_t
as an argument of glk_stream_close()
or glk_window_close()
.
The structure will be filled with the stream's final character counts.