diff options
| author | David Moc <personal@cdatgoose.org> | 2026-05-31 03:47:04 +0200 |
|---|---|---|
| committer | David Moc <personal@cdatgoose.org> | 2026-05-31 03:47:04 +0200 |
| commit | 6aeaa171dc1ca43392f53cbd02097f76e1b1c5a0 (patch) | |
| tree | b16f559f5a701123ebe7b15ecebb9325263b4a3c /include/completion.h | |
| parent | e930cc6bdc7f62befac063d7d9d016ffb0a64f1a (diff) | |
Hardened API, tetris, MD-View
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 |
