blob: 8564eb04cde799ee1b1e770619a5843cee2f773e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
|
/* */
/* dirent_local.h */
/* */
/* POSIX directory routines for Windows. */
/* */
/* Part of the ht://Dig package <http://www.htdig.org/> */
/* Copyright (c) 2003 The ht://Dig Group */
/* For copyright details, see the file COPYING in your distribution */
/* or the GNU Library General Public License version 2 or later */
/* <http://www.gnu.org/copyleft/lgpl.html> */
/* */
/* $Id: direct_local.h */
/* */
/*
* POSIX directory routines for Windows.
*
* Added by Neal Richter, RightNow Technologies
* June 2003
*
*/
#ifndef DIRENT_LOCAL_H
#define DIRENT_LOCAL_H
#ifndef _WIN32
#include <dirent.h>
#else
#include <windows.h>
#ifdef __cplusplus
extern "C" {
#endif
/* WIN equivalent of POSIX directory routines */
#define MAXNAMLEN 255
struct dirent {
char d_name[256]; /* directory name */
};
struct DIRstruct {
HANDLE filehand;
WIN32_FIND_DATA finddata;
struct dirent file;
char priv;
};
typedef struct DIRstruct DIR;
DIR *opendir(const char *name);
struct dirent *readdir(DIR *);
int closedir(DIR *);
#ifdef __cplusplus
}
#endif
#endif /* _WIN32 */
#if defined(SOLARIS) || defined(_WIN32)
int scandir(char *dirname,
struct dirent ***namelist,
int (*select)(struct dirent *),
int (*dcomp)(void *, void *));
int alphasort(void *a, void *b);
#endif
#endif /* !DIRENT_LOCAL_H */
|