summaryrefslogtreecommitdiff
path: root/match.c
diff options
context:
space:
mode:
authorJohn Hawthorn <john.hawthorn@gmail.com>2015-12-07 18:20:00 -0800
committerJohn Hawthorn <john.hawthorn@gmail.com>2015-12-07 18:20:21 -0800
commite3ad48c3ff4fa3eb7e7403a66d967420f17d512a (patch)
tree2fb78887cb3d440d44dd5220057a9787b2d62eda /match.c
parent1bed6cf09c3c7d863383310ef45ac09e61c665a5 (diff)
Add DEBUG_VERBOSE flag
Diffstat (limited to 'match.c')
-rw-r--r--match.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/match.c b/match.c
index 3eafda1..19a34af 100644
--- a/match.c
+++ b/match.c
@@ -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);