|
|
1.1 root 1: /* (-lgl
2: * COHERENT 386 Device Driver Kit release 2.0
3: * Copyright (c) 1982, 1992 by Mark Williams Company.
4: * All rights reserved. May not be copied without permission.
5: -lgl) */
6:
7: #ifndef __DIRENT_H__
8: #define __DIRENT_H__
9:
10: #include <common/feature.h>
11: #include <common/ccompat.h>
12:
13: #include <common/_uid.h>
14: #include <common/_daddr.h>
15: #include <common/__off.h>
16:
17: #if _I386
18:
19: struct dirent {
20: n_ino_t __NON_POSIX (d_ino); /* i-node number */
21: __daddr_t __NON_POSIX (d_off); /* offset in actual directory*/
22: unsigned short __NON_POSIX (d_reclen); /* record length */
23: char d_name [1];
24: };
25:
26: typedef struct {
27: int __NON_POSIX (dd_fd); /* file descriptor */
28: int __NON_POSIX (dd_loc); /* offset in block */
29: int __NON_POSIX (dd_size); /* amount of valid data */
30: char * __NON_POSIX (dd_buf); /* -> directory block */
31: } DIR; /* stream data from opendir() */
32:
33:
34: #if ! _POSIX_SOURCE
35:
36: #define DIRBUF 2048 /* buffer size for fs-indep. dirs */
37: /* must in general be larger than the filesystem buffer size */
38:
39: #define MAXNAMLEN 14 /* maximum filename length */
40:
41: #endif /* ! _POSIX_SOURCE */
42:
43: #else /* if ! _I386 */
44:
45: #if ! DIRSIZ
46: # define DIRSIZ 14 /* Size of directory name */
47: #endif
48:
49: struct dirent {
50: ino_t d_ino; /* Inode number */
51: char d_name[DIRSIZ]; /* Name */
52: };
53:
54: #endif /* ! _I386 */
55:
56:
57: __EXTERN_C_BEGIN__
58:
59: DIR * opendir __PROTO ((__CONST__ char * _dirname));
60: struct dirent * readdir __PROTO ((DIR * _dirp));
61: void rewinddir __PROTO ((DIR * _dirp));
62: int closedir __PROTO ((DIR * _dirp));
63:
64: #if ! _POSIX_SOURCE
65:
66: __off_t telldir __PROTO ((DIR * _dirp));
67: void seekdir __PROTO ((DIR * _dirp, __off_t _loc));
68:
69: #endif
70:
71: __EXTERN_C_END__
72:
73:
74: #endif /* ! defined (__DIRENT_H__) */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.