diff options
Diffstat (limited to 'match.h')
| -rw-r--r-- | match.h | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -33,6 +33,12 @@ typedef struct match_s { struct match_s *_children[3]; } match_t; +typedef struct { + const char *normal_color, *match_color, *replace_color; + void (*fprint_between)(FILE *out, const char *start, const char *end, const char *normal_color); + void (*on_nl)(FILE *out); +} print_options_t; + __attribute__((returns_nonnull)) match_t *new_match(def_t *defs, pat_t *pat, const char *start, const char *end, match_t *children[]); __attribute__((nonnull)) @@ -45,8 +51,9 @@ __attribute__((nonnull)) match_t *get_numbered_capture(match_t *m, int n); __attribute__((nonnull, pure)) match_t *get_named_capture(match_t *m, const char *name, size_t namelen); -__attribute__((nonnull)) -void fprint_match(FILE *out, const char *file_start, match_t *m); +__attribute__((nonnull(1,2,3))) +//void fprint_match(FILE *out, const char *file_start, match_t *m, const char *colors[3]); +void fprint_match(FILE *out, const char *file_start, match_t *m, print_options_t *opts); #endif // vim: ts=4 sw=0 et cino=L2,l1,(0,W4,m1,\:0 |
