diff options
author | Phil Jones <philj56@gmail.com> | 2022-08-12 23:14:32 +0100 |
---|---|---|
committer | Phil Jones <philj56@gmail.com> | 2022-08-12 23:14:32 +0100 |
commit | 8e45592c5703451563eaf4edcd7033f80ce23b53 (patch) | |
tree | 3af3dcc6d84464ba0009ab6c5fdd7bea3fde4408 /src/desktop_vec.h | |
parent | 64dfe36d347a2b329d8c0b6baa3ff782e66f0233 (diff) |
Add --fuzzy_match option.
This enables some simple fuzzy matching logic for searches.
Diffstat (limited to 'src/desktop_vec.h')
-rw-r--r-- | src/desktop_vec.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/desktop_vec.h b/src/desktop_vec.h index 85c885e..a731566 100644 --- a/src/desktop_vec.h +++ b/src/desktop_vec.h @@ -1,6 +1,7 @@ #ifndef DESKTOP_VEC_H #define DESKTOP_VEC_H +#include <stdbool.h> #include <stddef.h> #include <stdio.h> #include <stdint.h> @@ -35,7 +36,8 @@ void desktop_vec_sort(struct desktop_vec *restrict vec); struct desktop_entry *desktop_vec_find(struct desktop_vec *restrict vec, const char *name); struct string_vec desktop_vec_filter( const struct desktop_vec *restrict vec, - const char *restrict substr); + const char *restrict substr, + bool fuzzy); struct desktop_vec desktop_vec_load(FILE *file); void desktop_vec_save(struct desktop_vec *restrict vec, FILE *restrict file); |