diff options
author | Berke Viktor <bviktor@hexchat.org> | 2012-07-11 19:46:46 +0200 |
---|---|---|
committer | Berke Viktor <bviktor@hexchat.org> | 2012-07-11 19:46:46 +0200 |
commit | 1ea726a91809340451c7a05ede34e7be00ba7863 (patch) | |
tree | 936bb6fce5c26b3876a7324ec82ee0bb232875d7 /src/dirent/dirent-win32.h | |
parent | d81619cca95831e2fd444d71cd078201f3db0e39 (diff) | |
parent | 9d9c24c8d347aa44efbd63e8f8c8dfb5b3cddedb (diff) |
Merge branch 'wdk'
Diffstat (limited to 'src/dirent/dirent-win32.h')
-rw-r--r-- | src/dirent/dirent-win32.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/dirent/dirent-win32.h b/src/dirent/dirent-win32.h new file mode 100644 index 00000000..cbb753e6 --- /dev/null +++ b/src/dirent/dirent-win32.h @@ -0,0 +1,28 @@ +#ifndef DIRENT_H +#define DIRENT_H + +#include <windows.h> +#include <string.h> +#include <assert.h> + +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*/ |