comparison src/ndir.h @ 272:c5d627a313b1 r21-0b34

Import from CVS: tag r21-0b34
author cvs
date Mon, 13 Aug 2007 10:28:48 +0200
parents 41ff10fd062f
children 74fd4e045ea6
comparison
equal deleted inserted replaced
271:c7b7086b0a39 272:c5d627a313b1
30 #define MAXNAMLEN 15 /* maximum filename length */ 30 #define MAXNAMLEN 15 /* maximum filename length */
31 #endif /* not WINDOWSNT */ 31 #endif /* not WINDOWSNT */
32 /* NOTE: MAXNAMLEN must be one less than a multiple of 4 */ 32 /* NOTE: MAXNAMLEN must be one less than a multiple of 4 */
33 33
34 struct direct /* data from readdir() */ 34 struct direct /* data from readdir() */
35 { 35 {
36 long d_ino; /* inode number of entry */ 36 long d_ino; /* inode number of entry */
37 unsigned short d_reclen; /* length of this record */ 37 unsigned short d_reclen; /* length of this record */
38 unsigned short d_namlen; /* length of string in d_name */ 38 unsigned short d_namlen; /* length of string in d_name */
39 char d_name[MAXNAMLEN+1]; /* name of file */ 39 char d_name[MAXNAMLEN+1]; /* name of file */
40 }; 40 };
41 41
42 typedef struct 42 typedef struct
43 { 43 {
44 int dd_fd; /* file descriptor */ 44 int dd_fd; /* file descriptor */
45 int dd_loc; /* offset in block */ 45 int dd_loc; /* offset in block */
46 int dd_size; /* amount of valid data */ 46 int dd_size; /* amount of valid data */
47 char dd_buf[DIRBLKSIZ]; /* directory block */ 47 char dd_buf[DIRBLKSIZ]; /* directory block */
48 } DIR; /* stream data from opendir() */ 48 } DIR; /* stream data from opendir() */
49 49
50 extern DIR *opendir (CONST char *filename); 50 DIR *opendir (CONST char *filename);
51 extern int closedir (DIR *dirp); 51 int closedir (DIR *dirp);
52 extern struct direct *readdir (DIR *dirp); 52 struct direct *readdir (DIR *dirp);
53 extern struct direct *readdirver (DIR *dirp); 53 struct direct *readdirver (DIR *dirp);
54 extern long telldir (DIR *dirp); 54 long telldir (DIR *dirp);
55 extern void seekdir (DIR *dirp, long loc); 55 void seekdir (DIR *dirp, long loc);
56 56
57 #define rewinddir( dirp ) seekdir( dirp, 0L ) 57 #define rewinddir( dirp ) seekdir( dirp, 0L )