summaryrefslogtreecommitdiff
path: root/newlib/libc/sys/go32/dir.h
diff options
context:
space:
mode:
authorPikalaxALT <pikalaxalt@gmail.com>2017-12-15 09:38:53 -0500
committerPikalaxALT <pikalaxalt@gmail.com>2017-12-15 09:39:34 -0500
commitf95a4a932476be2ba99e2fd081e8d2bc6ea12813 (patch)
tree75f67192cb2d7b7b575c94edda318e475239b63c /newlib/libc/sys/go32/dir.h
parentf60aca96985e68c7d8a52eb7bc955fb80e132f73 (diff)
Import newlib and create makefile
Diffstat (limited to 'newlib/libc/sys/go32/dir.h')
-rw-r--r--newlib/libc/sys/go32/dir.h53
1 files changed, 53 insertions, 0 deletions
diff --git a/newlib/libc/sys/go32/dir.h b/newlib/libc/sys/go32/dir.h
new file mode 100644
index 0000000..b53695d
--- /dev/null
+++ b/newlib/libc/sys/go32/dir.h
@@ -0,0 +1,53 @@
+#ifndef _DIR_H_
+#define _DIR_H_
+
+struct ffblk {
+ char ff_reserved[21];
+ char ff_attrib;
+ short ff_ftime;
+ short ff_fdate;
+ short ff_filler;
+ long ff_fsize;
+ char ff_name[16];
+};
+
+#define FA_RDONLY 1
+#define FA_HIDDEN 2
+#define FA_SYSTEM 4
+#define FA_LABEL 8
+#define FA_DIREC 16
+#define FA_ARCH 32
+
+/* for fnmerge/fnsplit */
+#define MAXPATH 80
+#define MAXDRIVE 3
+#define MAXDIR 66
+#define MAXFILE 9
+#define MAXEXT 5
+
+#define WILDCARDS 0x01
+#define EXTENSION 0x02
+#define FILENAME 0x04
+#define DIRECTORY 0x08
+#define DRIVE 0x10
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+int findfirst(const char *pathname, struct ffblk *ffblk, int attrib);
+int findnext(struct ffblk *ffblk);
+
+void fnmerge (char *path, const char *drive, const char *dir,
+ const char *name, const char *ext);
+int fnsplit (const char *path, char *drive, char *dir,
+ char *name, char *ext);
+
+int getdisk(void);
+int setdisk(int drive);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif