diff options
author | John Hawthorn <john@hawthorn.email> | 2019-12-27 19:39:50 -0800 |
---|---|---|
committer | John Hawthorn <john@hawthorn.email> | 2019-12-27 22:25:01 -0800 |
commit | f7a62107b72152cd19dab1c13c027e4190a1997c (patch) | |
tree | 3be8a74b0fa7a3b22d2a45e2c00a5d040ddcd2e3 /src/match.h | |
parent | e1a48d0808cfc0c817ec78ab6b9e891676a2e62b (diff) |
Avoid VLA in tty_interface
Diffstat (limited to 'src/match.h')
-rw-r--r-- | src/match.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/match.h b/src/match.h index 0fa7b6f..d4f292c 100644 --- a/src/match.h +++ b/src/match.h @@ -7,6 +7,8 @@ typedef double score_t; #define SCORE_MAX INFINITY #define SCORE_MIN -INFINITY +#define MATCH_MAX_LEN 1024 + int has_match(const char *needle, const char *haystack); score_t match_positions(const char *needle, const char *haystack, size_t *positions); score_t match(const char *needle, const char *haystack); |