Commit | Line | Data |
fe14fcc3 |
1 | /* $Header: dir.h,v 4.0 91/03/20 01:34:20 lwall Locked $ |
b1248f16 |
2 | * |
3 | * (C) Copyright 1987, 1990 Diomidis Spinellis. |
4 | * |
5 | * You may distribute under the terms of the GNU General Public License |
6 | * as specified in the README file that comes with the perl 3.0 kit. |
7 | * |
8 | * $Log: dir.h,v $ |
fe14fcc3 |
9 | * Revision 4.0 91/03/20 01:34:20 lwall |
10 | * 4.0 baseline. |
11 | * |
b1248f16 |
12 | * Revision 3.0.1.1 90/03/27 16:07:08 lwall |
13 | * patch16: MSDOS support |
14 | * |
15 | * Revision 1.1 90/03/18 20:32:29 dds |
16 | * Initial revision |
17 | * |
18 | * |
19 | */ |
20 | |
21 | /* |
22 | * defines the type returned by the directory(3) functions |
23 | */ |
24 | |
25 | #ifndef __DIR_INCLUDED |
26 | #define __DIR_INCLUDED |
27 | |
28 | /*Directory entry size */ |
29 | #ifdef DIRSIZ |
30 | #undef DIRSIZ |
31 | #endif |
32 | #define DIRSIZ(rp) (sizeof(struct direct)) |
33 | |
34 | /* |
35 | * Structure of a directory entry |
36 | */ |
37 | struct direct { |
38 | ino_t d_ino; /* inode number (not used by MS-DOS) */ |
39 | int d_namlen; /* Name length */ |
40 | char d_name[13]; /* file name */ |
41 | }; |
42 | |
43 | struct _dir_struc { /* Structure used by dir operations */ |
44 | char *start; /* Starting position */ |
45 | char *curr; /* Current position */ |
46 | struct direct dirstr; /* Directory structure to return */ |
47 | }; |
48 | |
49 | typedef struct _dir_struc DIR; /* Type returned by dir operations */ |
50 | |
51 | DIR *cdecl opendir(char *filename); |
52 | struct direct *readdir(DIR *dirp); |
53 | long telldir(DIR *dirp); |
54 | void seekdir(DIR *dirp,long loc); |
55 | void rewinddir(DIR *dirp); |
56 | void closedir(DIR *dirp); |
57 | |
58 | #endif /* __DIR_INCLUDED */ |