diff options
author | Daniel Stenberg <daniel@haxx.se> | 2002-05-07 12:06:32 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2002-05-07 12:06:32 +0000 |
commit | 27dfc7c14ea181d538446138801537a713601ee6 (patch) | |
tree | da820bcc5ef811c9d3a370e80f6afa0a571a9897 /uisimulator/x11/dir.h | |
parent | 8ae29ff4b2552f6c91c9a1b55d82fb9d8452bf7d (diff) | |
download | rockbox-27dfc7c14ea181d538446138801537a713601ee6.tar.gz rockbox-27dfc7c14ea181d538446138801537a713601ee6.zip |
extended the wrapper layer, we can't depend on much in the "real" dirent
struct since it differs too much between unixes. d_name is there, the rest
we get with stat() calls to simulate the target dirent properly
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@492 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'uisimulator/x11/dir.h')
-rw-r--r-- | uisimulator/x11/dir.h | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/uisimulator/x11/dir.h b/uisimulator/x11/dir.h index b1df855311..a3898076f6 100644 --- a/uisimulator/x11/dir.h +++ b/uisimulator/x11/dir.h | |||
@@ -20,6 +20,7 @@ | |||
20 | #define dirent x11_dirent | 20 | #define dirent x11_dirent |
21 | #define readdir(x) x11_readdir(x) | 21 | #define readdir(x) x11_readdir(x) |
22 | #define opendir(x) x11_opendir(x) | 22 | #define opendir(x) x11_opendir(x) |
23 | #define closedir(x) x11_closedir(x) | ||
23 | 24 | ||
24 | /* | 25 | /* |
25 | * The defines above should let us use the readdir() and opendir() in target | 26 | * The defines above should let us use the readdir() and opendir() in target |
@@ -38,6 +39,17 @@ | |||
38 | 39 | ||
39 | #include "../../firmware/common/dir.h" | 40 | #include "../../firmware/common/dir.h" |
40 | 41 | ||
41 | extern DIR *x11_opendir(char *name); | 42 | #define SIMULATOR_ARCHOS_ROOT "archos" |
42 | extern struct dirent* x11_readdir(DIR* dir); | ||
43 | 43 | ||
44 | struct mydir { | ||
45 | DIR *dir; | ||
46 | char *name; | ||
47 | }; | ||
48 | |||
49 | typedef struct mydir MYDIR; | ||
50 | |||
51 | extern MYDIR *x11_opendir(char *name); | ||
52 | extern struct dirent* x11_readdir(MYDIR* dir); | ||
53 | extern void x11_closedir(MYDIR *dir); | ||
54 | |||
55 | #define DIR MYDIR | ||