From: Waldemar Kozaczuk <
jwkoz...@gmail.com>
Committer: Waldemar Kozaczuk <
jwkoz...@gmail.com>
Branch: master
libc: remove unused libc/regex/glob.c
The commit d1ab60ab33c0feb04fe214d466fb526ec6b24d17 replaced
libc/regex/glob.c with the musl equivalent but never deleted
the file. This patch removes the file from OSv source tree.
Signed-off-by: Waldemar Kozaczuk <
jwkoz...@gmail.com>
---
diff --git a/libc/regex/glob.c b/libc/regex/glob.c
--- a/libc/regex/glob.c
+++ b/libc/regex/glob.c
@@ -1,30 +0,0 @@
-#include "libc.h"
-
-static int is_literal(const char *p, int useesc)
-{
- int bracket = 0;
- for (; *p; p++) {
- switch (*p) {
- case '\\':
- if (!useesc) break;
- case '?':
- case '*':
- return 0;
- case '[':
- bracket = 1;
- break;
- case ']':
- if (bracket) return 0;
- break;
- }
- }
- return 1;
-}
-
-/* TODO: Should be up-streamed to musl */
-int __glob_pattern_p(const char *pattern, int quote)
-{
- return !is_literal(pattern, !quote);
-}
-
-weak_alias(__glob_pattern_p, glob_pattern_p);