This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
win32_*dir() cleanup; win32_readdir() iterates as necessary
[perl5.git] / win32 / include / dirent.h
CommitLineData
95136add 1/* dirent.h */
0a753a76 2
95136add
GS
3/* djl
4 * Provide UNIX compatibility
5 */
0a753a76
PP
6
7#ifndef _INC_DIRENT
8#define _INC_DIRENT
9
95136add
GS
10/*
11 * NT versions of readdir(), etc
12 * From the MSDOS implementation
13 */
0a753a76 14
95136add 15/* Directory entry size */
0a753a76
PP
16#ifdef DIRSIZ
17#undef DIRSIZ
18#endif
19#define DIRSIZ(rp) (sizeof(struct direct))
20
95136add 21/* needed to compile directory stuff */
0a753a76
PP
22#define DIRENT direct
23
95136add 24/* structure of a directory entry */
0a753a76
PP
25typedef struct direct
26{
95136add
GS
27 long d_ino; /* inode number (not used by MS-DOS) */
28 long d_namlen; /* name length */
29 char *d_name; /* file name */
0a753a76
PP
30} _DIRECT;
31
95136add 32/* structure for dir operations */
0a753a76
PP
33typedef struct _dir_struc
34{
95136add
GS
35 char *start; /* starting position */
36 char *curr; /* current position */
37 long size; /* allocated size of string table */
38 long nfiles; /* number of filenames in table */
39 struct direct dirstr; /* directory structure to return */
40 void* handle; /* system handle */
41 char *end; /* position after last filename */
0a753a76
PP
42} DIR;
43
c5be433b 44#if 0 /* these have moved to win32iop.h */
ce2e26e5
GS
45DIR * win32_opendir(char *filename);
46struct direct * win32_readdir(DIR *dirp);
47long win32_telldir(DIR *dirp);
48void win32_seekdir(DIR *dirp,long loc);
49void win32_rewinddir(DIR *dirp);
50int win32_closedir(DIR *dirp);
c5be433b 51#endif
0a753a76 52
95136add 53#endif /* _INC_DIRENT */