aboutsummaryrefslogtreecommitdiff
path: root/sys/teken
diff options
context:
space:
mode:
authorBruce Evans <bde@FreeBSD.org>2017-03-18 11:13:54 +0000
committerBruce Evans <bde@FreeBSD.org>2017-03-18 11:13:54 +0000
commit4eb235fb4f9f019b611e2bda866ca8e37f28356f (patch)
tree9b65ee1707e48385370d99f0e02efbfb5d501bc8 /sys/teken
parent44a2a27af5ac6f177a0eb2bc9041431c4b4c678b (diff)
Notes
Diffstat (limited to 'sys/teken')
-rw-r--r--sys/teken/teken_subr_compat.h15
1 files changed, 4 insertions, 11 deletions
diff --git a/sys/teken/teken_subr_compat.h b/sys/teken/teken_subr_compat.h
index a79cdfb6364c..22dc126b7ab1 100644
--- a/sys/teken/teken_subr_compat.h
+++ b/sys/teken/teken_subr_compat.h
@@ -40,23 +40,16 @@ static void
teken_subr_cons25_set_adapter_background(teken_t *t, unsigned int c)
{
- t->t_defattr.ta_bgcolor = cons25_colors[c % 8];
- t->t_curattr.ta_bgcolor = cons25_colors[c % 8];
+ t->t_defattr.ta_bgcolor = cons25_colors[c % 8] | (c & 8);
+ t->t_curattr.ta_bgcolor = cons25_colors[c % 8] | (c & 8);
}
static void
teken_subr_cons25_set_adapter_foreground(teken_t *t, unsigned int c)
{
- t->t_defattr.ta_fgcolor = cons25_colors[c % 8];
- t->t_curattr.ta_fgcolor = cons25_colors[c % 8];
- if (c >= 8) {
- t->t_defattr.ta_format |= TF_BOLD;
- t->t_curattr.ta_format |= TF_BOLD;
- } else {
- t->t_defattr.ta_format &= ~TF_BOLD;
- t->t_curattr.ta_format &= ~TF_BOLD;
- }
+ t->t_defattr.ta_fgcolor = cons25_colors[c % 8] | (c & 8);
+ t->t_curattr.ta_fgcolor = cons25_colors[c % 8] | (c & 8);
}
static const teken_color_t cons25_revcolors[8] = { 0, 4, 2, 6, 1, 5, 3, 7 };