summaryrefslogtreecommitdiff
path: root/uisimulator/x11/io.c
diff options
context:
space:
mode:
Diffstat (limited to 'uisimulator/x11/io.c')
-rw-r--r--uisimulator/x11/io.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/uisimulator/x11/io.c b/uisimulator/x11/io.c
index 2a94969ce3..0452d65ae8 100644
--- a/uisimulator/x11/io.c
+++ b/uisimulator/x11/io.c
@@ -1,5 +1,5 @@
1 1
2#include <dirent.h> 2#include "dir.h"
3 3
4#define SIMULATOR_ARCHOS_ROOT "archos" 4#define SIMULATOR_ARCHOS_ROOT "archos"
5 5
@@ -14,6 +14,19 @@ DIR *x11_opendir(char *name)
14 return opendir(name); 14 return opendir(name);
15} 15}
16 16
17struct dirent *x11_readdir(DIR *dir)
18{
19 static struct dirent secret;
20
21 struct x11_dirent *x11 = (readdir)(dir);
22
23 strcpy(secret.d_name, x11->d_name);
24 secret.attribute = (x11->d_type == DT_DIR)?ATTR_DIRECTORY:0;
25
26 return &secret;
27}
28
29
17int x11_open(char *name, int opts) 30int x11_open(char *name, int opts)
18{ 31{
19 char buffer[256]; /* sufficiently big */ 32 char buffer[256]; /* sufficiently big */