mirror of
https://git.FreeBSD.org/src.git
synced 2024-11-24 07:40:52 +00:00
teken: color #3 is yellow not brown - use TC_YELLOW as the name
The console escape code standard (ECMA-48) specifies color #3 (escape code 33) as yellow. A brown console color is an artifact of the VGA palette, which replaces dim (but not bright) yellow with brown. Reviewed by: adrian, imp MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D34531
This commit is contained in:
parent
66b177e1b4
commit
cf8880d52b
@ -458,7 +458,7 @@ color_name_to_teken(const char *name, int *val)
|
||||
return (true);
|
||||
}
|
||||
if (strcasecmp(name, "yellow") == 0 || strcasecmp(name, "brown") == 0) {
|
||||
*val = TC_BROWN | light;
|
||||
*val = TC_YELLOW | light;
|
||||
return (true);
|
||||
}
|
||||
if (strcasecmp(name, "blue") == 0) {
|
||||
|
@ -545,7 +545,7 @@ color_name_to_teken(const char *name, int *val)
|
||||
return (true);
|
||||
}
|
||||
if (strcasecmp(name, "yellow") == 0 || strcasecmp(name, "brown") == 0) {
|
||||
*val = TC_BROWN | light;
|
||||
*val = TC_YELLOW | light;
|
||||
return (true);
|
||||
}
|
||||
if (strcasecmp(name, "blue") == 0) {
|
||||
|
@ -317,7 +317,7 @@ scteken_nop(void)
|
||||
|
||||
static const teken_color_t sc_to_te_color[] = {
|
||||
TC_BLACK, TC_BLUE, TC_GREEN, TC_CYAN,
|
||||
TC_RED, TC_MAGENTA, TC_BROWN, TC_WHITE,
|
||||
TC_RED, TC_MAGENTA, TC_YELLOW, TC_WHITE,
|
||||
};
|
||||
|
||||
static const unsigned char te_to_sc_color[] = {
|
||||
|
@ -94,7 +94,7 @@ typedef teken_color_t term_color_t;
|
||||
#define FG_CYAN TCOLOR_FG(TC_CYAN)
|
||||
#define FG_RED TCOLOR_FG(TC_RED)
|
||||
#define FG_MAGENTA TCOLOR_FG(TC_MAGENTA)
|
||||
#define FG_BROWN TCOLOR_FG(TC_BROWN)
|
||||
#define FG_BROWN TCOLOR_FG(TC_YELLOW)
|
||||
#define FG_LIGHTGREY TCOLOR_FG(TC_WHITE)
|
||||
#define FG_DARKGREY (TFORMAT(TF_BOLD) | TCOLOR_FG(TC_BLACK))
|
||||
#define FG_LIGHTBLUE (TFORMAT(TF_BOLD) | TCOLOR_FG(TC_BLUE))
|
||||
@ -102,7 +102,7 @@ typedef teken_color_t term_color_t;
|
||||
#define FG_LIGHTCYAN (TFORMAT(TF_BOLD) | TCOLOR_FG(TC_CYAN))
|
||||
#define FG_LIGHTRED (TFORMAT(TF_BOLD) | TCOLOR_FG(TC_RED))
|
||||
#define FG_LIGHTMAGENTA (TFORMAT(TF_BOLD) | TCOLOR_FG(TC_MAGENTA))
|
||||
#define FG_YELLOW (TFORMAT(TF_BOLD) | TCOLOR_FG(TC_BROWN))
|
||||
#define FG_YELLOW (TFORMAT(TF_BOLD) | TCOLOR_FG(TC_YELLOW))
|
||||
#define FG_WHITE (TFORMAT(TF_BOLD) | TCOLOR_FG(TC_WHITE))
|
||||
#define FG_BLINK TFORMAT(TF_BLINK)
|
||||
|
||||
@ -113,7 +113,7 @@ typedef teken_color_t term_color_t;
|
||||
#define BG_CYAN TCOLOR_BG(TC_CYAN)
|
||||
#define BG_RED TCOLOR_BG(TC_RED)
|
||||
#define BG_MAGENTA TCOLOR_BG(TC_MAGENTA)
|
||||
#define BG_BROWN TCOLOR_BG(TC_BROWN)
|
||||
#define BG_BROWN TCOLOR_BG(TC_YELLOW)
|
||||
#define BG_LIGHTGREY TCOLOR_BG(TC_WHITE)
|
||||
#define BG_DARKGREY (TFORMAT(TF_BOLD) | TCOLOR_BG(TC_BLACK))
|
||||
#define BG_LIGHTBLUE (TFORMAT(TF_BOLD) | TCOLOR_BG(TC_BLUE))
|
||||
@ -121,7 +121,7 @@ typedef teken_color_t term_color_t;
|
||||
#define BG_LIGHTCYAN (TFORMAT(TF_BOLD) | TCOLOR_BG(TC_CYAN))
|
||||
#define BG_LIGHTRED (TFORMAT(TF_BOLD) | TCOLOR_BG(TC_RED))
|
||||
#define BG_LIGHTMAGENTA (TFORMAT(TF_BOLD) | TCOLOR_BG(TC_MAGENTA))
|
||||
#define BG_YELLOW (TFORMAT(TF_BOLD) | TCOLOR_BG(TC_BROWN))
|
||||
#define BG_YELLOW (TFORMAT(TF_BOLD) | TCOLOR_BG(TC_YELLOW))
|
||||
#define BG_WHITE (TFORMAT(TF_BOLD) | TCOLOR_BG(TC_WHITE))
|
||||
|
||||
#ifndef TERMINAL_NORM_ATTR
|
||||
|
@ -494,7 +494,7 @@ teken_state_numbers(teken_t *t, teken_char_t c)
|
||||
|
||||
#define k TC_BLACK
|
||||
#define b TC_BLUE
|
||||
#define y TC_BROWN
|
||||
#define y TC_YELLOW
|
||||
#define c TC_CYAN
|
||||
#define g TC_GREEN
|
||||
#define m TC_MAGENTA
|
||||
@ -502,7 +502,7 @@ teken_state_numbers(teken_t *t, teken_char_t c)
|
||||
#define w TC_WHITE
|
||||
#define K (TC_BLACK | TC_LIGHT)
|
||||
#define B (TC_BLUE | TC_LIGHT)
|
||||
#define Y (TC_BROWN | TC_LIGHT)
|
||||
#define Y (TC_YELLOW | TC_LIGHT)
|
||||
#define C (TC_CYAN | TC_LIGHT)
|
||||
#define G (TC_GREEN | TC_LIGHT)
|
||||
#define M (TC_MAGENTA | TC_LIGHT)
|
||||
|
@ -53,7 +53,7 @@ typedef unsigned char teken_color_t;
|
||||
#define TC_BLACK 0
|
||||
#define TC_RED 1
|
||||
#define TC_GREEN 2
|
||||
#define TC_BROWN 3
|
||||
#define TC_YELLOW 3
|
||||
#define TC_BLUE 4
|
||||
#define TC_MAGENTA 5
|
||||
#define TC_CYAN 6
|
||||
|
@ -65,7 +65,7 @@ teken_subr_cons25_set_local_cursor_type(const teken_t *t, unsigned int type)
|
||||
}
|
||||
|
||||
static const teken_color_t cons25_colors[8] = { TC_BLACK, TC_BLUE,
|
||||
TC_GREEN, TC_CYAN, TC_RED, TC_MAGENTA, TC_BROWN, TC_WHITE };
|
||||
TC_GREEN, TC_CYAN, TC_RED, TC_MAGENTA, TC_YELLOW, TC_WHITE };
|
||||
|
||||
static void
|
||||
teken_subr_cons25_set_default_background(teken_t *t, unsigned int c)
|
||||
|
Loading…
Reference in New Issue
Block a user