summaryrefslogtreecommitdiff
path: root/uisimulator/win32
diff options
context:
space:
mode:
Diffstat (limited to 'uisimulator/win32')
-rw-r--r--uisimulator/win32/Makefile.vc62
-rw-r--r--uisimulator/win32/dir.h81
-rw-r--r--uisimulator/win32/file.h5
-rw-r--r--uisimulator/win32/sprintf.h29
-rw-r--r--uisimulator/win32/uisw32.h2
5 files changed, 118 insertions, 1 deletions
diff --git a/uisimulator/win32/Makefile.vc6 b/uisimulator/win32/Makefile.vc6
index 5391224f81..d92f18d86d 100644
--- a/uisimulator/win32/Makefile.vc6
+++ b/uisimulator/win32/Makefile.vc6
@@ -49,7 +49,7 @@ RC = rc
49LINK = link 49LINK = link
50DEFINES = $(DEFINES) -DWIN32 -DHAVE_CONFIG_H -DGETTIMEOFDAY_TWO_ARGS -DSIMULATOR $(KEYPAD) $(DISPLAY) -DAPPSVERSION=\"WIN32SIM\" 50DEFINES = $(DEFINES) -DWIN32 -DHAVE_CONFIG_H -DGETTIMEOFDAY_TWO_ARGS -DSIMULATOR $(KEYPAD) $(DISPLAY) -DAPPSVERSION=\"WIN32SIM\"
51LDFLAGS = /OUT:uisw32.exe /SUBSYSTEM:windows /NOLOGO /MACHINE:IX86 kernel32.lib user32.lib gdi32.lib 51LDFLAGS = /OUT:uisw32.exe /SUBSYSTEM:windows /NOLOGO /MACHINE:IX86 kernel32.lib user32.lib gdi32.lib
52INCLUDES = -I$(FIRMWAREDIR) -I$(DRIVERS) -I$(COMMON) -I$(APPSCOMMON) -I$(SIMDIR) -I$(APPDIR) -I$(MODEL_SPECIFIC_DIR) 52INCLUDES = -I$(FIRMWAREDIR)/export -I$(DRIVERS) -I$(COMMON) -I$(APPSCOMMON) -I$(SIMDIR) -I$(APPDIR) -I$(MODEL_SPECIFIC_DIR)
53LIBS = /DEFAULTLIB:gdi32.lib /DEFAULTLIB:user32.lib /NODEFAULTLIB:libc.lib 53LIBS = /DEFAULTLIB:gdi32.lib /DEFAULTLIB:user32.lib /NODEFAULTLIB:libc.lib
54 54
55CFLAGS = $(DEBUG) $(DEFINES) $(INCLUDES) /MD /Fd"Release/vc70.pdb" /c 55CFLAGS = $(DEBUG) $(DEFINES) $(INCLUDES) /MD /Fd"Release/vc70.pdb" /c
diff --git a/uisimulator/win32/dir.h b/uisimulator/win32/dir.h
new file mode 100644
index 0000000000..6b275abda8
--- /dev/null
+++ b/uisimulator/win32/dir.h
@@ -0,0 +1,81 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright (C) 2002 by Björn Stenberg
11 *
12 * All files in this archive are subject to the GNU General Public License.
13 * See the file COPYING in the source tree root for full license agreement.
14 *
15 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16 * KIND, either express or implied.
17 *
18 ****************************************************************************/
19#ifndef _DIR_H_
20#define _DIR_H_
21
22#include <stdbool.h>
23#include "file.h"
24
25#ifndef DIRENT_DEFINED
26
27#define ATTR_READ_ONLY 0x01
28#define ATTR_HIDDEN 0x02
29#define ATTR_SYSTEM 0x04
30#define ATTR_VOLUME_ID 0x08
31#define ATTR_DIRECTORY 0x10
32#define ATTR_ARCHIVE 0x20
33
34struct dirent {
35 unsigned char d_name[MAX_PATH];
36 int attribute;
37 int size;
38 int startcluster;
39};
40#endif
41
42
43#ifndef SIMULATOR
44
45#include "fat.h"
46
47typedef struct {
48 bool busy;
49 int startcluster;
50 struct fat_dir fatdir;
51 struct dirent theent;
52} DIR;
53
54#else // SIMULATOR
55
56#ifdef WIN32
57#ifndef __MINGW32__
58#include <io.h>
59#endif /* __MINGW32__ */
60
61typedef struct DIRtag
62{
63 struct dirent fd;
64 int handle;
65} DIR;
66
67#endif /* WIN32 */
68
69#endif // SIMULATOR
70
71#ifndef DIRFUNCTIONS_DEFINED
72
73extern DIR* opendir(char* name);
74extern int closedir(DIR* dir);
75extern int mkdir(char* name);
76
77extern struct dirent* readdir(DIR* dir);
78
79#endif /* DIRFUNCTIONS_DEFINED */
80
81#endif
diff --git a/uisimulator/win32/file.h b/uisimulator/win32/file.h
index 81fe3dd86a..3cda3b9d8c 100644
--- a/uisimulator/win32/file.h
+++ b/uisimulator/win32/file.h
@@ -17,6 +17,8 @@
17 * 17 *
18 ****************************************************************************/ 18 ****************************************************************************/
19 19
20#ifndef _FILE_H_
21
20#include <stdio.h> 22#include <stdio.h>
21#include <string.h> 23#include <string.h>
22 24
@@ -26,3 +28,6 @@ int win32_rename(char *oldpath, char *newpath);
26 28
27#include "../../firmware/include/file.h" 29#include "../../firmware/include/file.h"
28 30
31#undef rename
32
33#endif
diff --git a/uisimulator/win32/sprintf.h b/uisimulator/win32/sprintf.h
new file mode 100644
index 0000000000..ecbbc8a419
--- /dev/null
+++ b/uisimulator/win32/sprintf.h
@@ -0,0 +1,29 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright (C) 2002 by Felix Arends
11 *
12 * All files in this archive are subject to the GNU General Public License.
13 * See the file COPYING in the source tree root for full license agreement.
14 *
15 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16 * KIND, either express or implied.
17 *
18 ****************************************************************************/
19
20#ifndef __SPRINTF_H__
21#define __SPRINTF_H__
22
23#include <stddef.h>
24#include <stdarg.h>
25
26int snprintf (char *buf, size_t size, const char *fmt, ...);
27int vsnprintf (char *buf, int size, const char *fmt, va_list ap);
28
29#endif /* __SPRINTF_H__ */
diff --git a/uisimulator/win32/uisw32.h b/uisimulator/win32/uisw32.h
index 7b38c76987..9a95294819 100644
--- a/uisimulator/win32/uisw32.h
+++ b/uisimulator/win32/uisw32.h
@@ -20,6 +20,8 @@
20#ifndef __UISW32_H__ 20#ifndef __UISW32_H__
21#define __UISW32_H__ 21#define __UISW32_H__
22 22
23typedef unsigned short wchar_t;
24#define _WCHAR_T_DEFINED
23#include <windows.h> 25#include <windows.h>
24#include "lcd-win32.h" 26#include "lcd-win32.h"
25 27