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