From 6aeaa171dc1ca43392f53cbd02097f76e1b1c5a0 Mon Sep 17 00:00:00 2001 From: David Moc Date: Sun, 31 May 2026 03:47:04 +0200 Subject: Hardened API, tetris, MD-View --- include/completion.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 include/completion.h (limited to 'include/completion.h') 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 + +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 -- cgit v1.2.3