1 /* $Id$ 2 3 Part of SWI-Prolog 4 5 Author: Jan Wielemaker 6 E-mail: jan@swi.psy.uva.nl 7 WWW: http://www.swi-prolog.org 8 Copyright (C): 1985-2002, University of Amsterdam 9 10 This library is free software; you can redistribute it and/or 11 modify it under the terms of the GNU Lesser General Public 12 License as published by the Free Software Foundation; either 13 version 2.1 of the License, or (at your option) any later version. 14 15 This library is distributed in the hope that it will be useful, 16 but WITHOUT ANY WARRANTY; without even the implied warranty of 17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 18 Lesser General Public License for more details. 19 20 You should have received a copy of the GNU Lesser General Public 21 License along with this library; if not, write to the Free Software 22 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 23 */ 24 25 #ifndef _DIRENT_H_INCLUDED 26 #define _DIRENT_H_INCLUDED 27 28 #include <io.h> 29 30 #undef _export 31 #if defined(_UXNT_KERNEL) && !defined(__LCC__) 32 #define _export __declspec(dllexport) 33 #else 34 #define _export extern 35 #endif 36 37 #define DIRENT_MAX 512 38 39 typedef struct dirent 40 { void * data; /* actually WIN32_FIND_DATA * */ 41 int first; 42 void * handle; /* actually HANDLE */ 43 /* dirent */ 44 char d_name[DIRENT_MAX+1]; 45 } DIR; 46 47 _export DIR * opendir(const char *path); 48 _export int closedir(DIR *dp); 49 _export struct dirent * readdir(DIR *dp); 50 51 #endif /*_DIRENT_H_INCLUDED*/ 52