1 /* This file is part of XEmacs.
3 XEmacs is free software; you can redistribute it and/or modify it
4 under the terms of the GNU General Public License as published by the
5 Free Software Foundation; either version 2, or (at your option) any
8 XEmacs is distributed in the hope that it will be useful, but WITHOUT
9 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
13 You should have received a copy of the GNU General Public License
14 along with XEmacs; see the file COPYING. If not, write to
15 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
16 Boston, MA 02111-1307, USA. */
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 */
32 #else /* not WIN32_NATIVE */
33 #define MAXNAMLEN 15 /* maximum filename length */
34 #endif /* not WIN32_NATIVE */
35 /* NOTE: MAXNAMLEN must be one less than a multiple of 4 */
37 struct direct /* data from readdir() */
39 long d_ino; /* inode number of entry */
40 unsigned short d_reclen; /* length of this record */
41 unsigned short d_namlen; /* length of string in d_name */
42 char d_name[MAXNAMLEN+1]; /* name of file */
47 int dd_fd; /* file descriptor */
48 int dd_loc; /* offset in block */
49 int dd_size; /* amount of valid data */
50 char dd_buf[DIRBLKSIZ]; /* directory block */
51 } DIR; /* stream data from opendir() */
53 DIR *opendir (const char *filename);
54 int closedir (DIR *dirp);
55 struct direct *readdir (DIR *dirp);
56 struct direct *readdirver (DIR *dirp);
57 long telldir (DIR *dirp);
58 void seekdir (DIR *dirp, long loc);
60 #define rewinddir( dirp ) seekdir( dirp, 0L )
62 #endif /* INCLUDED_ndir_h_ */