aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorEd Schouten <ed@FreeBSD.org>2009-01-17 22:53:53 +0000
committerEd Schouten <ed@FreeBSD.org>2009-01-17 22:53:53 +0000
commitec9037a258e06611e48e211a88c5fadf3a331e5d (patch)
tree8704388076cc7284b489561f3bb384afca0b33f0 /sys
parentbfe3989e738fa3297fe5b995ce0f24d8a040e241 (diff)
Notes
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/syscons/teken/sequences2
-rw-r--r--sys/dev/syscons/teken/teken_subr_compat.h23
2 files changed, 25 insertions, 0 deletions
diff --git a/sys/dev/syscons/teken/sequences b/sys/dev/syscons/teken/sequences
index eb5a9fef54f0..99aa226ab975 100644
--- a/sys/dev/syscons/teken/sequences
+++ b/sys/dev/syscons/teken/sequences
@@ -100,6 +100,8 @@ TBC Tab Clear ^[ [ g r
VPA Vertical Position Absolute ^[ [ d n
# Cons25 compatibility sequences
+C25ADBG Cons25 set adapter background ^[ [ = G r
+C25ADFG Cons25 set adapter foreground ^[ [ = F r
C25CURS Cons25 set cursor type ^[ [ = S r
C25VTSW Cons25 switch virtual terminal ^[ [ z r
diff --git a/sys/dev/syscons/teken/teken_subr_compat.h b/sys/dev/syscons/teken/teken_subr_compat.h
index 5378bb0a9666..dea30d3e801c 100644
--- a/sys/dev/syscons/teken/teken_subr_compat.h
+++ b/sys/dev/syscons/teken/teken_subr_compat.h
@@ -34,6 +34,29 @@ teken_subr_cons25_set_cursor_type(teken_t *t, unsigned int type)
}
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;
+}
+
+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;
+ 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;
+ }
+}
+
+static void
teken_subr_cons25_switch_virtual_terminal(teken_t *t, unsigned int vt)
{