Version 4.0.0.1, tag libreoffice-4.0.0.1
[LibreOffice.git] / dmake / os2 / dirent.h
blobeafaccbcc38a1497d629008c140aa7d303ad6cfa
1 /* DIRLIB.H by M. J. Weinstein Released to public domain 1-Jan-89 */
3 #ifndef _DIRLIB_h_
4 #define _DIRLIB_h_
6 #define INCL_DOSFILEMGR
7 #include <os2.h>
8 #include <stdio.h>
9 #include <stdlib.h>
10 #include "stdmacs.h"
12 #define MAXNAMLEN _MAX_FNAME
14 struct dirent {
15 long d_ino;
16 unsigned short d_reclen;
17 unsigned short d_namlen;
18 char d_name[MAXNAMLEN+1];
21 typedef struct {
22 HDIR dd_handle; /* Handle for FindFirst/Next */
23 FILEFINDBUF3 dd_dta; /* Disk transfer area for this dir. */
24 ULONG dd_count; /* Count for FindFirst/Next */
25 APIRET dd_stat; /* Status return from last lookup */
26 char dd_name[1]; /* Full name of file -- struct is extended */
27 } DIR;
29 extern DIR *opendir ANSI((char *));
30 extern struct dirent *readdir ANSI((DIR *));
31 extern long telldir ANSI((DIR *));
32 extern void seekdir ANSI((DIR *, long));
33 extern void closedir ANSI((DIR *));
35 #define rewinddir(dirp) seekdir(dirp,0L)
36 #endif