Recognizes if input is ogg or not.
[xiph.git] / ao / win32 / include / dirent.h
blob44cafa748382a42adafafc477b697e1d83efeab5
1 #ifndef _DIRENT_H
2 # define _DIRENT_H
3 /*
4 * $Id: dirent.h,v 1.1 2001/09/05 19:10:00 cwolf Exp $
5 * $Name: $
6 *
7 * Portions copyright Apache Software Foundation
9 * Structures and types used to implement opendir/readdir/closedir
10 * on Windows 95/NT.
11 */
12 #include <io.h>
13 #include <stdio.h>
14 #include <stdlib.h>
15 #include <sys/types.h>
18 /* struct dirent - same as Unix */
19 struct dirent
21 long d_ino; /* inode (always 1 in WIN32) */
22 off_t d_off; /* offset to this dirent */
23 unsigned short d_reclen; /* length of d_name */
24 char d_name[_MAX_FNAME+1]; /* filename (null terminated) */
25 };
28 /* typedef DIR - not the same as Unix */
29 typedef struct
31 long handle; /* _findfirst/_findnext handle */
32 short offset; /* offset into directory */
33 short finished; /* 1 if there are not more files */
34 struct _finddata_t fileinfo; /* from _findfirst/_findnext */
35 char *dir; /* the dir we are reading */
36 struct dirent dent; /* the dirent to return */
37 } DIR;
40 /* Function prototypes */
41 DIR *opendir(char *);
42 struct dirent *readdir(DIR *);
43 int closedir(DIR *);
46 #define __S_ISTYPE(mode, mask) (((mode) & _S_IFMT) == (mask))
47 #define S_ISREG(mode) __S_ISTYPE((mode), _S_IFREG)
49 #endif /* _DIRENT_H */