diff options
author | inmarket <andrewh@inmarket.com.au> | 2014-08-15 00:31:32 +1000 |
---|---|---|
committer | inmarket <andrewh@inmarket.com.au> | 2014-08-15 00:31:32 +1000 |
commit | 1105e38414fff26d6b1e278ee3bf19b9b981299c (patch) | |
tree | 0492188b192ddddc83595e55e18981dfb01a1fd5 /src/gfile/inc_memfs.c | |
parent | a588740dc3005972892ba7d39d35d1228bc5f0aa (diff) | |
download | uGFX-1105e38414fff26d6b1e278ee3bf19b9b981299c.tar.gz uGFX-1105e38414fff26d6b1e278ee3bf19b9b981299c.tar.bz2 uGFX-1105e38414fff26d6b1e278ee3bf19b9b981299c.zip |
Separate GFILE into separate source files to prevent future name and include file conflicts.
Diffstat (limited to 'src/gfile/inc_memfs.c')
-rw-r--r-- | src/gfile/inc_memfs.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/gfile/inc_memfs.c b/src/gfile/inc_memfs.c index 6177b7d8..150220b8 100644 --- a/src/gfile/inc_memfs.c +++ b/src/gfile/inc_memfs.c @@ -5,14 +5,16 @@ * http://ugfx.org/license.html */ -/** - * This file is included by src/gfile/gfile.c - */ - /******************************************************** - * The Memory pointer file-system VMT + * The virtual memory file-system ********************************************************/ +#include "gfx.h" + +#if GFX_USE_GFILE && GFILE_NEED_MEMFS + +#include "gfile_fs.h" + #include <string.h> static int MEMRead(GFILE *f, void *buf, int size); @@ -20,7 +22,6 @@ static int MEMWrite(GFILE *f, const void *buf, int size); static bool_t MEMSetpos(GFILE *f, long int pos); static const GFILEVMT FsMemVMT = { - 0, // next GFSFLG_SEEKABLE|GFSFLG_WRITEABLE, // flags 0, // prefix 0, 0, 0, 0, @@ -50,7 +51,7 @@ GFILE * gfileOpenMemory(void *memptr, const char *mode) { GFILE *f; // Get an empty file and set the flags - if (!(f = findemptyfile(mode))) + if (!(f = _gfileFindSlot(mode))) return 0; // File is open - fill in all the details @@ -60,3 +61,5 @@ GFILE * gfileOpenMemory(void *memptr, const char *mode) { f->flags |= GFILEFLG_OPEN|GFILEFLG_CANSEEK; return f; } + +#endif //GFX_USE_GFILE && GFILE_NEED_MEMFS |