diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2021-08-01 21:30:41 -0700 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2021-08-01 21:30:41 -0700 |
| commit | 41bd2ce6fa1da19c645fc6f7b4ce171235dac1f2 (patch) | |
| tree | ad1c523be2e86ca0b7e3e56b5a8fa4b099346ed4 /bp.c | |
| parent | 18c2f865346563129b26b933877dd2ffc29731d1 (diff) | |
Renamed matchviz -> explain
Diffstat (limited to 'bp.c')
| -rw-r--r-- | bp.c | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -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; |
