diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2021-09-23 13:42:23 -0700 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2021-09-23 13:42:23 -0700 |
| commit | 744a92756200052837e25f4f7758175241528536 (patch) | |
| tree | 658a04ebc9aa902099febd36a9060d95094fcda3 /print.c | |
| parent | 55ff8ec6637d90d50ed83c43f83e25fe4571f6bb (diff) | |
Deprecated (!)-errors
Diffstat (limited to 'print.c')
| -rw-r--r-- | print.c | 20 |
1 files changed, 0 insertions, 20 deletions
@@ -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 |
