annotate nt/inc/sys/dir.h @ 398:74fd4e045ea6 r21-2-29

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