diff options
author | inmarket <andrewh@inmarket.com.au> | 2015-02-21 09:23:33 +1000 |
---|---|---|
committer | inmarket <andrewh@inmarket.com.au> | 2015-02-21 09:23:33 +1000 |
commit | 07a63f714373859ace005c0686a7ac6982ba30f9 (patch) | |
tree | c6cd9170fbb7aae44c6698117248b47ba7469c96 /src/gfile/gfile_stdio.c | |
parent | 5e0a0bfd9b6db8e65bb6052d7b65547e803de42b (diff) | |
download | uGFX-07a63f714373859ace005c0686a7ac6982ba30f9.tar.gz uGFX-07a63f714373859ace005c0686a7ac6982ba30f9.tar.bz2 uGFX-07a63f714373859ace005c0686a7ac6982ba30f9.zip |
Compile error and emulation errors for GFILE_NEED_STDIO
Diffstat (limited to 'src/gfile/gfile_stdio.c')
-rw-r--r-- | src/gfile/gfile_stdio.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/gfile/gfile_stdio.c b/src/gfile/gfile_stdio.c index 20169ef2..0528547d 100644 --- a/src/gfile/gfile_stdio.c +++ b/src/gfile/gfile_stdio.c @@ -11,17 +11,19 @@ #include "gfx.h" -#if GFX_USE_GFILE && GFILE_NEED_STDIO +#if GFX_USE_GFILE && GFILE_NEED_STDIO && !defined(GFILE_NEED_STDIO_MUST_BE_OFF) -size_t gstdioRead(void * ptr, size_t size, size_t count, FILE *f) { +#include "gfile_fs.h" + +size_t gstdioRead(void * ptr, size_t size, size_t count, GFILE *f) { return gfileRead(f, ptr, size*count)/size; } -size_t gstdioWrite(const void * ptr, size_t size, size_t count, FILE *f) { +size_t gstdioWrite(const void * ptr, size_t size, size_t count, GFILE *f) { return gfileWrite(f, ptr, size*count)/size; } -int gstdioSeek(FILE *f, size_t offset, int origin) { +int gstdioSeek(GFILE *f, size_t offset, int origin) { switch(origin) { case SEEK_SET: break; @@ -37,7 +39,7 @@ int gstdioSeek(FILE *f, size_t offset, int origin) { return gfileSetPos(f, offset) ? 0 : -1; } -int gstdioGetpos(FILE *f, long int *pos) { +int gstdioGetpos(GFILE *f, long int *pos) { if (!(f->flags & GFILEFLG_OPEN)) return -1; *pos = f->pos; |