aboutsummaryrefslogtreecommitdiff
path: root/sys/teken
diff options
context:
space:
mode:
authorBruce Evans <bde@FreeBSD.org>2019-02-05 16:59:29 +0000
committerBruce Evans <bde@FreeBSD.org>2019-02-05 16:59:29 +0000
commit3a19918442bf0cb5c41ac7f7d1217c462a09813f (patch)
tree2d12ddd6494356d588dc94b540e1827b2264c21b /sys/teken
parent6fd2dcd428e13914a1f9a6cbd457befcc655675a (diff)
Notes
Diffstat (limited to 'sys/teken')
-rw-r--r--sys/teken/libteken/teken.319
-rw-r--r--sys/teken/teken.c9
-rw-r--r--sys/teken/teken.h1
3 files changed, 26 insertions, 3 deletions
diff --git a/sys/teken/libteken/teken.3 b/sys/teken/libteken/teken.3
index 3e954470bdd7..2f4a0d8eaf75 100644
--- a/sys/teken/libteken/teken.3
+++ b/sys/teken/libteken/teken.3
@@ -66,6 +66,8 @@
.Fn teken_set_8bit "teken_t *t"
.Ft void
.Fn teken_set_cons25 "teken_t *t"
+.Ft void
+.Fn teken_set_cons25keys "teken_t *t"
.Sh DESCRIPTION
The
.Nm
@@ -194,11 +196,24 @@ which can be used to support character sets like CP437 and ISO-8859-1.
.Pp
The
.Fn teken_set_cons25
-function switches terminal emulation to
+function sets the terminal emulation to
.Dv cons25 ,
-which is used by versions of
+which was the default for
+.Xr syscons 4
+in versions of
.Fx
prior to 9.0.
+This function is only useful for initialization.
+The emulation can be changed at any time using an escape sequence,
+and this function is not used then.
+.Pp
+The
+.Fn teken_set_cons25keys
+function tells the
+.Fn teken_get_sequence
+function to not interpret special keys in
+.Dv cons25
+mode.
.Sh SEE ALSO
.Xr ncurses 3 ,
.Xr termcap 3 ,
diff --git a/sys/teken/teken.c b/sys/teken/teken.c
index f4e4c8a57a2d..64fd42622b5f 100644
--- a/sys/teken/teken.c
+++ b/sys/teken/teken.c
@@ -412,7 +412,14 @@ void
teken_set_cons25(teken_t *t)
{
- t->t_stateflags |= TS_CONS25 | TS_CONS25KEYS;
+ t->t_stateflags |= TS_CONS25;
+}
+
+void
+teken_set_cons25keys(teken_t *t)
+{
+
+ t->t_stateflags |= TS_CONS25KEYS;
}
/*
diff --git a/sys/teken/teken.h b/sys/teken/teken.h
index 5ee2474ed455..0a3928a9ffd1 100644
--- a/sys/teken/teken.h
+++ b/sys/teken/teken.h
@@ -212,6 +212,7 @@ const char *teken_get_sequence(const teken_t *, unsigned int);
/* Legacy features. */
void teken_set_8bit(teken_t *);
void teken_set_cons25(teken_t *);
+void teken_set_cons25keys(teken_t *);
/* Color conversion. */
teken_color_t teken_256to16(teken_color_t);