diff options
Diffstat (limited to 'include/completion.h')
| -rw-r--r-- | include/completion.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/include/completion.h b/include/completion.h new file mode 100644 index 0000000..86c41f0 --- /dev/null +++ b/include/completion.h @@ -0,0 +1,19 @@ +#ifndef ECEX_COMPLETION_H +#define ECEX_COMPLETION_H + +#include <stddef.h> + +typedef struct ecex_completion_item { + char *value; + int score; + int is_dir; + size_t order; +} ecex_completion_item_t; + +int ecex_ascii_strncasecmp(const char *a, const char *b, size_t n); +int ecex_ascii_contains_ci(const char *haystack, const char *needle); +int ecex_fuzzy_score(const char *candidate, const char *query); +int ecex_completion_item_compare(const void *a, const void *b); +void ecex_completion_items_free(ecex_completion_item_t *items, size_t count); + +#endif |
