summaryrefslogtreecommitdiffstats
path: root/sys/teken/teken_subr_compat.h
diff options
context:
space:
mode:
authored <ed@FreeBSD.org>2009-09-25 13:51:01 +0000
committered <ed@FreeBSD.org>2009-09-25 13:51:01 +0000
commit0216d117e1b901af972d2fe9132fba1bbcf973f7 (patch)
tree4bd31e6fcf9be11686f7840197055b12ba1e45c8 /sys/teken/teken_subr_compat.h
parentf832106f993304abc844167339fbf5ccd40014c0 (diff)
downloadFreeBSD-src-0216d117e1b901af972d2fe9132fba1bbcf973f7.zip
FreeBSD-src-0216d117e1b901af972d2fe9132fba1bbcf973f7.tar.gz
Add a new escape sequence to switch between cons25 and xterm.
Just run this to switch to xterm: printf '\e[=T' If you get bored and want to switch back to cons25, run this: printf '\e[=1T' I can now send an email to the lists, asking whether people are interested in trying the xterm emulator.
Diffstat (limited to 'sys/teken/teken_subr_compat.h')
-rw-r--r--sys/teken/teken_subr_compat.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/sys/teken/teken_subr_compat.h b/sys/teken/teken_subr_compat.h
index c642af7..088f378 100644
--- a/sys/teken/teken_subr_compat.h
+++ b/sys/teken/teken_subr_compat.h
@@ -87,6 +87,20 @@ teken_subr_cons25_set_bell_pitch_duration(teken_t *t, unsigned int pitch,
(duration & 0xffff));
}
+static void
+teken_subr_cons25_set_terminal_mode(teken_t *t, unsigned int mode)
+{
+
+ switch (mode) {
+ case 0: /* Switch terminal to xterm. */
+ t->t_stateflags &= ~TS_CONS25;
+ break;
+ case 1: /* Switch terminal to cons25. */
+ t->t_stateflags |= TS_CONS25;
+ break;
+ }
+}
+
#if 0
static void
teken_subr_vt52_decid(teken_t *t)
OpenPOWER on IntegriCloud