File: dirent.h

package info (click to toggle)
lynx-cur 2.8.8dev.5-1
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 14,672 kB
  • ctags: 12,330
  • sloc: ansic: 129,865; sh: 3,763; makefile: 1,003; perl: 909; yacc: 765
file content (56 lines) | stat: -rw-r--r-- 1,540 bytes parent folder | download | duplicates (15)
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
45
46
47
48
49
50
51
52
53
54
55
56
/* 
 * @(#) dirent.h 2.0 17 Jun 91   Public Domain. 
 * 
 *  A public domain implementation of BSD directory routines for 
 *  MS-DOS.  Written by Michael Rendell ({uunet,utai}michael@garfield), 
 *  August 1987 
 * 
 *  Enhanced and ported to OS/2 by Kai Uwe Rommel; added scandir() prototype 
 *  December 1989, February 1990 
 *  Change of MAXPATHLEN for HPFS, October 1990 
 *   
 *  Unenhanced and ported to Windows NT by Bill Gallagher 
 *  17 Jun 91 
 *  changed d_name to char * instead of array, removed non-std extensions 
 *  
 *  Cleanup, other hackery, Summer '92, Brian Moran , brianmo@microsoft.com 
 */ 

#ifndef _DIRENT
#define _DIRENT

#include <direct.h>

struct dirent 
{ 
    ino_t    d_ino;                   /* a bit of a farce */ 
    short    d_reclen;                /* more farce */ 
    short    d_namlen;                /* length of d_name */ 
    char    *d_name;
}; 
 
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 */ 
    struct _dircontents *dd_contents;	/* pointer to contents of dir */ 
    struct _dircontents *dd_cp;		/* pointer to current position */ 
} 
DIR; 
 
extern DIR *opendir(char *); 
extern struct dirent *readdir(DIR *); 
extern void seekdir(DIR *, long); 
extern long telldir(DIR *); 
extern void closedir(DIR *); 
#define rewinddir(dirp) seekdir(dirp, 0L) 

#endif /* _DIRENT */

/* end of dirent.h */