summaryrefslogtreecommitdiff
path: root/apps/plugins/frotz
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/frotz')
-rw-r--r--apps/plugins/frotz/frotz.c6
-rw-r--r--apps/plugins/frotz/frotzplugin.h9
2 files changed, 9 insertions, 6 deletions
diff --git a/apps/plugins/frotz/frotz.c b/apps/plugins/frotz/frotz.c
index 96029b85cb..f64431f14e 100644
--- a/apps/plugins/frotz/frotz.c
+++ b/apps/plugins/frotz/frotz.c
@@ -285,14 +285,14 @@ void os_beep(int volume)
285static unsigned char unget_buf; 285static unsigned char unget_buf;
286static int unget_file; 286static int unget_file;
287 287
288int ungetc(int c, int f) 288int frotz_ungetc(int c, int f)
289{ 289{
290 unget_file = f; 290 unget_file = f;
291 unget_buf = c; 291 unget_buf = c;
292 return c; 292 return c;
293} 293}
294 294
295int fgetc(int f) 295int frotz_fgetc(int f)
296{ 296{
297 unsigned char cb; 297 unsigned char cb;
298 if (unget_file == f) 298 if (unget_file == f)
@@ -305,7 +305,7 @@ int fgetc(int f)
305 return cb; 305 return cb;
306} 306}
307 307
308int fputc(int c, int f) 308int frotz_fputc(int c, int f)
309{ 309{
310 unsigned char cb = c; 310 unsigned char cb = c;
311 if (rb->write(f, &cb, 1) != 1) 311 if (rb->write(f, &cb, 1) != 1)
diff --git a/apps/plugins/frotz/frotzplugin.h b/apps/plugins/frotz/frotzplugin.h
index 8caddb470d..1a52bdb913 100644
--- a/apps/plugins/frotz/frotzplugin.h
+++ b/apps/plugins/frotz/frotzplugin.h
@@ -37,9 +37,12 @@
37/* 37/*
38 * we need functions for character io 38 * we need functions for character io
39 */ 39 */
40extern int ungetc(int c, int f); 40extern int frotz_ungetc(int c, int f);
41extern int fgetc(int f); 41#define ungetc frotz_ungetc
42extern int fputc(int c, int f); 42extern int frotz_fgetc(int f);
43#define fgetc frotz_fgetc
44extern int frotz_fputc(int c, int f);
45#define fputc frotz_fputc
43 46
44/* 47/*
45 * this is used instead of os_read_key for more prompts and the like 48 * this is used instead of os_read_key for more prompts and the like