aboutsummaryrefslogtreecommitdiffstats
path: root/util/alevt/search.h
diff options
context:
space:
mode:
Diffstat (limited to 'util/alevt/search.h')
-rw-r--r--util/alevt/search.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/util/alevt/search.h b/util/alevt/search.h
new file mode 100644
index 0000000..c7e813a
--- /dev/null
+++ b/util/alevt/search.h
@@ -0,0 +1,16 @@
+#ifndef SEARCH_H
+#define SEARCH_H
+
+#include <regex.h>
+
+struct search
+{
+ struct cache *cache;
+ regex_t pattern[1];
+ int x, y, len; // the position of the match
+};
+
+struct search *search_start(struct cache *ca, u8 *pattern);
+void search_end(struct search *s);
+int search_next(struct search *s, int *pgno, int *subno, int dir);
+#endif