summaryrefslogtreecommitdiffstats
path: root/uisimulator
diff options
context:
space:
mode:
authorLinus Nielsen Feltzing <linus@haxx.se>2004-01-21 14:58:40 +0000
committerLinus Nielsen Feltzing <linus@haxx.se>2004-01-21 14:58:40 +0000
commitef7293f0bc336beb30f3a5f2eafad4a447f60ac5 (patch)
tree68b02b0278b25a10a261d8813bbf5be39e1a51b6 /uisimulator
parent33acdef9db5ffa2c6f93dc07d0400c7a72a0f25e (diff)
downloadrockbox-ef7293f0bc336beb30f3a5f2eafad4a447f60ac5.tar.gz
rockbox-ef7293f0bc336beb30f3a5f2eafad4a447f60ac5.tar.bz2
rockbox-ef7293f0bc336beb30f3a5f2eafad4a447f60ac5.zip
New feature: NOw you can store the recorded files in either /recordings (the directory will be created automatically) or in the current directory.
New feature: A "Create directory" menu option (untested in the simulator). Bug fix: The ON+Play menu could do nasty things if you pressed ON+Play in an empty dir. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4268 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'uisimulator')
-rw-r--r--uisimulator/win32/dir-win32.h2
-rw-r--r--uisimulator/x11/dir.h2
-rw-r--r--uisimulator/x11/io.c13
3 files changed, 16 insertions, 1 deletions
diff --git a/uisimulator/win32/dir-win32.h b/uisimulator/win32/dir-win32.h
index 67b37dfc74..151f6f3674 100644
--- a/uisimulator/win32/dir-win32.h
+++ b/uisimulator/win32/dir-win32.h
@@ -20,7 +20,7 @@
#ifndef __FILE_WIN32_H__
#define __FILE_WIN32_H__
-#define mkdir(x) dos_mkdir(x)
+#define mkdir(x, y) dos_mkdir(x)
#include <io.h>
#include "../../firmware/include/dir.h"
diff --git a/uisimulator/x11/dir.h b/uisimulator/x11/dir.h
index 6b019c833e..17058eafb2 100644
--- a/uisimulator/x11/dir.h
+++ b/uisimulator/x11/dir.h
@@ -32,6 +32,7 @@ typedef void * MYDIR;
extern MYDIR *x11_opendir(char *name);
extern struct x11_dirent* x11_readdir(MYDIR* dir);
extern int x11_closedir(MYDIR *dir);
+extern int x11_mkdir(char *name, int mode);
#ifndef NO_REDEFINES_PLEASE
@@ -40,6 +41,7 @@ extern int x11_closedir(MYDIR *dir);
#define opendir(x) x11_opendir(x)
#define readdir(x) x11_readdir(x)
#define closedir(x) x11_closedir(x)
+#define mkdir(x, y) x11_mkdir(x, y)
#endif
diff --git a/uisimulator/x11/io.c b/uisimulator/x11/io.c
index 14d2bfa2c0..72a7319ec6 100644
--- a/uisimulator/x11/io.c
+++ b/uisimulator/x11/io.c
@@ -133,6 +133,19 @@ int x11_creat(const char *name, mode_t mode)
return (creat)(name, 0666);
}
+int x11_mkdir(const char *name, mode_t mode)
+{
+ char buffer[256]; /* sufficiently big */
+ (void)mode;
+ if(name[0] == '/') {
+ sprintf(buffer, "%s%s", SIMULATOR_ARCHOS_ROOT, name);
+
+ debugf("We create the real directory '%s'\n", buffer);
+ return (mkdir)(buffer, 0666);
+ }
+ return (mkdir)(name, 0666);
+}
+
int x11_remove(char *name)
{
char buffer[256]; /* sufficiently big */