diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2021-01-15 19:27:25 -0800 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2021-01-15 19:27:25 -0800 |
| commit | 77b33d6a3cdc2655fa0319a2c5a077eb709cb6aa (patch) | |
| tree | f4d29634e49c71f4688bcb08b6ec8da40d00be31 /print.h | |
| parent | 10dbcdd4fd7bf2f14d49bdf19139f8dd5d53aebd (diff) | |
Renaming files: printing->print, file_loader->files
Diffstat (limited to 'print.h')
| -rw-r--r-- | print.h | 26 |
1 files changed, 26 insertions, 0 deletions
@@ -0,0 +1,26 @@ +// +// Header file for print.c (printing/visualizing matches) +// +#ifndef PRINT__H +#define PRINT__H + +#include "types.h" + +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)) +int print_errors(printer_t *pr, match_t *m); + +#endif +// vim: ts=4 sw=0 et cino=L2,l1,(0,W4,m1 |
