diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2021-09-23 13:42:46 -0700 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2021-09-23 13:42:46 -0700 |
| commit | e938ecbdcce8d56d2cf78e57879e364f990b99be (patch) | |
| tree | 18579b8060fd2295238cbbf8d4f25781f41ba377 /print.c | |
| parent | cf99abb852536867169168d2c7fabf158099dfd9 (diff) | |
| parent | 744a92756200052837e25f4f7758175241528536 (diff) | |
Merge branch 'master' into setjmp
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 |
