author | Johan Herland <johan@herland.net> | |
Tue, 13 Jul 2010 21:23:39 +0000 (23:23 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Tue, 13 Jul 2010 23:33:02 +0000 (16:33 -0700) | ||
commit | 1e3d4119d21df2812584a09a18d35414efbc1336 | |
tree | 1dd4af0676e8492cddb5d0307560b01426f2d1d8 | tree | snapshot |
parent | 6bdc17d9a69bdd736901b115841479f5782a510e | commit | diff |
Enable custom schemes for column colors in the graph API
Currently, the graph code is hardcoded to use ANSI color escapes for
coloring the column characters in the generated graphs. This patch
allows a custom scheme of colors to be set at runtime, allowing
different types of color escapes to be used.
A new function - graph_set_column_colors() - is added to the graph.h API,
which allows a custom column_colors array (and column_colors_max value)
to replace the builtin ANSI array (and _max value). The new function -
if used - must be called before graph_init() is called.
Signed-off-by: Johan Herland <johan@herland.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Currently, the graph code is hardcoded to use ANSI color escapes for
coloring the column characters in the generated graphs. This patch
allows a custom scheme of colors to be set at runtime, allowing
different types of color escapes to be used.
A new function - graph_set_column_colors() - is added to the graph.h API,
which allows a custom column_colors array (and column_colors_max value)
to replace the builtin ANSI array (and _max value). The new function -
if used - must be called before graph_init() is called.
Signed-off-by: Johan Herland <johan@herland.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
graph.c | diff | blob | history | |
graph.h | diff | blob | history |