summaryrefslogtreecommitdiff
path: root/sys/dev/syscons
diff options
context:
space:
mode:
authorEd Schouten <ed@FreeBSD.org>2009-01-17 23:01:40 +0000
committerEd Schouten <ed@FreeBSD.org>2009-01-17 23:01:40 +0000
commit6cecf41bf7d9c899f69d863f8f565d27ff550293 (patch)
treeb69876a2d2935b3ccf03558cc6aa364688b3b2d6 /sys/dev/syscons
parentec9037a258e06611e48e211a88c5fadf3a331e5d (diff)
Notes
Diffstat (limited to 'sys/dev/syscons')
-rw-r--r--sys/dev/syscons/teken/teken_subr_compat.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/sys/dev/syscons/teken/teken_subr_compat.h b/sys/dev/syscons/teken/teken_subr_compat.h
index dea30d3e801c..d52430131bcc 100644
--- a/sys/dev/syscons/teken/teken_subr_compat.h
+++ b/sys/dev/syscons/teken/teken_subr_compat.h
@@ -33,20 +33,23 @@ teken_subr_cons25_set_cursor_type(teken_t *t, unsigned int type)
teken_funcs_param(t, TP_SHOWCURSOR, type != 1);
}
+static teken_color_t cons25_colors[8] = { TC_BLACK, TC_BLUE, TC_GREEN,
+ TC_CYAN, TC_RED, TC_MAGENTA, TC_BROWN, TC_WHITE };
+
static void
teken_subr_cons25_set_adapter_background(teken_t *t, unsigned int c)
{
- t->t_defattr.ta_bgcolor = c % 8;
- t->t_curattr.ta_bgcolor = c % 8;
+ t->t_defattr.ta_bgcolor = cons25_colors[c % 8];
+ t->t_curattr.ta_bgcolor = cons25_colors[c % 8];
}
static void
teken_subr_cons25_set_adapter_foreground(teken_t *t, unsigned int c)
{
- t->t_defattr.ta_fgcolor = c % 8;
- t->t_curattr.ta_fgcolor = c % 8;
+ 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;