fzy
terminal fuzzy finder picker
git clone https://9o.is/git/fzy.git
commit d1892b5a2d6614f53994d67d337a3b7e62acc146 parent 2757e016efb421b8196714d64dd5d05a5945cea3 Author: John Hawthorn <john@hawthorn.email> Date: Fri, 27 Dec 2019 18:42:25 -0800 Remove DEBUG_VERBOSE Diffstat:
| M | src/match.c | | | 34 | ---------------------------------- |
1 file changed, 0 insertions(+), 34 deletions(-)
diff --git a/src/match.c b/src/match.c @@ -32,33 +32,6 @@ int has_match(const char *needle, const char *haystack) { #define max(a, b) (((a) > (b)) ? (a) : (b)) -#ifdef DEBUG_VERBOSE -/* print one of the internal matrices */ -void mat_print(score_t *mat, char name, const char *needle, const char *haystack) { - int n = strlen(needle); - int m = strlen(haystack); - int i, j; - fprintf(stderr, "%c ", name); - for (j = 0; j < m; j++) { - fprintf(stderr, " %c", haystack[j]); - } - fprintf(stderr, "\n"); - for (i = 0; i < n; i++) { - fprintf(stderr, " %c |", needle[i]); - for (j = 0; j < m; j++) { - score_t val = mat[i * m + j]; - if (val == SCORE_MIN) { - fprintf(stderr, " -\u221E"); - } else { - fprintf(stderr, " %.3f", val); - } - } - fprintf(stderr, "\n"); - } - fprintf(stderr, "\n\n"); -} -#endif - #define MATCH_MAX_LEN 1024 struct match_struct { @@ -228,13 +201,6 @@ score_t match_positions(const char *needle, const char *haystack, size_t *positi last_M = curr_M; } -#ifdef DEBUG_VERBOSE - fprintf(stderr, "\"%s\" =~ \"%s\"\n", needle, haystack); - mat_print(&D[0][0], 'D', needle, haystack); - mat_print(&M[0][0], 'M', needle, haystack); - fprintf(stderr, "\n"); -#endif - /* backtrace to find the positions of optimal matching */ if (positions) { int match_required = 0;