diff options
Diffstat (limited to 'apps/plugins/frotz/frotzplugin.h')
-rw-r--r-- | apps/plugins/frotz/frotzplugin.h | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/apps/plugins/frotz/frotzplugin.h b/apps/plugins/frotz/frotzplugin.h new file mode 100644 index 0000000000..8caddb470d --- /dev/null +++ b/apps/plugins/frotz/frotzplugin.h | |||
@@ -0,0 +1,56 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id$ | ||
9 | * | ||
10 | * Copyright (C) 2009 Torne Wuff | ||
11 | * | ||
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. | ||
16 | * | ||
17 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
18 | * KIND, either express or implied. | ||
19 | * | ||
20 | ****************************************************************************/ | ||
21 | #ifndef _FROTZPLUGIN_H_ | ||
22 | #define _FROTZPLUGIN_H_ | ||
23 | |||
24 | #include "plugin.h" | ||
25 | |||
26 | /* | ||
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 | ||
29 | */ | ||
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 | ||
36 | |||
37 | /* | ||
38 | * we need functions for character io | ||
39 | */ | ||
40 | extern int ungetc(int c, int f); | ||
41 | extern int fgetc(int f); | ||
42 | extern int fputc(int c, int f); | ||
43 | |||
44 | /* | ||
45 | * this is used instead of os_read_key for more prompts and the like | ||
46 | * since the menu can't be used there. | ||
47 | */ | ||
48 | extern void wait_for_key(void); | ||
49 | |||
50 | /* | ||
51 | * wrappers | ||
52 | */ | ||
53 | #define strchr(s, c) rb->strchr(s, c) | ||
54 | #define strcpy(dest, src) rb->strcpy(dest, src) | ||
55 | |||
56 | #endif /* _FROTZPLUGIN_H_ */ | ||