summaryrefslogtreecommitdiff
path: root/lib/uwildmat/uwildmat.h
diff options
context:
space:
mode:
authorDerek Morton <derek.j.morton@intel.com>2016-02-04 12:06:57 +0000
committerDaniel Vetter <daniel.vetter@ffwll.ch>2016-02-17 18:21:12 +0100
commitef724ab2bba7a51113542c0bc9e77d34e8935c60 (patch)
tree5ce7c5095e9a4679e0966f2c71beef18e03efc9c /lib/uwildmat/uwildmat.h
parent0a45d6ba1371bb879f55d9f75d893552c2f71c97 (diff)
lib/igt_core.c: Expand --run-subtest functionality.
Added extended wildcard support when specifying --run-subtest. Wildcard format is as specified in rfc3977 and the uwildmat() implementation is taken from libinn. See https://tools.ietf.org/html/rfc3977#section-4 for a description of allowed wildcard expressions. v2: Use comma as list separator (Ville Syrjala) support both ^ and ! as not operators (Dave Gordon) v3: Updated to use uwildmat() (Dave Gordon) Signed-off-by: Derek Morton <derek.j.morton@intel.com> [danvet: Fixup whitespace. Add #include <stdint.h>. Run lint.] Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'lib/uwildmat/uwildmat.h')
-rw-r--r--lib/uwildmat/uwildmat.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/lib/uwildmat/uwildmat.h b/lib/uwildmat/uwildmat.h
new file mode 100644
index 00000000..2e471891
--- /dev/null
+++ b/lib/uwildmat/uwildmat.h
@@ -0,0 +1,24 @@
+
+#ifndef UWILDMAT_H
+#define UWILDMAT_H 1
+
+#include <stdio.h>
+#include <sys/types.h>
+#include <stdbool.h>
+
+/*
+** WILDMAT MATCHING
+*/
+enum uwildmat {
+ UWILDMAT_FAIL = 0,
+ UWILDMAT_MATCH = 1,
+ UWILDMAT_POISON
+};
+
+extern bool is_valid_utf8(const char *start);
+extern bool uwildmat(const char *text, const char *pat);
+extern bool uwildmat_simple(const char *text, const char *pat);
+extern enum uwildmat uwildmat_poison(const char *text, const char *pat);
+
+
+#endif /* UWILDMAT_H */