summaryrefslogtreecommitdiff
path: root/sys/teken
diff options
context:
space:
mode:
authorAleksandr Rybalko <ray@FreeBSD.org>2013-12-05 22:38:53 +0000
committerAleksandr Rybalko <ray@FreeBSD.org>2013-12-05 22:38:53 +0000
commit27cf7d04ef5416dc7fcbf43bc8147463b0d87848 (patch)
treecabbc6887418a71db40d81447b13028cd381a016 /sys/teken
parent5c79f1f9dfd51a469179fe11902da447dde75b0e (diff)
Notes
Diffstat (limited to 'sys/teken')
-rw-r--r--sys/teken/teken.c8
-rw-r--r--sys/teken/teken.h1
-rw-r--r--sys/teken/teken_subr.h9
3 files changed, 18 insertions, 0 deletions
diff --git a/sys/teken/teken.c b/sys/teken/teken.c
index 8ca88d23815d..a54c9f96e044 100644
--- a/sys/teken/teken.c
+++ b/sys/teken/teken.c
@@ -347,6 +347,14 @@ teken_set_winsize(teken_t *t, const teken_pos_t *p)
}
void
+teken_set_winsize_noreset(teken_t *t, const teken_pos_t *p)
+{
+
+ t->t_winsize = *p;
+ teken_subr_do_resize(t);
+}
+
+void
teken_set_8bit(teken_t *t)
{
diff --git a/sys/teken/teken.h b/sys/teken/teken.h
index 2feef6e0ddba..a9bca98e9669 100644
--- a/sys/teken/teken.h
+++ b/sys/teken/teken.h
@@ -168,6 +168,7 @@ void teken_set_cursor(teken_t *, const teken_pos_t *);
void teken_set_curattr(teken_t *, const teken_attr_t *);
void teken_set_defattr(teken_t *, const teken_attr_t *);
void teken_set_winsize(teken_t *, const teken_pos_t *);
+void teken_set_winsize_noreset(teken_t *, const teken_pos_t *);
/* Key input escape sequences. */
#define TKEY_UP 0x00
diff --git a/sys/teken/teken_subr.h b/sys/teken/teken_subr.h
index 64f4e5456bf2..f25ab6aa34d0 100644
--- a/sys/teken/teken_subr.h
+++ b/sys/teken/teken_subr.h
@@ -956,6 +956,15 @@ teken_subr_reset_mode(teken_t *t, unsigned int cmd)
}
static void
+teken_subr_do_resize(teken_t *t)
+{
+
+ t->t_scrollreg.ts_begin = 0;
+ t->t_scrollreg.ts_end = t->t_winsize.tp_row;
+ t->t_originreg = t->t_scrollreg;
+}
+
+static void
teken_subr_do_reset(teken_t *t)
{