Top |
void | glk_put_char () |
void | glk_put_string () |
void | glk_put_buffer () |
void | glk_put_char_stream () |
void | glk_put_string_stream () |
void | glk_put_buffer_stream () |
void | glk_put_char_uni () |
void | glk_put_string_uni () |
void | glk_put_buffer_uni () |
void | glk_put_char_stream_uni () |
void | glk_put_string_stream_uni () |
void | glk_put_buffer_stream_uni () |
You can print Latin-1 and Unicode characters, null-terminated strings, or buffers to any stream. The characters will be converted into the appropriate format for that stream.
void
glk_put_char (unsigned char ch
);
Prints one character to the current stream. As with all basic functions, the character is assumed to be in the Latin-1 character encoding. See Character Encoding.
void
glk_put_string (char *s
);
Prints a null-terminated string to the current stream. It is exactly equivalent to
1 2 |
for (ptr = s; *ptr; ptr++) glk_put_char(*ptr); |
However, it may be more efficient.
void glk_put_buffer (char *buf
,glui32 len
);
Prints a block of characters to the current stream. It is exactly equivalent to:
1 2 |
for (i = 0; i < len; i++) glk_put_char(buf[i]); |
However, it may be more efficient.
void glk_put_char_stream (strid_t str
,unsigned char ch
);
The same as glk_put_char()
, except that you specify a stream str
to print
to, instead of using the current stream. It is illegal for str
to be NULL
,
or an input-only stream.
void glk_put_string_stream (strid_t str
,char *s
);
The same as glk_put_string()
, except that you specify a stream str
to print
to, instead of using the current stream. It is illegal for str
to be NULL
,
or an input-only stream.
void glk_put_buffer_stream (strid_t str
,char *buf
,glui32 len
);
The same as glk_put_buffer()
, except that you specify a stream str
to print
to, instead of using the current stream. It is illegal for str
to be NULL
,
or an input-only stream.
void
glk_put_char_uni (glui32 ch
);
Prints one character to the current stream. The character is assumed to be a Unicode code point. See Character Encoding.
void
glk_put_string_uni (glui32 *s
);
Prints a string of Unicode characters to the current stream. It is equivalent
to a series of glk_put_char_uni()
calls. A string ends on a glui32 whose
value is 0.
void glk_put_buffer_uni (glui32 *buf
,glui32 len
);
Prints a block of Unicode characters to the current stream. It is equivalent
to a series of glk_put_char_uni()
calls.
void glk_put_char_stream_uni (strid_t str
,glui32 ch
);
The same as glk_put_char_uni()
, except that you specify a stream str
to
print to, instead of using the current stream. It is illegal for str
to be
NULL
, or an input-only stream.
void glk_put_string_stream_uni (strid_t str
,glui32 *s
);
The same as glk_put_string_uni()
, except that you specify a stream str
to
print to, instead of using the current stream. It is illegal for str
to be
NULL
, or an input-only stream.
void glk_put_buffer_stream_uni (strid_t str
,glui32 *buf
,glui32 len
);
The same as glk_put_buffer_uni()
, except that you specify a stream str
to
print to, instead of using the current stream. It is illegal for str
to be
NULL
, or an input-only stream.