summaryrefslogtreecommitdiff
path: root/sys/include/ape/dirent.h
diff options
context:
space:
mode:
authorTaru Karttunen <taruti@taruti.net>2011-03-30 16:47:56 +0300
committerTaru Karttunen <taruti@taruti.net>2011-03-30 16:47:56 +0300
commitc558a99e0be506a9abdf677f0ca4490644e05fc1 (patch)
tree17aef678ad05a32ef96ce8385703cb3fe089a5c7 /sys/include/ape/dirent.h
parente5888a1ffdae813d7575f5fb02275c6bb07e5199 (diff)
Import sources from 2011-03-30 iso image - sys/include
Diffstat (limited to 'sys/include/ape/dirent.h')
-rwxr-xr-xsys/include/ape/dirent.h40
1 files changed, 40 insertions, 0 deletions
diff --git a/sys/include/ape/dirent.h b/sys/include/ape/dirent.h
new file mode 100755
index 000000000..388860067
--- /dev/null
+++ b/sys/include/ape/dirent.h
@@ -0,0 +1,40 @@
+#ifndef __DIRENT_H
+#define __DIRENT_H
+#pragma lib "/$M/lib/ape/libap.a"
+/*
+ * this must be a power of 2 and a multiple of all the ones in the system
+ */
+#define MAXNAMLEN 255
+
+struct dirent {
+ char d_name[MAXNAMLEN + 1];
+};
+
+typedef struct _dirdesc {
+ int dd_fd; /* file descriptor */
+ long dd_loc; /* buf offset of entry from last readdir() */
+ long dd_size; /* amount of valid data in buffer */
+ char *dd_buf; /* directory data buffer */
+ void *dirs;
+ int dirsize;
+ int dirloc;
+} DIR;
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * functions defined on directories
+ */
+DIR *opendir(const char *);
+struct dirent *readdir(DIR *);
+void rewinddir(DIR *);
+int closedir(DIR *);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif