diff options
author | berkeviktor@aol.com <berkeviktor@aol.com> | 2011-02-28 19:18:32 +0100 |
---|---|---|
committer | berkeviktor@aol.com <berkeviktor@aol.com> | 2011-02-28 19:18:32 +0100 |
commit | 6355e6a76e73dfd3b8f49fcec524e7d2bbb5a11c (patch) | |
tree | 3f24aeb80bebcc90465b6e723d9fc10aa5e41d61 /src/common/dirent.h | |
parent | d3330fbe6f3cdcf3cc43550bb61c3393eb7cd794 (diff) | |
parent | dd58a0aa9e29efc87bcdb287b37018c1c6fd132e (diff) |
merge with xchat r1490
Diffstat (limited to 'src/common/dirent.h')
-rw-r--r-- | src/common/dirent.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/common/dirent.h b/src/common/dirent.h new file mode 100644 index 00000000..cbb753e6 --- /dev/null +++ b/src/common/dirent.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*/ |