home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / snip9707.zip / DIRENT.H < prev    next >
C/C++ Source or Header  |  1997-07-05  |  1KB  |  57 lines

  1. /* +++Date last modified: 05-Jul-1997 */
  2.  
  3. /*
  4. **  DIRENT.H - Posix compliant header
  5. **
  6. **  Original Copyright 1988-1991 by Bob Stout as part of
  7. **  the MicroFirm Function Library (MFL)
  8. **
  9. **  The user is granted a free limited license to use this source file
  10. **  to create royalty-free programs, subject to the terms of the
  11. **  license restrictions specified in the LICENSE.MFL file.
  12. */
  13.  
  14. #ifndef DIRENT_H
  15. #define DIRENT_H
  16.  
  17. #include <stdio.h>                        /* For FILENAME_MAX     */
  18. #include <dos.h>
  19. #include "sniptype.h"
  20. #include "dirport.h"
  21.  
  22. #undef DIR
  23. #define DIR DIR_
  24.  
  25. /*
  26. **  Posix directory structure
  27. */
  28.  
  29. typedef struct {
  30.       int               dd_fd;
  31.       unsigned          dd_loc,
  32.                         dd_size;
  33.       DOSFileData       dd_buf;
  34.       char              dd_dirname[FILENAME_MAX];
  35. } DIR;
  36.  
  37. DIR            *opendir(char *);
  38. int             closedir(DIR *),
  39.                 rewinddir(DIR *);
  40. struct dirent  *readdir(DIR *),
  41.                *seekdir(DIR *, int, int);
  42. #define         telldir(dd) dd->loc
  43.  
  44. /*
  45. **  Other useful functions from DIRMASK.C and XSTRCMP.C
  46. */
  47.  
  48. int       dirmask(DOSFileData *, char *, char *, unsigned, unsigned);
  49. Boolean_T xstrcmp (const char *, const char *);
  50. Boolean_T xstricmp (const char *, const char *);
  51.  
  52. extern int DFerr;
  53.  
  54. extern DIR _DIRS[];
  55.  
  56. #endif /* DIRENT_H */
  57.