diff options
| author | Mitja Felicijan <mitja.felicijan@gmail.com> | 2026-01-21 22:52:54 +0100 |
|---|---|---|
| committer | Mitja Felicijan <mitja.felicijan@gmail.com> | 2026-01-21 22:52:54 +0100 |
| commit | dcacc00e3750300617ba6e16eb346713f91a783a (patch) | |
| tree | 38e2d4fb5ed9d119711d4295c6eda4b014af73fd /examples/dte/search.h | |
| parent | 58dac10aeb8f5a041c46bddbeaf4c7966a99b998 (diff) | |
| download | crep-dcacc00e3750300617ba6e16eb346713f91a783a.tar.gz | |
Remove testing data
Diffstat (limited to 'examples/dte/search.h')
| -rw-r--r-- | examples/dte/search.h | 34 |
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 | |||
| 9 | typedef enum { | ||
| 10 | CSS_FALSE, | ||
| 11 | CSS_TRUE, | ||
| 12 | CSS_AUTO, | ||
| 13 | } SearchCaseSensitivity; | ||
| 14 | |||
| 15 | typedef 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 | |||
| 22 | static inline void toggle_search_direction(SearchState *search) | ||
| 23 | { | ||
| 24 | search->reverse ^= 1; | ||
| 25 | } | ||
| 26 | |||
| 27 | bool search_tag(View *view, const char *pattern) NONNULL_ARGS WARN_UNUSED_RESULT; | ||
| 28 | void search_set_regexp(SearchState *search, const char *pattern) NONNULL_ARGS; | ||
| 29 | void search_free_regexp(SearchState *search) NONNULL_ARGS; | ||
| 30 | bool search_prev(View *view, SearchState *search, SearchCaseSensitivity cs) NONNULL_ARGS WARN_UNUSED_RESULT; | ||
| 31 | bool search_next(View *view, SearchState *search, SearchCaseSensitivity cs) NONNULL_ARGS WARN_UNUSED_RESULT; | ||
| 32 | bool search_next_word(View *view, SearchState *search, SearchCaseSensitivity cs) NONNULL_ARGS WARN_UNUSED_RESULT; | ||
| 33 | |||
| 34 | #endif | ||
