Mercurial > hg > xemacs-beta
comparison src/ndir.h @ 412:697ef44129c6 r21-2-14
Import from CVS: tag r21-2-14
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:20:41 +0200 |
parents | de805c49cfc1 |
children |
comparison
equal
deleted
inserted
replaced
411:12e008d41344 | 412:697ef44129c6 |
---|---|
21 <dir.h> -- definitions for 4.2BSD-compatible directory access | 21 <dir.h> -- definitions for 4.2BSD-compatible directory access |
22 | 22 |
23 last edit: 09-Jul-1983 D A Gwyn | 23 last edit: 09-Jul-1983 D A Gwyn |
24 */ | 24 */ |
25 | 25 |
26 #ifndef INCLUDED_ndir_h_ | |
27 #define INCLUDED_ndir_h_ | |
28 | |
29 #define DIRBLKSIZ 512 /* size of directory block */ | 26 #define DIRBLKSIZ 512 /* size of directory block */ |
30 #ifdef WIN32_NATIVE | 27 #ifdef WINDOWSNT |
31 #define MAXNAMLEN 255 | 28 #define MAXNAMLEN 255 |
32 #else /* not WIN32_NATIVE */ | 29 #else /* not WINDOWSNT */ |
33 #define MAXNAMLEN 15 /* maximum filename length */ | 30 #define MAXNAMLEN 15 /* maximum filename length */ |
34 #endif /* not WIN32_NATIVE */ | 31 #endif /* not WINDOWSNT */ |
35 /* NOTE: MAXNAMLEN must be one less than a multiple of 4 */ | 32 /* NOTE: MAXNAMLEN must be one less than a multiple of 4 */ |
36 | 33 |
37 struct direct /* data from readdir() */ | 34 struct direct /* data from readdir() */ |
38 { | 35 { |
39 long d_ino; /* inode number of entry */ | 36 long d_ino; /* inode number of entry */ |
48 int dd_loc; /* offset in block */ | 45 int dd_loc; /* offset in block */ |
49 int dd_size; /* amount of valid data */ | 46 int dd_size; /* amount of valid data */ |
50 char dd_buf[DIRBLKSIZ]; /* directory block */ | 47 char dd_buf[DIRBLKSIZ]; /* directory block */ |
51 } DIR; /* stream data from opendir() */ | 48 } DIR; /* stream data from opendir() */ |
52 | 49 |
53 DIR *opendir (const char *filename); | 50 DIR *opendir (CONST char *filename); |
54 int closedir (DIR *dirp); | 51 int closedir (DIR *dirp); |
55 struct direct *readdir (DIR *dirp); | 52 struct direct *readdir (DIR *dirp); |
56 struct direct *readdirver (DIR *dirp); | 53 struct direct *readdirver (DIR *dirp); |
57 long telldir (DIR *dirp); | 54 long telldir (DIR *dirp); |
58 void seekdir (DIR *dirp, long loc); | 55 void seekdir (DIR *dirp, long loc); |
59 | 56 |
60 #define rewinddir( dirp ) seekdir( dirp, 0L ) | 57 #define rewinddir( dirp ) seekdir( dirp, 0L ) |
61 | |
62 #endif /* INCLUDED_ndir_h_ */ |