home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-387-Vol-3of3.iso / g / gtak212.zip / 1.10 / msd_dir.h < prev    next >
C/C++ Source or Header  |  1992-09-02  |  2KB  |  62 lines

  1. /*****************************************************************************
  2.  * $Id: msd_dir.h,v 1.2 1992/09/02 20:08:24 ak Exp $
  3.  *****************************************************************************
  4.  * $Log: msd_dir.h,v $
  5.  * Revision 1.2  1992/09/02  20:08:24  ak
  6.  * Version AK200
  7.  * - Tape access
  8.  * - Quick file access
  9.  * - OS/2 extended attributes
  10.  * - Some OS/2 fixes
  11.  * - Some fixes of Kai Uwe Rommel
  12.  *
  13.  * Revision 1.1.1.1  1992/09/02  19:22:05  ak
  14.  * Original GNU Tar 1.10 with some filenames changed for FAT compatibility.
  15.  *
  16.  * Revision 1.1  1992/09/02  19:22:03  ak
  17.  * Initial revision
  18.  *
  19.  *****************************************************************************/
  20.  
  21. /*
  22.  * @(#)msd_dir.h 1.4 87/11/06    Public Domain.
  23.  *
  24.  *  A public domain implementation of BSD directory routines for
  25.  *  MS-DOS.  Written by Michael Rendell ({uunet,utai}michael@garfield),
  26.  *  August 1897
  27.  */
  28.  
  29. #define    rewinddir(dirp)    seekdir(dirp, 0L)
  30.  
  31. #define    MAXNAMLEN    12
  32.  
  33. #ifdef __TURBOC__
  34. typedef int ino_t;
  35. typedef int dev_t;
  36. #endif
  37.  
  38. struct direct {
  39.     ino_t    d_ino;            /* a bit of a farce */
  40.     int    d_reclen;        /* more farce */
  41.     int    d_namlen;        /* length of d_name */
  42.     char    d_name[MAXNAMLEN + 1];        /* garentee null termination */
  43. };
  44.  
  45. struct _dircontents {
  46.     char    *_d_entry;
  47.     struct _dircontents    *_d_next;
  48. };
  49.  
  50. typedef struct _dirdesc {
  51.     int        dd_id;    /* uniquely identify each open directory */
  52.     long        dd_loc;    /* where we are in directory entry is this */
  53.     struct _dircontents    *dd_contents;    /* pointer to contents of dir */
  54.     struct _dircontents    *dd_cp;    /* pointer to current position */
  55. } DIR;
  56.  
  57. extern    DIR        *opendir();
  58. extern    struct direct    *readdir();
  59. extern    void        seekdir();
  60. extern    long        telldir();
  61. extern    void        closedir();
  62.