From 41bd2ce6fa1da19c645fc6f7b4ce171235dac1f2 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Sun, 1 Aug 2021 21:30:41 -0700 Subject: Renamed matchviz -> explain --- bp.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'bp.c') diff --git a/bp.c b/bp.c index 9f20241..51ab8ca 100644 --- a/bp.c +++ b/bp.c @@ -21,10 +21,10 @@ #include #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; -- cgit v1.2.3