home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 9 Archive / 09-Archive.zip / lha100bt.zip / lha-1.00 / src / dir.h < prev    next >
C/C++ Source or Header  |  1994-08-31  |  2KB  |  76 lines

  1.  
  2.  
  3. /* sys/dir.h (emx+gcc) */
  4.  
  5. #if !defined (_SYS_DIR_H)
  6. #define _SYS_DIR_H
  7.  
  8. #if defined (__cplusplus)
  9. extern "C" {
  10. #endif
  11.  
  12. #if !defined (MAXNAMLEN)
  13. #define MAXNAMLEN  260
  14. #endif
  15.  
  16. #if !defined (MAXPATHLEN)
  17. #define MAXPATHLEN 260
  18. #endif
  19.  
  20. #if !defined (A_RONLY)
  21. #define A_RONLY   0x01
  22. #define A_HIDDEN  0x02
  23. #define A_SYSTEM  0x04
  24. #define A_LABEL   0x08
  25. #define A_DIR     0x10
  26. #define A_ARCHIVE 0x20
  27. #endif
  28.  
  29. struct direct
  30. {
  31.   ino_t          d_ino;                 /* Almost not used           */
  32.   int            d_reclen;              /* Almost not used           */
  33.   int            d_namlen;              /* Length of d_name          */
  34.   char           d_name[MAXNAMLEN + 1]; /* File name, 0 terminated   */
  35.   long           d_size;                /* File size (bytes)         */
  36.   unsigned short d_mode;                /* OS file attributes        */
  37.   unsigned short d_time;                /* OS file modification time */
  38.   unsigned short d_date;                /* OS file modification date */
  39. };
  40.  
  41. struct _dircontents
  42. {
  43.   char *                _d_entry;
  44.   long                  _d_size;
  45.   unsigned short        _d_mode;
  46.   unsigned short        _d_time;
  47.   unsigned short        _d_date;
  48.   struct _dircontents * _d_next;
  49. };
  50.  
  51. struct _dirdesc
  52. {
  53.   int                   dd_id;
  54.   long                  dd_loc;
  55.   struct _dircontents * dd_contents;
  56.   struct _dircontents * dd_cp;
  57. };
  58.  
  59. /* typedef struct _dirdesc DIR;
  60.  
  61.  DIR *opendir (__const__ char *name);
  62.  struct direct *readdir (DIR *dirp);
  63.   int closedir (DIR *dirp);
  64.  
  65. void seekdir (DIR *dirp, long off);
  66. long telldir (DIR *dirp);
  67. void rewinddir (DIR *dirp);
  68.  */
  69.  
  70.  
  71. #if defined (__cplusplus)
  72. }
  73. #endif
  74.  
  75. #endif /* !defined (SYS_DIR_H) */
  76.