2 TiMidity++ -- MIDI to WAVE converter and player
3 Copyright (C) 1999-2002 Masanao Izumo <mo@goice.co.jp>
4 Copyright (C) 1995 Tuukka Toivonen <tt@cgs.fi>
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 Structures and types used to implement opendir/readdir/closedir
32 #include <sys/types.h>
37 #endif /* __BORLANDC__ */
41 #define _MAX_FNAME 256
42 #endif /* __POCC___ */
45 #define _MAX_FNAME 256
46 #endif /* _MAX_FNAME */
55 char name[_MAX_FNAME];
57 #endif /* __CYGWIN__ */
60 #define API_EXPORT(type) __declspec(dllexport) type __stdcall
62 #define API_EXPORT(type) type
65 /* struct dirent - same as Unix */
67 long d_ino; /* inode (always 1 in WIN32) */
68 off_t d_off; /* offset to this dirent */
69 unsigned short d_reclen; /* length of d_name */
70 char d_name[_MAX_FNAME+1]; /* filename (null terminated) */
73 /* typedef DIR - not the same as Unix */
75 ptr_size_t handle; /* _findfirst/_findnext handle */
76 short offset; /* offset into directory */
77 short finished; /* 1 if there are not more files */
79 struct ffblk fileinfo;/* from _findfirst/_findnext */
81 struct _finddata_t fileinfo;/* from _findfirst/_findnext */
82 #endif /* __BORLANDC__ */
84 char *dir; /* the dir we are reading */
85 struct dirent dent; /* the dirent to return */
88 /* Function prototypes */
89 extern API_EXPORT(DIR *) opendir(const char *);
90 extern API_EXPORT(struct dirent *) readdir(DIR *);
91 extern API_EXPORT(int) closedir(DIR *);
94 #define _findfirst(x,y) findfirst((x),(y),0)
95 #define _findnext(x,y) findnext((y))
96 #endif /* __BORLANDC__ */
98 #endif /* ___READDIR_H_ */