annotate src/ndir.h @ 298:70ad99077275 r21-0b47

Import from CVS: tag r21-0b47
author cvs
date Mon, 13 Aug 2007 10:39:40 +0200
parents c5d627a313b1
children 74fd4e045ea6
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1 /* This file is part of XEmacs.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3 XEmacs is free software; you can redistribute it and/or modify it
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4 under the terms of the GNU General Public License as published by the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
5 Free Software Foundation; either version 2, or (at your option) any
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
6 later version.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
7
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
8 XEmacs is distributed in the hope that it will be useful, but WITHOUT
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
9 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
10 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
11 for more details.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
12
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
13 You should have received a copy of the GNU General Public License
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
14 along with XEmacs; see the file COPYING. If not, write to
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
15 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
16 Boston, MA 02111-1307, USA. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
17
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
18 /* Synched up with: FSF 19.30. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
19
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
20 /*
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
21 <dir.h> -- definitions for 4.2BSD-compatible directory access
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
22
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
23 last edit: 09-Jul-1983 D A Gwyn
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
24 */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
25
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
26 #define DIRBLKSIZ 512 /* size of directory block */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
27 #ifdef WINDOWSNT
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
28 #define MAXNAMLEN 255
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
29 #else /* not WINDOWSNT */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
30 #define MAXNAMLEN 15 /* maximum filename length */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
31 #endif /* not WINDOWSNT */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
32 /* NOTE: MAXNAMLEN must be one less than a multiple of 4 */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
33
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
34 struct direct /* data from readdir() */
272
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 209
diff changeset
35 {
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 209
diff changeset
36 long d_ino; /* inode number of entry */
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 209
diff changeset
37 unsigned short d_reclen; /* length of this record */
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 209
diff changeset
38 unsigned short d_namlen; /* length of string in d_name */
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 209
diff changeset
39 char d_name[MAXNAMLEN+1]; /* name of file */
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 209
diff changeset
40 };
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
41
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
42 typedef struct
272
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 209
diff changeset
43 {
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 209
diff changeset
44 int dd_fd; /* file descriptor */
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 209
diff changeset
45 int dd_loc; /* offset in block */
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 209
diff changeset
46 int dd_size; /* amount of valid data */
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 209
diff changeset
47 char dd_buf[DIRBLKSIZ]; /* directory block */
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 209
diff changeset
48 } DIR; /* stream data from opendir() */
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
49
272
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 209
diff changeset
50 DIR *opendir (CONST char *filename);
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 209
diff changeset
51 int closedir (DIR *dirp);
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 209
diff changeset
52 struct direct *readdir (DIR *dirp);
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 209
diff changeset
53 struct direct *readdirver (DIR *dirp);
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 209
diff changeset
54 long telldir (DIR *dirp);
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 209
diff changeset
55 void seekdir (DIR *dirp, long loc);
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
56
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
57 #define rewinddir( dirp ) seekdir( dirp, 0L )