| ... | ... |
@@ -28,6 +28,7 @@ int has_match(const char *needle, const char *haystack) {
|
| 28 | 28 |
|
| 29 | 29 |
#define max(a, b) (((a) > (b)) ? (a) : (b)) |
| 30 | 30 |
|
| 31 |
+#ifdef DEBUG_VERBOSE |
|
| 31 | 32 |
/* print one of the internal matrices */ |
| 32 | 33 |
void mat_print(score_t *mat, const char *needle, const char *haystack) {
|
| 33 | 34 |
int n = strlen(needle); |
| ... | ... |
@@ -52,6 +53,7 @@ void mat_print(score_t *mat, const char *needle, const char *haystack) {
|
| 52 | 53 |
} |
| 53 | 54 |
fprintf(stderr, "\n\n"); |
| 54 | 55 |
} |
| 56 |
+#endif |
|
| 55 | 57 |
|
| 56 | 58 |
score_t calculate_score(const char *needle, const char *haystack, size_t *positions) {
|
| 57 | 59 |
if (!*haystack || !*needle) |
| ... | ... |
@@ -122,7 +124,7 @@ score_t calculate_score(const char *needle, const char *haystack, size_t *positi |
| 122 | 124 |
} |
| 123 | 125 |
} |
| 124 | 126 |
|
| 125 |
-#if 0 |
|
| 127 |
+#ifdef DEBUG_VERBOSE |
|
| 126 | 128 |
fprintf(stderr, "\"%s\" =~ \"%s\"\n", needle, haystack); |
| 127 | 129 |
mat_print(&D[0][0], needle, haystack); |
| 128 | 130 |
mat_print(&M[0][0], needle, haystack); |