libdiff: Implement diff coloring.

This patch got accidentally left out when libdiff was imported.  The
rest of the code (command-line option etc.) was present, just not the
part that actually prints ANSI color codes.

Sponsored by:	Klara, Inc.
Reviewed by:	kevans
Differential Revision:	https://reviews.freebsd.org/D46873
This commit is contained in:
Dag-Erling Smørgrav
2024-10-02 17:54:48 +02:00
parent fe55d62ab9
commit 4e859e67dd
3 changed files with 62 additions and 13 deletions
+4
View File
@@ -110,3 +110,7 @@ int diff_output_chunk_right_version(struct diff_output_info **output_info,
const char *diff_output_get_label_left(const struct diff_input_info *info);
const char *diff_output_get_label_right(const struct diff_input_info *info);
void diff_output_set_colors(bool _color,
const char *_del_code,
const char *_add_code);