diff options
author | John Hawthorn <john.hawthorn@gmail.com> | 2015-12-07 18:20:00 -0800 |
---|---|---|
committer | John Hawthorn <john.hawthorn@gmail.com> | 2015-12-07 18:20:21 -0800 |
commit | e3ad48c3ff4fa3eb7e7403a66d967420f17d512a (patch) | |
tree | 2fb78887cb3d440d44dd5220057a9787b2d62eda /match.c | |
parent | 1bed6cf09c3c7d863383310ef45ac09e61c665a5 (diff) |
Add DEBUG_VERBOSE flag
Diffstat (limited to 'match.c')
-rw-r--r-- | match.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -28,6 +28,7 @@ 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, const char *needle, const char *haystack) { int n = strlen(needle); @@ -52,6 +53,7 @@ void mat_print(score_t *mat, const char *needle, const char *haystack) { } fprintf(stderr, "\n\n"); } +#endif score_t calculate_score(const char *needle, const char *haystack, size_t *positions) { if (!*haystack || !*needle) @@ -122,7 +124,7 @@ score_t calculate_score(const char *needle, const char *haystack, size_t *positi } } -#if 0 +#ifdef DEBUG_VERBOSE fprintf(stderr, "\"%s\" =~ \"%s\"\n", needle, haystack); mat_print(&D[0][0], needle, haystack); mat_print(&M[0][0], needle, haystack); |