home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
LIBSRC.ZOO
/
libsrc
/
local
/
dirent.h
< prev
next >
Wrap
Text File
|
1992-03-11
|
1KB
|
49 lines
/*
* dirent.h -- header file for use with opendir(), readdir(),
* rewinddir(), and closedir() under OS/2 2.0.
*/
#ifndef __DIRENT_H__
#define __DIRENT_H__
/* XXX temporary hack! */
#ifndef MAXNAMLEN
#define MAXNAMLEN 255
#endif
struct dirent {
unsigned long d_fileno;
unsigned short d_reclen;
unsigned short d_namelen;
char d_name[MAXNAMLEN + 1];
};
/*
* Files that define __DIRENT_PRIVATE__ get the
* full definition of the DIR type and other internal information.
*/
#ifdef __DIRENT_PRIVATE__
typedef struct _DIR {
HDIR dirhandle;
char reset;
struct dirent ent;
char *searchname;
} DIR;
/* archive, directory, system, hidden, readonly, and normal */
#define DIRENT_ALLFILES 0x16
#else /* !__DIRENT_PRIVATE__ */
typedef struct _DIR DIR;
#endif /* __DIRENT_PRIVATE__ */
DIR *opendir(const char *);
struct dirent *readdir(DIR *);
int closedir(DIR *);
void rewinddir(DIR *);
/* DO NOT ADD ANYTHING AFTER THIS #endif! */
#endif /* __DIRENT_H__ */