perl 3.0 patch #22 patch #19, continued
[p5sagit/p5-mst-13.2.git] / msdos / dir.h
CommitLineData
b1248f16 1/* $Header: dir.h,v 3.0.1.1 90/03/27 16:07:08 lwall Locked $
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 $
9 * Revision 3.0.1.1 90/03/27 16:07:08 lwall
10 * patch16: MSDOS support
11 *
12 * Revision 1.1 90/03/18 20:32:29 dds
13 * Initial revision
14 *
15 *
16 */
17
18/*
19 * defines the type returned by the directory(3) functions
20 */
21
22#ifndef __DIR_INCLUDED
23#define __DIR_INCLUDED
24
25/*Directory entry size */
26#ifdef DIRSIZ
27#undef DIRSIZ
28#endif
29#define DIRSIZ(rp) (sizeof(struct direct))
30
31/*
32 * Structure of a directory entry
33 */
34struct direct {
35 ino_t d_ino; /* inode number (not used by MS-DOS) */
36 int d_namlen; /* Name length */
37 char d_name[13]; /* file name */
38};
39
40struct _dir_struc { /* Structure used by dir operations */
41 char *start; /* Starting position */
42 char *curr; /* Current position */
43 struct direct dirstr; /* Directory structure to return */
44};
45
46typedef struct _dir_struc DIR; /* Type returned by dir operations */
47
48DIR *cdecl opendir(char *filename);
49struct direct *readdir(DIR *dirp);
50long telldir(DIR *dirp);
51void seekdir(DIR *dirp,long loc);
52void rewinddir(DIR *dirp);
53void closedir(DIR *dirp);
54
55#endif /* __DIR_INCLUDED */