| 1 | /* dirent.h */
|
|---|
| 2 |
|
|---|
| 3 | /* djl
|
|---|
| 4 | * Provide UNIX compatibility
|
|---|
| 5 | */
|
|---|
| 6 |
|
|---|
| 7 | #ifndef _INC_DIRENT
|
|---|
| 8 | #define _INC_DIRENT
|
|---|
| 9 |
|
|---|
| 10 | /*
|
|---|
| 11 | * NT versions of readdir(), etc
|
|---|
| 12 | * From the MSDOS implementation
|
|---|
| 13 | */
|
|---|
| 14 |
|
|---|
| 15 | /* Directory entry size */
|
|---|
| 16 | #ifdef DIRSIZ
|
|---|
| 17 | #undef DIRSIZ
|
|---|
| 18 | #endif
|
|---|
| 19 | #define DIRSIZ(rp) (sizeof(struct direct))
|
|---|
| 20 |
|
|---|
| 21 | /* needed to compile directory stuff */
|
|---|
| 22 | #define DIRENT direct
|
|---|
| 23 |
|
|---|
| 24 | /* structure of a directory entry */
|
|---|
| 25 | typedef struct direct
|
|---|
| 26 | {
|
|---|
| 27 | long d_ino; /* inode number (not used by MS-DOS) */
|
|---|
| 28 | long d_namlen; /* name length */
|
|---|
| 29 | char d_name[257]; /* file name */
|
|---|
| 30 | } _DIRECT;
|
|---|
| 31 |
|
|---|
| 32 | /* structure for dir operations */
|
|---|
| 33 | typedef struct _dir_struc
|
|---|
| 34 | {
|
|---|
| 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 */
|
|---|
| 42 | } DIR;
|
|---|
| 43 |
|
|---|
| 44 | #if 0 /* these have moved to win32iop.h */
|
|---|
| 45 | DIR * win32_opendir(char *filename);
|
|---|
| 46 | struct direct * win32_readdir(DIR *dirp);
|
|---|
| 47 | long win32_telldir(DIR *dirp);
|
|---|
| 48 | void win32_seekdir(DIR *dirp,long loc);
|
|---|
| 49 | void win32_rewinddir(DIR *dirp);
|
|---|
| 50 | int win32_closedir(DIR *dirp);
|
|---|
| 51 | #endif
|
|---|
| 52 |
|
|---|
| 53 | #endif /* _INC_DIRENT */
|
|---|