From 50a6ca39ad4ed01922aa4f755f0ca579788226cf Mon Sep 17 00:00:00 2001 From: Thomas Martitz Date: Thu, 6 May 2010 21:04:40 +0000 Subject: Move c/h files implementing/defining standard library stuff into a new libc directory, also standard'ify some parts of the code base (almost entirely #include fixes). This is to a) to cleanup firmware/common and firmware/include a bit, but also b) for Rockbox as an application which should use the host system's c library and headers, separating makes it easy to exclude our files from the build. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25850 a1c6a512-1295-4272-9138-f99709370657 --- apps/plugins/frotz/frotz.c | 6 +++--- apps/plugins/frotz/frotzplugin.h | 9 ++++++--- 2 files changed, 9 insertions(+), 6 deletions(-) (limited to 'apps/plugins/frotz') 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) static unsigned char unget_buf; static int unget_file; -int ungetc(int c, int f) +int frotz_ungetc(int c, int f) { unget_file = f; unget_buf = c; return c; } -int fgetc(int f) +int frotz_fgetc(int f) { unsigned char cb; if (unget_file == f) @@ -305,7 +305,7 @@ int fgetc(int f) return cb; } -int fputc(int c, int f) +int frotz_fputc(int c, int f) { unsigned char cb = c; 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 @@ /* * we need functions for character io */ -extern int ungetc(int c, int f); -extern int fgetc(int f); -extern int fputc(int c, int f); +extern int frotz_ungetc(int c, int f); +#define ungetc frotz_ungetc +extern int frotz_fgetc(int f); +#define fgetc frotz_fgetc +extern int frotz_fputc(int c, int f); +#define fputc frotz_fputc /* * this is used instead of os_read_key for more prompts and the like -- cgit v1.2.3