File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / php / TSRM / readdir.h
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Tue Feb 21 23:47:52 2012 UTC (12 years, 4 months ago) by misho
Branches: php, MAIN
CVS tags: v5_4_3elwix, v5_4_29p0, v5_4_29, v5_4_20p0, v5_4_20, v5_4_17p0, v5_4_17, v5_3_10, HEAD
php

    1: #ifndef READDIR_H
    2: #define READDIR_H
    3: 
    4: 
    5: /*
    6:  * Structures and types used to implement opendir/readdir/closedir
    7:  * on Windows 95/NT.
    8:  */
    9: 
   10: #include <windows.h>
   11: 
   12: #include <io.h>
   13: #include <stdio.h>
   14: #include <stdlib.h>
   15: #include <sys/types.h>
   16: #include <direct.h>
   17: 
   18: /* struct dirent - same as Unix */
   19: 
   20: 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: };
   26: 
   27: 
   28: /* typedef DIR - not the same as Unix */
   29: typedef struct {
   30: 	HANDLE handle;				/* _findfirst/_findnext handle */
   31: 	short offset;				/* offset into directory */
   32: 	short finished;				/* 1 if there are not more files */
   33: 	WIN32_FIND_DATA fileinfo;	/* from _findfirst/_findnext */
   34: 	char *dir;					/* the dir we are reading */
   35: 	struct dirent dent;			/* the dirent to return */
   36: } DIR;
   37: 
   38: /* Function prototypes */
   39: DIR *opendir(const char *);
   40: struct dirent *readdir(DIR *);
   41: int readdir_r(DIR *, struct dirent *, struct dirent **);
   42: int closedir(DIR *);
   43: int rewinddir(DIR *);
   44: 
   45: #endif /* READDIR_H */

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>