equal
deleted
inserted
replaced
4 |
4 |
5 #ifndef FIOS_H |
5 #ifndef FIOS_H |
6 #define FIOS_H |
6 #define FIOS_H |
7 |
7 |
8 /* Deals with finding savegames */ |
8 /* Deals with finding savegames */ |
9 typedef struct { |
9 struct FiosItem { |
10 byte type; |
10 byte type; |
11 uint64 mtime; |
11 uint64 mtime; |
12 char title[64]; |
12 char title[64]; |
13 char name[256 - 12 - 64]; |
13 char name[256 - 12 - 64]; |
14 } FiosItem; |
14 }; |
15 |
15 |
16 enum { |
16 enum { |
17 FIOS_TYPE_DRIVE = 0, |
17 FIOS_TYPE_DRIVE = 0, |
18 FIOS_TYPE_PARENT = 1, |
18 FIOS_TYPE_PARENT = 1, |
19 FIOS_TYPE_DIR = 2, |
19 FIOS_TYPE_DIR = 2, |
54 int CDECL compare_FiosItems(const void *a, const void *b); |
54 int CDECL compare_FiosItems(const void *a, const void *b); |
55 |
55 |
56 /* Implementation of opendir/readdir/closedir for Windows */ |
56 /* Implementation of opendir/readdir/closedir for Windows */ |
57 #if defined(WIN32) |
57 #if defined(WIN32) |
58 #include <windows.h> |
58 #include <windows.h> |
59 typedef struct DIR DIR; |
59 struct DIR; |
60 |
60 |
61 typedef struct dirent { // XXX - only d_name implemented |
61 struct dirent { // XXX - only d_name implemented |
62 wchar_t *d_name; // name of found file |
62 wchar_t *d_name; // name of found file |
63 /* little hack which will point to parent DIR struct which will |
63 /* little hack which will point to parent DIR struct which will |
64 * save us a call to GetFileAttributes if we want information |
64 * save us a call to GetFileAttributes if we want information |
65 * about the file (for example in function fio_bla) */ |
65 * about the file (for example in function fio_bla) */ |
66 DIR *dir; |
66 DIR *dir; |
67 } dirent; |
67 }; |
68 |
68 |
69 struct DIR { |
69 struct DIR { |
70 HANDLE hFind; |
70 HANDLE hFind; |
71 /* the dirent returned by readdir. |
71 /* the dirent returned by readdir. |
72 * note: having only one global instance is not possible because |
72 * note: having only one global instance is not possible because |