1 #ifndef __DIRENT_H 2 #define __DIRENT_H 3 #pragma lib "/$M/lib/ape/libap.a" 4 /* 5 * this must be a power of 2 and a multiple of all the ones in the system 6 */ 7 #define MAXNAMLEN 255 8 9 struct dirent { 10 char d_name[MAXNAMLEN + 1]; 11 }; 12 13 typedef struct _dirdesc { 14 int dd_fd; /* file descriptor */ 15 long dd_loc; /* buf offset of entry from last readdir() */ 16 long dd_size; /* amount of valid data in buffer */ 17 char *dd_buf; /* directory data buffer */ 18 void *dirs; 19 int dirsize; 20 int dirloc; 21 } DIR; 22 23 24 #ifdef __cplusplus 25 extern "C" { 26 #endif 27 28 /* 29 * functions defined on directories 30 */ 31 DIR *opendir(const char *); 32 struct dirent *readdir(DIR *); 33 void rewinddir(DIR *); 34 int closedir(DIR *); 35 36 #ifdef __cplusplus 37 } 38 #endif 39 40 #endif 41