X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=color.c;h=3db214c24720496f13481b718e46810c21f53b8d;hb=490b6d5749c432370c4f8a5ed8d854cbf1116e20;hp=417cf8fb2812b09ad4f5bfa2674b35d7e11f32b9;hpb=2071fb015bc673d2514142d7614b56a37b3faaf2;p=git.git diff --git a/color.c b/color.c index 417cf8fb2..3db214c24 100644 --- a/color.c +++ b/color.c @@ -3,6 +3,28 @@ int git_use_color_default = 0; +/* + * The list of available column colors. + */ +const char *column_colors_ansi[] = { + GIT_COLOR_RED, + GIT_COLOR_GREEN, + GIT_COLOR_YELLOW, + GIT_COLOR_BLUE, + GIT_COLOR_MAGENTA, + GIT_COLOR_CYAN, + GIT_COLOR_BOLD_RED, + GIT_COLOR_BOLD_GREEN, + GIT_COLOR_BOLD_YELLOW, + GIT_COLOR_BOLD_BLUE, + GIT_COLOR_BOLD_MAGENTA, + GIT_COLOR_BOLD_CYAN, + GIT_COLOR_RESET, +}; + +/* Ignore the RESET at the end when giving the size */ +const int column_colors_ansi_max = ARRAY_SIZE(column_colors_ansi) - 1; + static int parse_color(const char *name, int len) { static const char * const color_names[] = {