diff options
author | Daniel Stenberg <daniel@haxx.se> | 2005-02-22 12:19:12 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2005-02-22 12:19:12 +0000 |
commit | 22b7701fe75cce9afdbc27046821dc089f9e7dac (patch) | |
tree | ca5b4f0428fad0fc9c775dfb0ac879ddee863846 /firmware/include/dir.h | |
parent | 376057d2b67bae0a7b24ae1715d3cbb0b540b7a9 (diff) | |
download | rockbox-22b7701fe75cce9afdbc27046821dc089f9e7dac.tar.gz rockbox-22b7701fe75cce9afdbc27046821dc089f9e7dac.zip |
Build cleanup and general fixes. fprintf() is now fdprintf(), the separation
between uisimulator files and firmware/apps files are better done.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6031 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/include/dir.h')
-rw-r--r-- | firmware/include/dir.h | 36 |
1 files changed, 16 insertions, 20 deletions
diff --git a/firmware/include/dir.h b/firmware/include/dir.h index 12ec724692..26ccd03ed3 100644 --- a/firmware/include/dir.h +++ b/firmware/include/dir.h | |||
@@ -30,6 +30,16 @@ | |||
30 | #define ATTR_ARCHIVE 0x20 | 30 | #define ATTR_ARCHIVE 0x20 |
31 | #define ATTR_VOLUME 0x40 /* this is a volume, not a real directory */ | 31 | #define ATTR_VOLUME 0x40 /* this is a volume, not a real directory */ |
32 | 32 | ||
33 | #ifdef SIMULATOR | ||
34 | #define dirent sim_dirent | ||
35 | #define DIR SIM_DIR | ||
36 | #define opendir(x) sim_opendir(x) | ||
37 | #define readdir(x) sim_readdir(x) | ||
38 | #define closedir(x) sim_closedir(x) | ||
39 | #define mkdir(x, y) sim_mkdir(x, y) | ||
40 | #define rmdir(x) sim_rmdir(x) | ||
41 | #endif | ||
42 | |||
33 | #ifndef DIRENT_DEFINED | 43 | #ifndef DIRENT_DEFINED |
34 | 44 | ||
35 | struct dirent { | 45 | struct dirent { |
@@ -42,12 +52,10 @@ struct dirent { | |||
42 | }; | 52 | }; |
43 | #endif | 53 | #endif |
44 | 54 | ||
45 | |||
46 | #ifndef SIMULATOR | ||
47 | |||
48 | #include "fat.h" | 55 | #include "fat.h" |
49 | 56 | ||
50 | typedef struct { | 57 | typedef struct { |
58 | #ifndef SIMULATOR | ||
51 | bool busy; | 59 | bool busy; |
52 | int startcluster; | 60 | int startcluster; |
53 | struct fat_dir fatdir; | 61 | struct fat_dir fatdir; |
@@ -56,25 +64,13 @@ typedef struct { | |||
56 | #ifdef HAVE_MULTIVOLUME | 64 | #ifdef HAVE_MULTIVOLUME |
57 | int volumecounter; /* running counter for faked volume entries */ | 65 | int volumecounter; /* running counter for faked volume entries */ |
58 | #endif | 66 | #endif |
67 | #else | ||
68 | /* simulator: */ | ||
69 | void *dir; /* actually a DIR* dir */ | ||
70 | char *name; | ||
71 | #endif | ||
59 | } DIR; | 72 | } DIR; |
60 | 73 | ||
61 | #else /* SIMULATOR */ | ||
62 | |||
63 | #ifdef WIN32 | ||
64 | #ifndef __MINGW32__ | ||
65 | #include <io.h> | ||
66 | #endif /* __MINGW32__ */ | ||
67 | |||
68 | typedef struct DIRtag | ||
69 | { | ||
70 | struct dirent fd; | ||
71 | int handle; | ||
72 | } DIR; | ||
73 | |||
74 | #endif /* WIN32 */ | ||
75 | |||
76 | #endif /* SIMULATOR */ | ||
77 | |||
78 | #ifndef DIRFUNCTIONS_DEFINED | 74 | #ifndef DIRFUNCTIONS_DEFINED |
79 | 75 | ||
80 | extern DIR* opendir(const char* name); | 76 | extern DIR* opendir(const char* name); |