home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c063 / 1.ddi / INCLUDE.ZIP / DIRENT.H < prev    next >
Encoding:
C/C++ Source or Header  |  1992-02-18  |  1.2 KB  |  56 lines

  1. /*  dirent.h
  2.  
  3.     Definitions for POSIX directory operations.
  4.  
  5.     Copyright (c) 1991 by Borland International
  6.     All Rights Reserved.
  7. */
  8.  
  9. #ifndef __DIRENT_H
  10. #define __DIRENT_H
  11.  
  12. #if !defined( __DEFS_H )
  13. #include <_defs.h>
  14. #endif
  15.  
  16. #ifndef NULL
  17. #include <_null.h>
  18. #endif
  19.  
  20. /* dirent structure returned by readdir().
  21.  */
  22. struct dirent
  23. {
  24.     char        d_name[13];
  25. };
  26.  
  27. /* DIR type returned by opendir().  The first two members cannot
  28.  * be separated, because they make up the DOS DTA structure used
  29.  * by findfirst() and findnext().
  30.  */
  31. typedef struct
  32. {
  33.     char          _d_reserved[30];      /* reserved part of DTA */
  34.     struct dirent _d_dirent;            /* filename part of DTA */
  35.     char         *_d_dirname;           /* directory name */
  36.     char          _d_first;             /* first file flag */
  37.     unsigned char _d_magic;             /* magic cookie for verifying handle */
  38. } DIR;
  39.  
  40. /* Prototypes.
  41.  */
  42. #ifdef __cplusplus
  43. extern "C" {
  44. #endif
  45.  
  46. DIR           * _Cdecl opendir(char *__dirname);
  47. struct dirent * _Cdecl readdir(DIR *__dir);
  48. int             _Cdecl closedir(DIR *__dir);
  49. void            _Cdecl rewinddir(DIR *__dir);
  50.  
  51. #ifdef __cplusplus
  52. }
  53. #endif
  54.  
  55. #endif /* __DIRENT_H */
  56.