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