git: 5e017a84744a - stable/13 - teken: color #3 is yellow not brown - use TC_YELLOW as the name
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 03 May 2022 18:21:30 UTC
The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=5e017a84744a8124ecb0418f82f550738c7241e8 commit 5e017a84744a8124ecb0418f82f550738c7241e8 Author: Ed Maste <emaste@FreeBSD.org> AuthorDate: 2022-03-11 21:37:03 +0000 Commit: Ed Maste <emaste@FreeBSD.org> CommitDate: 2022-05-03 18:20:44 +0000 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 (cherry picked from commit cf8880d52b8962edeb807a8ee1811d342fafa26d) --- stand/efi/libefi/efi_console.c | 2 +- stand/i386/libi386/vidconsole.c | 2 +- sys/dev/syscons/scterm-teken.c | 2 +- sys/sys/terminal.h | 8 ++++---- sys/teken/teken.c | 4 ++-- sys/teken/teken.h | 2 +- sys/teken/teken_subr_compat.h | 2 +- 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/stand/efi/libefi/efi_console.c b/stand/efi/libefi/efi_console.c index 010c949faf38..1a264b9821f8 100644 --- a/stand/efi/libefi/efi_console.c +++ b/stand/efi/libefi/efi_console.c @@ -457,7 +457,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) { diff --git a/stand/i386/libi386/vidconsole.c b/stand/i386/libi386/vidconsole.c index 4f1f22234dc3..1ec6b4f5393a 100644 --- a/stand/i386/libi386/vidconsole.c +++ b/stand/i386/libi386/vidconsole.c @@ -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) { diff --git a/sys/dev/syscons/scterm-teken.c b/sys/dev/syscons/scterm-teken.c index b575b4ec3119..ed287a74b8f9 100644 --- a/sys/dev/syscons/scterm-teken.c +++ b/sys/dev/syscons/scterm-teken.c @@ -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[] = { diff --git a/sys/sys/terminal.h b/sys/sys/terminal.h index a77c985e85ca..7a6ee7530294 100644 --- a/sys/sys/terminal.h +++ b/sys/sys/terminal.h @@ -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 diff --git a/sys/teken/teken.c b/sys/teken/teken.c index cdd9ab4c8419..590e992fb238 100644 --- a/sys/teken/teken.c +++ b/sys/teken/teken.c @@ -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) diff --git a/sys/teken/teken.h b/sys/teken/teken.h index 994298b0dbc6..7545db9b9cdf 100644 --- a/sys/teken/teken.h +++ b/sys/teken/teken.h @@ -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 diff --git a/sys/teken/teken_subr_compat.h b/sys/teken/teken_subr_compat.h index 4cf4f5e98c7b..c71fcea6ce9f 100644 --- a/sys/teken/teken_subr_compat.h +++ b/sys/teken/teken_subr_compat.h @@ -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)