From 744a92756200052837e25f4f7758175241528536 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Thu, 23 Sep 2021 13:42:23 -0700 Subject: Deprecated (!)-errors --- print.c | 20 -------------------- 1 file changed, 20 deletions(-) (limited to 'print.c') diff --git a/print.c b/print.c index dcebce9..dfe099f 100644 --- a/print.c +++ b/print.c @@ -266,24 +266,4 @@ void print_match(FILE *out, printer_t *pr, match_t *m) if (pr->use_color) fprintf(out, "%s", color_normal); } -// -// Print any errors that are present in the given match object to stderr and -// return the number of errors found. -// -int print_errors(file_t *f, match_t *m) -{ - int ret = 0; - if (m->pat->type == BP_ERROR) { - fprintf(stderr, "\033[31;1m"); - printer_t tmp = {.file = f, .context_before=NO_CONTEXT, .context_after=NO_CONTEXT}; // No bells and whistles - print_match(stderr, &tmp, m); // Error message - fprintf(stderr, "\033[m\n"); - fprint_line(stderr, f, m->start, m->end, " "); - return 1; - } - for (int i = 0; m->children && m->children[i]; i++) - ret += print_errors(f, m->children[i]); - return ret; -} - // vim: ts=4 sw=0 et cino=L2,l1,(0,W4,m1,\:0 -- cgit v1.2.3