xref: /openbsd/gnu/usr.bin/cvs/os2/dirent.h (revision 78b63d65)
1 /*
2  *              Author:     Bob Withers
3  *              Copyright (c) 1993, All Rights Reserved
4  *
5  *                              NOTICE
6  *
7  * Permission to use, copy, modify, and distribute this software and
8  * its documentation for any purpose and without fee is hereby granted
9  * provided that the above copyright notice appears in all copies and
10  * that both the copyright notice and this permission notice appear in
11  * supporting documentation.
12  *
13  * The author makes no representations about the suitability of this
14  * software for any purpose.  This software is provided ``as is''
15  * without express or implied warranty.
16  */
17 
18 #ifndef DIRENT_H
19 #define DIRENT_H
20 
21 /*  Unix style directory(3C) support for OS/2 V2.x                      */
22 
23 struct dirent
24 {
25     long            d_ino;      /* not used in this implementation      */
26     long            d_off;      /* not used in this implementation      */
27     unsigned short  d_namlen;
28     char            d_name[1];
29 };
30 
31 
32 struct S_Dir
33 {
34     char           *dirname;
35     int             max_ent;
36     int             tot_ent;
37     int             cur_ent;
38     struct dirent **entp;
39 };
40 typedef struct S_Dir            DIR;
41 
42 
43 DIR *               opendir(char *filename);
44 struct dirent *     readdir(DIR *dirp);
45 long                telldir(DIR *dirp);
46 void                seekdir(DIR *dirp, long loc);
47 void                rewinddir(DIR *dirp);
48 void                closedir(DIR *dirp);
49 
50 #endif      /* DIRENT_H */
51