2 This file is part of SXEmacs
4 SXEmacs is free software: you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation, either version 3 of the License, or
7 (at your option) any later version.
9 SXEmacs is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program. If not, see <http://www.gnu.org/licenses/>. */
18 /* Synched up with: FSF 19.30. */
21 <dir.h> -- definitions for 4.2BSD-compatible directory access
23 last edit: 09-Jul-1983 D A Gwyn
26 #ifndef INCLUDED_ndir_h_
27 #define INCLUDED_ndir_h_
29 #define DIRBLKSIZ 512 /* size of directory block */
30 #define MAXNAMLEN 15 /* maximum filename length */
31 /* NOTE: MAXNAMLEN must be one less than a multiple of 4 */
33 struct direct { /* data from readdir() */
34 long d_ino; /* inode number of entry */
35 unsigned short d_reclen; /* length of this record */
36 unsigned short d_namlen; /* length of string in d_name */
37 char d_name[MAXNAMLEN + 1]; /* name of file */
41 int dd_fd; /* file descriptor */
42 int dd_loc; /* offset in block */
43 int dd_size; /* amount of valid data */
44 char dd_buf[DIRBLKSIZ]; /* directory block */
45 } DIR; /* stream data from opendir() */
47 DIR *opendir(const char *filename);
48 int closedir(DIR * dirp);
49 struct direct *readdir(DIR * dirp);
50 struct direct *readdirver(DIR * dirp);
51 long telldir(DIR * dirp);
52 void seekdir(DIR * dirp, long loc);
54 #define rewinddir( dirp ) seekdir( dirp, 0L )
56 #endif /* INCLUDED_ndir_h_ */