summaryrefslogtreecommitdiffstats
path: root/gnu/usr.bin/tar/msd_dir.h
blob: 06c7a644b42db9f5e32b943c537d87a7c2fd76a2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/*
 * @(#)msd_dir.h 1.4 87/11/06	Public Domain.
 *
 *  A public domain implementation of BSD directory routines for
 *  MS-DOS.  Written by Michael Rendell ({uunet,utai}michael@garfield),
 *  August 1897
 */

#define	rewinddir(dirp)	seekdir(dirp, 0L)

#define	MAXNAMLEN	12

#ifdef __TURBOC__
typedef int ino_t;
typedef int dev_t;
#endif

struct dirent
  {
    ino_t d_ino;		/* a bit of a farce */
    int d_reclen;		/* more farce */
    int d_namlen;		/* length of d_name */
    char d_name[MAXNAMLEN + 1];	/* garentee null termination */
  };

struct _dircontents
  {
    char *_d_entry;
    struct _dircontents *_d_next;
  };

typedef struct _dirdesc
  {
    int dd_id;			/* uniquely identify each open directory */
    long dd_loc;		/* where we are in directory entry is this */
    struct _dircontents *dd_contents;	/* pointer to contents of dir */
    struct _dircontents *dd_cp;	/* pointer to current position */
  } DIR;

extern DIR *opendir ();
extern struct dirent *readdir ();
extern void seekdir ();
extern long telldir ();
extern void closedir ();
OpenPOWER on IntegriCloud