1da2e3ebdSchin /*********************************************************************** 2da2e3ebdSchin * * 3da2e3ebdSchin * This software is part of the ast package * 4*b30d1939SAndy Fiddaman * Copyright (c) 1985-2011 AT&T Intellectual Property * 5da2e3ebdSchin * and is licensed under the * 6*b30d1939SAndy Fiddaman * Eclipse Public License, Version 1.0 * 77c2fbfb3SApril Chin * by AT&T Intellectual Property * 8da2e3ebdSchin * * 9da2e3ebdSchin * A copy of the License is available at * 10*b30d1939SAndy Fiddaman * http://www.eclipse.org/org/documents/epl-v10.html * 11*b30d1939SAndy Fiddaman * (with md5 checksum b35adb5213ca9657e911e9befb180842) * 12da2e3ebdSchin * * 13da2e3ebdSchin * Information and Software Systems Research * 14da2e3ebdSchin * AT&T Research * 15da2e3ebdSchin * Florham Park NJ * 16da2e3ebdSchin * * 17da2e3ebdSchin * Glenn Fowler <gsf@research.att.com> * 18da2e3ebdSchin * David Korn <dgk@research.att.com> * 19da2e3ebdSchin * Phong Vo <kpv@research.att.com> * 20da2e3ebdSchin * * 21da2e3ebdSchin ***********************************************************************/ 22da2e3ebdSchin #pragma prototyped 23da2e3ebdSchin /* 24da2e3ebdSchin * AT&T Bell Laboratories 25da2e3ebdSchin * 26*b30d1939SAndy Fiddaman * <dirent.h> for systems with no opendir() 27da2e3ebdSchin */ 28da2e3ebdSchin 29*b30d1939SAndy Fiddaman #ifndef _DIRENT_H 30*b30d1939SAndy Fiddaman #define _DIRENT_H 31da2e3ebdSchin 32*b30d1939SAndy Fiddaman typedef struct 33*b30d1939SAndy Fiddaman { 34*b30d1939SAndy Fiddaman int dd_fd; /* file descriptor */ 35*b30d1939SAndy Fiddaman #ifdef _DIR_PRIVATE_ 36*b30d1939SAndy Fiddaman _DIR_PRIVATE_ 37da2e3ebdSchin #endif 38*b30d1939SAndy Fiddaman } DIR; 39da2e3ebdSchin 40*b30d1939SAndy Fiddaman struct dirent 41*b30d1939SAndy Fiddaman { 42*b30d1939SAndy Fiddaman long d_fileno; /* entry serial number */ 43*b30d1939SAndy Fiddaman int d_reclen; /* entry length */ 44*b30d1939SAndy Fiddaman int d_namlen; /* entry name length */ 45*b30d1939SAndy Fiddaman char d_name[1]; /* entry name */ 46*b30d1939SAndy Fiddaman }; 47da2e3ebdSchin 48*b30d1939SAndy Fiddaman #ifndef _BLD_3d 49da2e3ebdSchin 50*b30d1939SAndy Fiddaman #ifdef rewinddir 51*b30d1939SAndy Fiddaman #undef rewinddir 52*b30d1939SAndy Fiddaman #define rewinddir(p) seekdir(p,0L) 53da2e3ebdSchin #endif 54da2e3ebdSchin 55*b30d1939SAndy Fiddaman extern DIR* opendir(const char*); 56*b30d1939SAndy Fiddaman extern void closedir(DIR*); 57*b30d1939SAndy Fiddaman extern struct dirent* readdir(DIR*); 58*b30d1939SAndy Fiddaman extern void seekdir(DIR*, long); 59*b30d1939SAndy Fiddaman extern long telldir(DIR*); 60da2e3ebdSchin 61*b30d1939SAndy Fiddaman #endif 62da2e3ebdSchin 63da2e3ebdSchin #endif 64