home *** CD-ROM | disk | FTP | other *** search
/ vsiftp.vmssoftware.com / VSIPUBLIC@vsiftp.vmssoftware.com.tar / FREEWARE / FREEWARE40.ZIP / xpaint-247 / dirent.h < prev    next >
C/C++ Source or Header  |  1994-10-10  |  1KB  |  43 lines

  1. /*    @(#)dirent.h 1.7 89/06/25 SMI     */
  2.  
  3. /*
  4.  * Filesystem-independent directory information.
  5.  */
  6.  
  7. #ifndef    __dirent_h
  8. #define    __dirent_h
  9.  
  10. #include <types.h>
  11.  
  12. #ifndef    _POSIX_SOURCE
  13. #define    d_ino    d_fileno    /* compatability */
  14. #ifndef    NULL
  15. #define    NULL    0
  16. #endif
  17. #endif    /* !_POSIX_SOURCE */
  18.  
  19. /*
  20.  * Definitions for library routines operating on directories.
  21.  */
  22. typedef    struct __dirdesc {
  23.     unsigned long dd_fd;    /* file descriptor */
  24.     long    dd_loc;        /* buf offset of entry from last readddir() */
  25.     long    dd_size;    /* amount of valid data in buffer */
  26.     long    dd_bsize;    /* amount of entries read at a time */
  27.     long    dd_off;        /* Current offset in dir (for telldir) */
  28.     char    *dd_buf;    /* directory data buffer */
  29. } DIR;
  30.  
  31. extern    DIR *opendir(/* char *dirname */);
  32. extern    struct dirent *readdir(/* DIR *dirp */);
  33. extern    void closedir(/* DIR *dirp */);
  34. #ifndef    _POSIX_SOURCE
  35. extern    void seekdir(/* DIR *dirp, int loc */);
  36. extern    long telldir(/* DIR *dirp */);
  37. #endif    /* POSIX_SOURCE */
  38. extern    void rewinddir(/* DIR *dirp */);
  39.  
  40. #include "sys_dirent.h"
  41.  
  42. #endif    /* !__dirent_h */
  43.