Clean up use of ANSI color sequences

Remove the literal ANSI escape sequences and replace them by readable
constants.

Signed-off-by: Arjen Laarhoven <arjen@yaph.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Arjen Laarhoven
2009-02-13 22:53:40 +01:00
committed by Junio C Hamano
parent 5cd12b85fe
commit dc6ebd4cc5
6 changed files with 35 additions and 27 deletions

16
diff.c
View File

@ -30,14 +30,14 @@ int diff_auto_refresh_index = 1;
static int diff_mnemonic_prefix;
static char diff_colors[][COLOR_MAXLEN] = {
"\033[m", /* reset */
"", /* PLAIN (normal) */
"\033[1m", /* METAINFO (bold) */
"\033[36m", /* FRAGINFO (cyan) */
"\033[31m", /* OLD (red) */
"\033[32m", /* NEW (green) */
"\033[33m", /* COMMIT (yellow) */
"\033[41m", /* WHITESPACE (red background) */
GIT_COLOR_RESET,
GIT_COLOR_NORMAL, /* PLAIN */
GIT_COLOR_BOLD, /* METAINFO */
GIT_COLOR_CYAN, /* FRAGINFO */
GIT_COLOR_RED, /* OLD */
GIT_COLOR_GREEN, /* NEW */
GIT_COLOR_YELLOW, /* COMMIT */
GIT_COLOR_BG_RED, /* WHITESPACE */
};
static void diff_filespec_load_driver(struct diff_filespec *one);