2 <dir.h> -- definitions for 4.2BSD-compatible directory access
4 last edit: 09-Jul-1983 D A Gwyn
6 * The code here is forced by the interface, and is not subject to
7 * copyright, constituting the only possible expression of the
8 * algorithm in this format.
23 #define DIRBLKSIZ 512 /* size of directory block */
25 #define MAXNAMLEN (DIR$S_NAME + 7) /* 80 plus room for version #. */
26 #define MAXFULLSPEC NAM$C_MAXRSS /* Maximum full spec */
30 #else /* not WINDOWSNT */
31 #define MAXNAMLEN 15 /* maximum filename length */
32 #endif /* not WINDOWSNT */
34 /* NOTE: MAXNAMLEN must be one less than a multiple of 4 */
36 struct direct
/* data from readdir() */
38 long d_ino
; /* inode number of entry */
39 unsigned short d_reclen
; /* length of this record */
40 unsigned short d_namlen
; /* length of string in d_name */
41 char d_name
[MAXNAMLEN
+1]; /* name of file */
46 int dd_fd
; /* file descriptor */
47 int dd_loc
; /* offset in block */
48 int dd_size
; /* amount of valid data */
49 char dd_buf
[DIRBLKSIZ
]; /* directory block */
50 } DIR; /* stream data from opendir() */
52 extern DIR *opendir();
53 extern struct direct
*readdir();
54 extern long telldir();
55 extern void seekdir();
56 extern void closedir();
58 #define rewinddir( dirp ) seekdir( dirp, 0L )
60 /* arch-tag: aea50570-ffb7-43fd-b423-7743b10fbe6e
61 (do not change this comment) */