diff options
Diffstat (limited to 'apps/plugins/zxbox')
-rw-r--r-- | apps/plugins/zxbox/helpers.h | 7 | ||||
-rw-r--r-- | apps/plugins/zxbox/snapshot.c | 8 | ||||
-rw-r--r-- | apps/plugins/zxbox/spconf.c | 8 | ||||
-rw-r--r-- | apps/plugins/zxbox/sptape.c | 1 | ||||
-rw-r--r-- | apps/plugins/zxbox/tapefile.c | 2 | ||||
-rw-r--r-- | apps/plugins/zxbox/zxmisc.h | 2 |
6 files changed, 15 insertions, 13 deletions
diff --git a/apps/plugins/zxbox/helpers.h b/apps/plugins/zxbox/helpers.h index ba8607d5cb..c8cb9c1554 100644 --- a/apps/plugins/zxbox/helpers.h +++ b/apps/plugins/zxbox/helpers.h | |||
@@ -7,9 +7,12 @@ extern off_t my_ftell(int); | |||
7 | extern void *my_malloc(size_t size); | 7 | extern void *my_malloc(size_t size); |
8 | 8 | ||
9 | 9 | ||
10 | #undef getc | ||
10 | #define getc my_getc | 11 | #define getc my_getc |
11 | #define malloc my_malloc | 12 | #undef putc |
12 | #define ftell my_ftell | ||
13 | #define putc my_putc | 13 | #define putc my_putc |
14 | #undef ftell | ||
15 | #define ftell my_ftell | ||
16 | #define malloc my_malloc | ||
14 | 17 | ||
15 | #endif /* HELPERS_H */ | 18 | #endif /* HELPERS_H */ |
diff --git a/apps/plugins/zxbox/snapshot.c b/apps/plugins/zxbox/snapshot.c index 0b80b64497..468f46667e 100644 --- a/apps/plugins/zxbox/snapshot.c +++ b/apps/plugins/zxbox/snapshot.c | |||
@@ -18,8 +18,9 @@ | |||
18 | * | 18 | * |
19 | */ | 19 | */ |
20 | 20 | ||
21 | #include <stdlib.h> | ||
22 | #include <string.h> /* size_t */ | ||
21 | #include "zxmisc.h" | 23 | #include "zxmisc.h" |
22 | #include "helpers.h" | ||
23 | #include "spperif.h" | 24 | #include "spperif.h" |
24 | #include "z80.h" | 25 | #include "z80.h" |
25 | 26 | ||
@@ -29,9 +30,8 @@ | |||
29 | 30 | ||
30 | #include "spconf.h" | 31 | #include "spconf.h" |
31 | 32 | ||
32 | #include <stdio.h> | 33 | /* include this at last to avoid clashes with stdio functions */ |
33 | #include <stdlib.h> | 34 | #include "helpers.h" |
34 | #include <sys/types.h> | ||
35 | 35 | ||
36 | #define COMPRESS_SAVE 1 | 36 | #define COMPRESS_SAVE 1 |
37 | 37 | ||
diff --git a/apps/plugins/zxbox/spconf.c b/apps/plugins/zxbox/spconf.c index 728f78638c..0daabc7d77 100644 --- a/apps/plugins/zxbox/spconf.c +++ b/apps/plugins/zxbox/spconf.c | |||
@@ -17,6 +17,10 @@ | |||
17 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 17 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
18 | * | 18 | * |
19 | */ | 19 | */ |
20 | |||
21 | #include <stdio.h> | ||
22 | #include <string.h> | ||
23 | #include <ctype.h> | ||
20 | #include "zxmisc.h" | 24 | #include "zxmisc.h" |
21 | #include "spconf_p.h" | 25 | #include "spconf_p.h" |
22 | #include "interf.h" | 26 | #include "interf.h" |
@@ -26,11 +30,7 @@ | |||
26 | #include "snapshot.h" /* for SN_Z80 and SN_SNA */ | 30 | #include "snapshot.h" /* for SN_Z80 and SN_SNA */ |
27 | #include "tapefile.h" /* for TAP_TAP and TAP_TZX */ | 31 | #include "tapefile.h" /* for TAP_TAP and TAP_TZX */ |
28 | #include "zxconfig.h" | 32 | #include "zxconfig.h" |
29 | #include "stdio.h" | ||
30 | #include "string.h" | ||
31 | #include "sys/types.h" | ||
32 | #include "helpers.h" | 33 | #include "helpers.h" |
33 | #include "ctype.h" | ||
34 | 34 | ||
35 | 35 | ||
36 | extern const char *spcf_keynames_ascii[]; | 36 | extern const char *spcf_keynames_ascii[]; |
diff --git a/apps/plugins/zxbox/sptape.c b/apps/plugins/zxbox/sptape.c index 21f962ea28..80921a0afd 100644 --- a/apps/plugins/zxbox/sptape.c +++ b/apps/plugins/zxbox/sptape.c | |||
@@ -31,7 +31,6 @@ | |||
31 | #include <stdlib.h> | 31 | #include <stdlib.h> |
32 | #include <string.h> | 32 | #include <string.h> |
33 | #include <errno.h> | 33 | #include <errno.h> |
34 | #include <sys/types.h> | ||
35 | 34 | ||
36 | #define MAXLINELEN 256 | 35 | #define MAXLINELEN 256 |
37 | 36 | ||
diff --git a/apps/plugins/zxbox/tapefile.c b/apps/plugins/zxbox/tapefile.c index 0e262aa0f7..92f4ea69f6 100644 --- a/apps/plugins/zxbox/tapefile.c +++ b/apps/plugins/zxbox/tapefile.c | |||
@@ -29,7 +29,7 @@ | |||
29 | #include <stdlib.h> | 29 | #include <stdlib.h> |
30 | #include <string.h> | 30 | #include <string.h> |
31 | #include <errno.h> | 31 | #include <errno.h> |
32 | #include <sys/types.h> | 32 | #include "inttypes.h" |
33 | #include "zxconfig.h" | 33 | #include "zxconfig.h" |
34 | #include "helpers.h" | 34 | #include "helpers.h" |
35 | #define max(x, y) ((x) > (y) ? (x) : (y)) | 35 | #define max(x, y) ((x) > (y) ? (x) : (y)) |
diff --git a/apps/plugins/zxbox/zxmisc.h b/apps/plugins/zxbox/zxmisc.h index 4ad25a0604..904af24e3d 100644 --- a/apps/plugins/zxbox/zxmisc.h +++ b/apps/plugins/zxbox/zxmisc.h | |||
@@ -21,7 +21,7 @@ | |||
21 | #ifndef ZXMISC_H | 21 | #ifndef ZXMISC_H |
22 | #define ZXMISC_H | 22 | #define ZXMISC_H |
23 | 23 | ||
24 | #include <sys/types.h> | 24 | #include <string.h> /* size_t */ |
25 | 25 | ||
26 | extern char *get_base_name(char *fname); | 26 | extern char *get_base_name(char *fname); |
27 | extern int check_ext(const char *filename, const char *ext); | 27 | extern int check_ext(const char *filename, const char *ext); |