home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 9 Archive / 09-Archive.zip / unzip511.zip / mac / macdir.h < prev    next >
C/C++ Source or Header  |  1993-12-15  |  780b  |  42 lines

  1. /*****************************************************************
  2.  *
  3.  *                dirent.h
  4.  *
  5.  *****************************************************************/
  6.  
  7. #ifndef __DIRENT_H
  8. #define __DIRENT_H
  9.  
  10. #include <errno.h>
  11.  
  12. #ifndef ENOTDIR
  13. #define ENOTDIR     20
  14. #endif
  15.  
  16. #ifndef NAME_MAX
  17. #define NAME_MAX    31
  18. #endif
  19.  
  20. struct dirent {
  21.     unsigned long   d_fileno;
  22.     short           d_reclen;
  23.     short           d_namlen;
  24.     char            d_name[NAME_MAX + 1];
  25. };
  26.  
  27. typedef struct {
  28.     short           ioFDirIndex;
  29.     short           ioVRefNum;
  30.     long            ioDrDirID;
  31.     short           flags;
  32.     struct dirent   currEntry;
  33. } DIR;
  34.  
  35. #define direct dirent
  36.  
  37. DIR *opendir(char *);
  38. struct dirent *readdir(DIR *);
  39. void rewinddir(DIR *);
  40. int closedir(DIR *);
  41. #endif
  42.