Browse code

Remove DEBUG_VERBOSE

John Hawthorn authored on 28/12/2019 02:42:25
Showing 1 changed files

... ...
@@ -32,33 +32,6 @@ int has_match(const char *needle, const char *haystack) {
32 32
 
33 33
 #define max(a, b) (((a) > (b)) ? (a) : (b))
34 34
 
35
-#ifdef DEBUG_VERBOSE
36
-/* print one of the internal matrices */
37
-void mat_print(score_t *mat, char name, const char *needle, const char *haystack) {
38
-	int n = strlen(needle);
39
-	int m = strlen(haystack);
40
-	int i, j;
41
-	fprintf(stderr, "%c   ", name);
42
-	for (j = 0; j < m; j++) {
43
-		fprintf(stderr, "     %c", haystack[j]);
44
-	}
45
-	fprintf(stderr, "\n");
46
-	for (i = 0; i < n; i++) {
47
-		fprintf(stderr, " %c |", needle[i]);
48
-		for (j = 0; j < m; j++) {
49
-			score_t val = mat[i * m + j];
50
-			if (val == SCORE_MIN) {
51
-				fprintf(stderr, "    -\u221E");
52
-			} else {
53
-				fprintf(stderr, " %.3f", val);
54
-			}
55
-		}
56
-		fprintf(stderr, "\n");
57
-	}
58
-	fprintf(stderr, "\n\n");
59
-}
60
-#endif
61
-
62 35
 #define MATCH_MAX_LEN 1024
63 36
 
64 37
 struct match_struct {
... ...
@@ -228,13 +201,6 @@ score_t match_positions(const char *needle, const char *haystack, size_t *positi
228 201
 		last_M = curr_M;
229 202
 	}
230 203
 
231
-#ifdef DEBUG_VERBOSE
232
-	fprintf(stderr, "\"%s\" =~ \"%s\"\n", needle, haystack);
233
-	mat_print(&D[0][0], 'D', needle, haystack);
234
-	mat_print(&M[0][0], 'M', needle, haystack);
235
-	fprintf(stderr, "\n");
236
-#endif
237
-
238 204
 	/* backtrace to find the positions of optimal matching */
239 205
 	if (positions) {
240 206
 		int match_required = 0;