Reorder so that functions are defined before use.
[emacs.git] / src / ndir.h
blobd254b5cf603df57f382261f763e4eaa6db02eca0
1 /*
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.
9 */
10 #ifdef VMS
11 #ifndef FAB$C_BID
12 #include <fab.h>
13 #endif
14 #ifndef NAM$C_BID
15 #include <nam.h>
16 #endif
17 #ifndef RMS$_SUC
18 #include <rmsdef.h>
19 #endif
20 #include "vmsdir.h"
21 #endif /* VMS */
23 #define DIRBLKSIZ 512 /* size of directory block */
24 #ifdef VMS
25 #define MAXNAMLEN (DIR$S_NAME + 7) /* 80 plus room for version #. */
26 #define MAXFULLSPEC NAM$C_MAXRSS /* Maximum full spec */
27 #else
28 #ifdef WINDOWSNT
29 #define MAXNAMLEN 255
30 #else /* not WINDOWSNT */
31 #define MAXNAMLEN 15 /* maximum filename length */
32 #endif /* not WINDOWSNT */
33 #endif /* VMS */
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 */
44 typedef struct
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) */