Rewrite emacs-flx in C
flx_result* result = flx_score("buffer-file-name", "bfn");
if (result == NULL) {
return -1;
}
printf("Score: %d\n", result->score);
for (int i = 0; i < arrlen(result->indices); ++i) {
printf("idicies: %d %d\n", i, (*result).indices[i]);
}
flx_free(result);
How to detect memory leaks: (macOS only)
# leaks -atExit -- ./path/to/exe/test_flx
On Linux, you should use Valgrind instead!
flx-c
is distributed under the terms of the MIT license.
See LICENSE for details.