From 13ee029364b37eca95c43641420e75c872b32653 Mon Sep 17 00:00:00 2001 From: Berke Viktor Date: Sun, 11 Dec 2011 18:04:35 +0100 Subject: some more multiplatform support --- src/common/dirent-win32.h | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 src/common/dirent-win32.h (limited to 'src/common/dirent-win32.h') diff --git a/src/common/dirent-win32.h b/src/common/dirent-win32.h new file mode 100644 index 00000000..cbb753e6 --- /dev/null +++ b/src/common/dirent-win32.h @@ -0,0 +1,28 @@ +#ifndef DIRENT_H +#define DIRENT_H + +#include +#include +#include + +typedef struct dirent +{ + char d_name[MAX_PATH + 1]; /* current dir entry (multi-byte char string) */ + WIN32_FIND_DATAA data; /* file attributes */ +} dirent; + +typedef struct DIR +{ + dirent current; /* Current directory entry */ + int cached; /* Indicates un-processed entry in memory */ + HANDLE search_handle; /* File search handle */ + char patt[MAX_PATH + 3]; /* search pattern (3 = pattern + "\\*\0") */ +} DIR; + +/* Forward declarations */ +DIR *opendir (const char *dirname); +struct dirent *readdir (DIR *dirp); +int closedir (DIR *dirp); +void rewinddir(DIR* dirp); + +#endif /*DIRENT_H*/ -- cgit 1.4.1