aboutsummaryrefslogtreecommitdiff
path: root/examples/dte/search.h
diff options
context:
space:
mode:
authorMitja Felicijan <mitja.felicijan@gmail.com>2026-01-21 22:52:54 +0100
committerMitja Felicijan <mitja.felicijan@gmail.com>2026-01-21 22:52:54 +0100
commitdcacc00e3750300617ba6e16eb346713f91a783a (patch)
tree38e2d4fb5ed9d119711d4295c6eda4b014af73fd /examples/dte/search.h
parent58dac10aeb8f5a041c46bddbeaf4c7966a99b998 (diff)
downloadcrep-dcacc00e3750300617ba6e16eb346713f91a783a.tar.gz
Remove testing data
Diffstat (limited to 'examples/dte/search.h')
-rw-r--r--examples/dte/search.h34
1 files changed, 0 insertions, 34 deletions
diff --git a/examples/dte/search.h b/examples/dte/search.h
deleted file mode 100644
index 94d3a57..0000000
--- a/examples/dte/search.h
+++ /dev/null
@@ -1,34 +0,0 @@
1#ifndef SEARCH_H
2#define SEARCH_H
3
4#include <regex.h>
5#include <stdbool.h>
6#include "util/macros.h"
7#include "view.h"
8
9typedef enum {
10 CSS_FALSE,
11 CSS_TRUE,
12 CSS_AUTO,
13} SearchCaseSensitivity;
14
15typedef struct {
16 regex_t regex;
17 char *pattern;
18 int re_flags; // If zero, regex hasn't been compiled
19 bool reverse;
20} SearchState;
21
22static inline void toggle_search_direction(SearchState *search)
23{
24 search->reverse ^= 1;
25}
26
27bool search_tag(View *view, const char *pattern) NONNULL_ARGS WARN_UNUSED_RESULT;
28void search_set_regexp(SearchState *search, const char *pattern) NONNULL_ARGS;
29void search_free_regexp(SearchState *search) NONNULL_ARGS;
30bool search_prev(View *view, SearchState *search, SearchCaseSensitivity cs) NONNULL_ARGS WARN_UNUSED_RESULT;
31bool search_next(View *view, SearchState *search, SearchCaseSensitivity cs) NONNULL_ARGS WARN_UNUSED_RESULT;
32bool search_next_word(View *view, SearchState *search, SearchCaseSensitivity cs) NONNULL_ARGS WARN_UNUSED_RESULT;
33
34#endif