From 266cd8b1d2267a10457a0b0d4b4a91b931be7c93 Mon Sep 17 00:00:00 2001 From: yabause Date: Tue, 6 Jun 2006 22:57:24 +0000 Subject: [PATCH] Removed the windows-specific code from cflash and fat files. Moved the directory access code in fs.c/.h fs.c is still windows-specific code, I'll have to write a POSIX version of that file. --- trunk/desmume/src/Makefile.am | 3 ++- trunk/desmume/src/fs.h | 29 +++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 trunk/desmume/src/fs.h diff --git a/trunk/desmume/src/Makefile.am b/trunk/desmume/src/Makefile.am index 5ac336049..8445ed7f6 100644 --- a/trunk/desmume/src/Makefile.am +++ b/trunk/desmume/src/Makefile.am @@ -8,4 +8,5 @@ libdesmume_a_SOURCES = \ FIFO.c FIFO.h \ GPU.cpp GPU.hpp debug.c debug.h \ MMU.cpp MMU.hpp NDSSystem.cpp NDSSystem.hpp \ - thumb_instructions.cpp thumb_instructions.hpp + thumb_instructions.cpp thumb_instructions.hpp \ + windows/cflash.cpp windows/cflash.h fs.c fs.h diff --git a/trunk/desmume/src/fs.h b/trunk/desmume/src/fs.h new file mode 100644 index 000000000..b1ed75c77 --- /dev/null +++ b/trunk/desmume/src/fs.h @@ -0,0 +1,29 @@ +#ifndef FS_H +#define FS_H + +#include "types.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#define FS_IS_DIR 1 + +#define FS_ERR_NO_MORE_FILES 1 + +typedef struct { + char cFileName[256]; + char cAlternateFileName[14]; + u32 flags; +} FsEntry; + +void * FsReadFirst(const char * path, FsEntry * entry); +int FsReadNext(void * search, FsEntry * entry); +void FsClose(void * search); +int FsError(void); + +#ifdef __cplusplus +} +#endif + +#endif