diff options
Diffstat (limited to 'printing.h')
| -rw-r--r-- | printing.h | 18 |
1 files changed, 11 insertions, 7 deletions
@@ -6,17 +6,21 @@ #include "types.h" -typedef enum { - PRINT_COLOR = 1<<0, - PRINT_LINE_NUMBERS = 1<<1, -} print_options_t; +typedef struct { + file_t *file; + const char *pos; + int context_lines; + unsigned int needs_line_number:1; + unsigned int use_color:1; + unsigned int print_line_numbers:1; +} printer_t; __attribute__((nonnull)) void visualize_match(match_t *m); +__attribute__((nonnull(1,2))) +void print_match(FILE *out, printer_t *pr, match_t *m); __attribute__((nonnull)) -void print_match(FILE *out, file_t *f, match_t *m, print_options_t options); -__attribute__((nonnull)) -int print_errors(file_t *f, match_t *m, print_options_t options); +int print_errors(printer_t *pr, match_t *m); #endif // vim: ts=4 sw=0 et cino=L2,l1,(0,W4,m1 |
