Mercurial > emacs
annotate src/ndir.h @ 87929:f3349840ec44
Add a TODO item about missing files.
(vc-exec-after): Add a tooltip to the new mode-line item.
author | Dan Nicolaescu <dann@ics.uci.edu> |
---|---|
date | Thu, 24 Jan 2008 08:01:54 +0000 |
parents | 9511dc88835c |
children | 52a7f3f50b89 c3512b2085a0 |
rev | line source |
---|---|
484 | 1 /* |
2 <dir.h> -- definitions for 4.2BSD-compatible directory access | |
3 | |
4 last edit: 09-Jul-1983 D A Gwyn | |
5 | |
75764
9511dc88835c
Add legal comment on copyright issue.
Glenn Morris <rgm@gnu.org>
parents:
52401
diff
changeset
|
6 * The code here is forced by the interface, and is not subject to |
9511dc88835c
Add legal comment on copyright issue.
Glenn Morris <rgm@gnu.org>
parents:
52401
diff
changeset
|
7 * copyright, constituting the only possible expression of the |
9511dc88835c
Add legal comment on copyright issue.
Glenn Morris <rgm@gnu.org>
parents:
52401
diff
changeset
|
8 * algorithm in this format. |
9511dc88835c
Add legal comment on copyright issue.
Glenn Morris <rgm@gnu.org>
parents:
52401
diff
changeset
|
9 */ |
484 | 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 | |
5877 | 20 #include "vmsdir.h" |
484 | 21 #endif /* VMS */ |
22 | |
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 | |
9792
b8fc349121d1
(MAXNAMLEN) [WINDOWSNT]: Define as 255.
Richard M. Stallman <rms@gnu.org>
parents:
5877
diff
changeset
|
28 #ifdef WINDOWSNT |
b8fc349121d1
(MAXNAMLEN) [WINDOWSNT]: Define as 255.
Richard M. Stallman <rms@gnu.org>
parents:
5877
diff
changeset
|
29 #define MAXNAMLEN 255 |
b8fc349121d1
(MAXNAMLEN) [WINDOWSNT]: Define as 255.
Richard M. Stallman <rms@gnu.org>
parents:
5877
diff
changeset
|
30 #else /* not WINDOWSNT */ |
484 | 31 #define MAXNAMLEN 15 /* maximum filename length */ |
9792
b8fc349121d1
(MAXNAMLEN) [WINDOWSNT]: Define as 255.
Richard M. Stallman <rms@gnu.org>
parents:
5877
diff
changeset
|
32 #endif /* not WINDOWSNT */ |
484 | 33 #endif /* VMS */ |
34 /* NOTE: MAXNAMLEN must be one less than a multiple of 4 */ | |
35 | |
36 struct direct /* data from readdir() */ | |
37 { | |
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 */ | |
42 }; | |
43 | |
44 typedef struct | |
45 { | |
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() */ | |
51 | |
52 extern DIR *opendir(); | |
53 extern struct direct *readdir(); | |
54 extern long telldir(); | |
55 extern void seekdir(); | |
56 extern void closedir(); | |
57 | |
58 #define rewinddir( dirp ) seekdir( dirp, 0L ) | |
52401 | 59 |
60 /* arch-tag: aea50570-ffb7-43fd-b423-7743b10fbe6e | |
61 (do not change this comment) */ |