1 /***************************************************************************
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
10 * Copyright (C) 2009 Torne Wuff
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
20 ****************************************************************************/
21 #ifndef _FROTZPLUGIN_H_
22 #define _FROTZPLUGIN_H_
27 * pretend stdio.h is implemented. references to FILE * still have to be
28 * changed to int, and references to NULL into -1, but there are less of those
30 #define fread(ptr, size, nmemb, stream) rb->read(stream, ptr, size*nmemb)
31 #define fwrite(ptr, size, nmemb, stream) rb->write(stream, ptr, size*nmemb)
32 #define fclose(stream) rb->close(stream)
33 #define fseek(stream, offset, whence) rb->lseek(stream, offset, whence)
34 #define ftell(stream) rb->lseek(stream, 0, SEEK_CUR)
35 #define ferror(stream) 0
38 * we need functions for character io
40 extern int ungetc(int c
, int f
);
41 extern int fgetc(int f
);
42 extern int fputc(int c
, int f
);
45 * this is used instead of os_read_key for more prompts and the like
46 * since the menu can't be used there.
48 extern void wait_for_key(void);
53 #define strchr(s, c) rb->strchr(s, c)
54 #define strcpy(dest, src) rb->strcpy(dest, src)
56 #endif /* _FROTZPLUGIN_H_ */