Mercurial > illumos > git > illumos-gate
comparison usr/src/uts/common/io/tem_safe.c @ 19240:5cc8d6ae0443
11973 tem: we only can translate colors 0-7
Reviewed by: Robert Mustacchi <rm@fingolfin.org>
Reviewed by: Garrett D'Amore <garrett@damore.org>
Approved by: Dan McDonald <danmcd@joyent.com>
author | Toomas Soome <tsoome@me.com> |
---|---|
date | Thu, 14 Nov 2019 14:35:34 +0200 |
parents | 17ce694a834c |
children | 036faba8174f |
comparison
equal
deleted
inserted
replaced
19239:6ede5d6cae83 | 19240:5cc8d6ae0443 |
---|---|
2373 tem_safe_get_color(text_color_t *fg, text_color_t *bg, term_char_t c) | 2373 tem_safe_get_color(text_color_t *fg, text_color_t *bg, term_char_t c) |
2374 { | 2374 { |
2375 *fg = c.tc_fg_color; | 2375 *fg = c.tc_fg_color; |
2376 *bg = c.tc_bg_color; | 2376 *bg = c.tc_bg_color; |
2377 | 2377 |
2378 if (c.tc_fg_color < 16) { | 2378 if (c.tc_fg_color < XLATE_NCOLORS) { |
2379 if (TEM_ATTR_ISSET(c.tc_char, | 2379 if (TEM_ATTR_ISSET(c.tc_char, |
2380 TEM_ATTR_BRIGHT_FG | TEM_ATTR_BOLD)) | 2380 TEM_ATTR_BRIGHT_FG | TEM_ATTR_BOLD)) |
2381 *fg = brt_xlate[c.tc_fg_color]; | 2381 *fg = brt_xlate[c.tc_fg_color]; |
2382 else | 2382 else |
2383 *fg = dim_xlate[c.tc_fg_color]; | 2383 *fg = dim_xlate[c.tc_fg_color]; |
2384 } | 2384 } |
2385 | 2385 |
2386 if (c.tc_bg_color < 16) { | 2386 if (c.tc_bg_color < XLATE_NCOLORS) { |
2387 if (TEM_ATTR_ISSET(c.tc_char, TEM_ATTR_BRIGHT_BG)) | 2387 if (TEM_ATTR_ISSET(c.tc_char, TEM_ATTR_BRIGHT_BG)) |
2388 *bg = brt_xlate[c.tc_bg_color]; | 2388 *bg = brt_xlate[c.tc_bg_color]; |
2389 else | 2389 else |
2390 *bg = dim_xlate[c.tc_bg_color]; | 2390 *bg = dim_xlate[c.tc_bg_color]; |
2391 } | 2391 } |