source: vendor/emx/current/include/sys/dir.h

Last change on this file was 18, checked in by bird, 23 years ago

Initial revision

  • Property cvs2svn:cvs-rev set to 1.1
  • Property svn:eol-style set to native
  • Property svn:executable set to *
File size: 1.8 KB
Line 
1/* sys/dir.h (emx+gcc) */
2
3#ifndef _SYS_DIR_H
4#define _SYS_DIR_H
5
6#if !defined (_SYS_TYPES_H)
7#warning <sys/dir.h> requires <sys/types.h>
8#include <sys/types.h>
9#endif
10
11#if defined (__cplusplus)
12extern "C" {
13#endif
14
15#if !defined (MAXNAMLEN)
16#define MAXNAMLEN 260
17#endif
18
19#if !defined (MAXPATHLEN)
20#define MAXPATHLEN 260
21#endif
22
23#if !defined (A_RONLY)
24#define A_RONLY 0x01
25#define A_HIDDEN 0x02
26#define A_SYSTEM 0x04
27#define A_LABEL 0x08
28#define A_DIR 0x10
29#define A_ARCHIVE 0x20
30#endif
31
32#define _DIRECT_D_MODE_RENAMED_D_ATTR
33
34struct direct
35{
36 ino_t d_ino; /* Almost not used */
37 int d_reclen; /* Almost not used */
38 int d_namlen; /* Length of d_name */
39 char d_name[MAXNAMLEN + 1]; /* File name, 0 terminated */
40 long d_size; /* File size (bytes) */
41 unsigned short d_attr; /* OS file attributes */
42 unsigned short d_time; /* OS file modification time */
43 unsigned short d_date; /* OS file modification date */
44};
45
46struct _dircontents
47{
48 char * _d_entry;
49 long _d_size;
50 unsigned short _d_attr;
51 unsigned short _d_time;
52 unsigned short _d_date;
53 struct _dircontents * _d_next;
54};
55
56struct _dirdesc
57{
58 int dd_id;
59 long dd_loc;
60 struct _dircontents * dd_contents;
61 struct _dircontents * dd_cp;
62};
63
64typedef struct _dirdesc DIR;
65
66DIR *opendir (__const__ char *name);
67struct direct *readdir (DIR *dirp);
68void seekdir (DIR *dirp, long off);
69long telldir (DIR *dirp);
70int closedir (DIR *dirp);
71void rewinddir (DIR *dirp);
72
73#if defined (__cplusplus)
74}
75#endif
76
77#endif /* not SYS_DIR_H */
Note: See TracBrowser for help on using the repository browser.