summaryrefslogtreecommitdiff
path: root/include/glob.h
diff options
context:
space:
mode:
authorKacper <kacper@mail.openlinux.dev>2025-12-07 20:10:31 +0100
committerKacper <kacper@mail.openlinux.dev>2025-12-07 20:10:31 +0100
commitfc00c656c96528112d05cf0edf8631bd5eaea446 (patch)
treea6e0e6c588191a8bd1c64afc3b7a258e3e66c236 /include/glob.h
Add build system scaffolding and libc headers
Diffstat (limited to 'include/glob.h')
-rw-r--r--include/glob.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/include/glob.h b/include/glob.h
new file mode 100644
index 00000000..9cbf80ac
--- /dev/null
+++ b/include/glob.h
@@ -0,0 +1,28 @@
+#ifndef __GLOB_H
+#define __GLOB_H
+
+#define GLOB_APPEND 0x0001
+#define GLOB_DOOFFS 0x0002
+#define GLOB_ERR 0x0004
+#define GLOB_MARK 0x0008
+#define GLOB_NOCHECK 0x0010
+#define GLOB_NOESCAPE 0x0020
+#define GLOB_NOSORT 0x0040
+
+#define GLOB_ABORTED -1
+#define GLOB_NOMATCH -2
+#define GLOB_NOSPACE -3
+
+typedef __SIZE_TYPE__ size_t;
+
+typedef struct {
+ size_t gl_pathc;
+ char **gl_pathv;
+ size_t gl_offs;
+} glob_t;
+
+int glob(const char *restrict, int, int (*)(const char *, int),
+ glob_t *restrict);
+void globfree(glob_t *);
+
+#endif