From: Waldemar Kozaczuk <[email protected]>
Committer: Waldemar Kozaczuk <[email protected]>
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 <[email protected]>

---
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);

-- 
You received this message because you are subscribed to the Google Groups "OSv 
Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/osv-dev/0000000000001a1f8a05abaab504%40google.com.

Reply via email to