home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 5 Edit / 05-Edit.zip / cvt304.zip / DIRENT.H < prev    next >
C/C++ Source or Header  |  1995-12-17  |  2KB  |  63 lines

  1.  
  2. /*
  3.  *              Author:     Bob Withers     E-Mail: bwit@mo.net
  4.  *              Copyright (c) 1993, All Rights Reserved
  5.  *
  6.  *                              NOTICE
  7.  *
  8.  * Permission to use, copy, modify, and distribute this software and
  9.  * its documentation for any purpose and without fee is hereby granted
  10.  * provided that the above copyright notice appears in all copies and
  11.  * that both the copyright notice and this permission notice appear in
  12.  * supporting documentation.
  13.  *
  14.  * The author makes no representations about the suitability of this
  15.  * software for any purpose.  This software is provided ``as is''
  16.  * without express or implied warranty.
  17.  *
  18.  *      Define      Operating System        Compiler Tested
  19.  *      -------     ----------------        ---------------
  20.  *      MSDOS_16    DOS                     Microsoft VC++ V1.51
  21.  *      NT_32       Win NT                  Microsoft VC++ V2.1
  22.  *      OS2_16      OS/2 V1+                Microsoft C V6.00
  23.  *      OS2_32      OS/2 V2+                IBM C Set++ V2.1
  24.  *      BORLAND     OS/2                    Borland C++ for OS/2 V1.0
  25.  *      BORLAND     DOS, Win NT             Borland C++ V4.5
  26.  */
  27.  
  28. #ifndef DIRENT_H
  29. #define DIRENT_H
  30.  
  31. /*  Unix style directory(3C) support for DOS, OS/2, and Win NT          */
  32.  
  33.  
  34. struct dirent
  35. {
  36.     long            d_ino;      /* not used in this implementation      */
  37.     long            d_off;      /* not used in this implementation      */
  38.     int             d_isdir;    /* non-standard, 0 = file, 1 = dir      */
  39.     unsigned short  d_reclen;
  40.     char            d_name[1];
  41. };
  42.  
  43.  
  44. struct S_Dir
  45. {
  46.     char           *dirname;
  47.     int             max_ent;
  48.     int             tot_ent;
  49.     int             cur_ent;
  50.     struct dirent **entp;
  51. };
  52. typedef struct S_Dir            DIR;
  53.  
  54.  
  55. DIR *               opendir(char *filename);
  56. struct dirent *     readdir(DIR *dirp);
  57. long                telldir(DIR *dirp);
  58. void                seekdir(DIR *dirp, long loc);
  59. void                rewinddir(DIR *dirp);
  60. void                closedir(DIR *dirp);
  61.  
  62. #endif      /* DIRENT_H */
  63.