diff options
author | Joel Bodenmann <joel@unormal.org> | 2014-04-19 23:16:49 +0200 |
---|---|---|
committer | Joel Bodenmann <joel@unormal.org> | 2014-04-19 23:16:49 +0200 |
commit | 33babb4c1a5b749faac6969681e8deff481c4344 (patch) | |
tree | 7b6d3a99a8de874d779f32fa67b5cb3cafbc0c7c /src/gfile | |
parent | b0dbd6fa47469ae9d89efd8b44958ae355030a1e (diff) | |
download | uGFX-33babb4c1a5b749faac6969681e8deff481c4344.tar.gz uGFX-33babb4c1a5b749faac6969681e8deff481c4344.tar.bz2 uGFX-33babb4c1a5b749faac6969681e8deff481c4344.zip |
Whitespaces
Diffstat (limited to 'src/gfile')
-rw-r--r-- | src/gfile/inc_romfs.c | 45 |
1 files changed, 36 insertions, 9 deletions
diff --git a/src/gfile/inc_romfs.c b/src/gfile/inc_romfs.c index 49c1b173..3510a261 100644 --- a/src/gfile/inc_romfs.c +++ b/src/gfile/inc_romfs.c @@ -56,7 +56,8 @@ static const GFILEVMT FsROMVMT = { #undef GFILE_CHAINHEAD #define GFILE_CHAINHEAD &FsROMVMT -static const ROMFS_DIRENTRY *ROMFindFile(const char *fname) { +static const ROMFS_DIRENTRY *ROMFindFile(const char *fname) +{ const ROMFS_DIRENTRY *p; for(p = FsROMHead; p; p = p->next) { @@ -65,22 +66,36 @@ static const ROMFS_DIRENTRY *ROMFindFile(const char *fname) { } return p; } -static bool_t ROMExists(const char *fname) { return ROMFindFile(fname) != 0; } -static long int ROMFilesize(const char *fname) { + +static bool_t ROMExists(const char *fname) +{ + return ROMFindFile(fname) != 0; +} + +static long int ROMFilesize(const char *fname) +{ const ROMFS_DIRENTRY *p; if (!(p = ROMFindFile(fname))) return -1; return p->size; } -static bool_t ROMOpen(GFILE *f, const char *fname) { + +static bool_t ROMOpen(GFILE *f, const char *fname) +{ const ROMFS_DIRENTRY *p; if (!(p = ROMFindFile(fname))) return FALSE; f->obj = (void *)p; return TRUE; } -static void ROMClose(GFILE *f) { (void)f; } -static int ROMRead(GFILE *f, void *buf, int size) { + +static void ROMClose(GFILE *f) +{ + (void)f; +} + +static int ROMRead(GFILE *f, void *buf, int size) +{ const ROMFS_DIRENTRY *p; p = (const ROMFS_DIRENTRY *)f->obj; @@ -90,6 +105,18 @@ static int ROMRead(GFILE *f, void *buf, int size) { memcpy(buf, p->file+f->pos, size); return size; } -static bool_t ROMSetpos(GFILE *f, long int pos) { return pos <= ((const ROMFS_DIRENTRY *)f->obj)->size; } -static long int ROMGetsize(GFILE *f) { return ((const ROMFS_DIRENTRY *)f->obj)->size; } -static bool_t ROMEof(GFILE *f) { return f->pos >= ((const ROMFS_DIRENTRY *)f->obj)->size; } + +static bool_t ROMSetpos(GFILE *f, long int pos) +{ + return pos <= ((const ROMFS_DIRENTRY *)f->obj)->size; +} + +static long int ROMGetsize(GFILE *f) +{ + return ((const ROMFS_DIRENTRY *)f->obj)->size; +} + +static bool_t ROMEof(GFILE *f) +{ + return f->pos >= ((const ROMFS_DIRENTRY *)f->obj)->size; +} |