aboutsummaryrefslogtreecommitdiff
path: root/bp.c
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2021-08-01 21:30:41 -0700
committerBruce Hill <bruce@bruce-hill.com>2021-08-01 21:30:41 -0700
commit41bd2ce6fa1da19c645fc6f7b4ce171235dac1f2 (patch)
treead1c523be2e86ca0b7e3e56b5a8fa4b099346ed4 /bp.c
parent18c2f865346563129b26b933877dd2ffc29731d1 (diff)
Renamed matchviz -> explain
Diffstat (limited to 'bp.c')
-rw-r--r--bp.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/bp.c b/bp.c
index 9f20241..51ab8ca 100644
--- a/bp.c
+++ b/bp.c
@@ -21,10 +21,10 @@
#include <unistd.h>
#include "definitions.h"
+#include "explain.h"
#include "files.h"
#include "json.h"
#include "match.h"
-#include "matchviz.h"
#include "pattern.h"
#include "print.h"
#include "utils.h"
@@ -188,12 +188,11 @@ static int explain_matches(def_t *defs, file_t *f, pat_t *pattern)
int matches = 0;
match_t *m = NULL;
while ((m = next_match(defs, f, m, pattern, options.skip, options.ignorecase))) {
- if (++matches == 1) {
+ if (++matches == 1)
fprint_filename(stdout, f->filename);
- } else {
+ else
printf("\n\n");
- }
- visualize_match(m);
+ explain_match(m);
}
if (m) recycle_if_unused(&m);
return matches;