| 1 |
#ifndef _GLKIO_H_ |
| 2 |
#define _GLKIO_H_ |
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
#include "glk.h" |
| 13 |
|
| 14 |
extern winid_t glkMainWin; |
| 15 |
extern winid_t glkStatusWin; |
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
#define printf glkio_printf |
| 20 |
void glkio_printf(char *, ...); |
| 21 |
|
| 22 |
#ifdef MAP_STDIO_TO_GLK |
| 23 |
#define fgetc(stream) glk_get_char_stream(stream) |
| 24 |
#define rewind(stream) glk_stream_set_position(stream, 0, seekmode_Start); |
| 25 |
#define fwrite(buf, elementSize, count, stream) glk_put_buffer_stream(stream, buf, elementSize*count); |
| 26 |
#define fread(buf, elementSize, count, stream) glk_get_buffer_stream(stream, buf, elementSize*count); |
| 27 |
#define fclose(stream) glk_stream_close(stream, NULL) |
| 28 |
#define fgets(buff, len, stream) glk_get_line_stream(stream, buff, len) |
| 29 |
#endif |
| 30 |
|
| 31 |
#endif |