fzy

terminal fuzzy finder picker

git clone https://9o.is/git/fzy.git

match.h

(445B)


      1 #ifndef MATCH_H
      2 #define MATCH_H MATCH_H
      3 
      4 #include <math.h>
      5 
      6 #ifdef __cplusplus
      7 extern "C" {
      8 #endif
      9 
     10 typedef double score_t;
     11 #define SCORE_MAX INFINITY
     12 #define SCORE_MIN -INFINITY
     13 
     14 #define MATCH_MAX_LEN 1024
     15 
     16 int has_match(const char *needle, const char *haystack);
     17 score_t match_positions(const char *needle, const char *haystack, size_t *positions);
     18 score_t match(const char *needle, const char *haystack);
     19 
     20 #ifdef __cplusplus
     21 }
     22 #endif
     23 
     24 #endif