aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/syscons/teken
diff options
context:
space:
mode:
authorEd Schouten <ed@FreeBSD.org>2009-01-05 22:09:46 +0000
committerEd Schouten <ed@FreeBSD.org>2009-01-05 22:09:46 +0000
commit2056b4c79b951a166d6bf6a9a721d159172a5b3e (patch)
tree4aeaa7ab97a422c07c361474120deed02fe903e6 /sys/dev/syscons/teken
parent6811e5d4747e2d71773b5b808b45678e551876a4 (diff)
Notes
Diffstat (limited to 'sys/dev/syscons/teken')
-rw-r--r--sys/dev/syscons/teken/teken.c3
-rw-r--r--sys/dev/syscons/teken/teken_demo.c4
-rw-r--r--sys/dev/syscons/teken/teken_subr.h18
3 files changed, 25 insertions, 0 deletions
diff --git a/sys/dev/syscons/teken/teken.c b/sys/dev/syscons/teken/teken.c
index b3c8bd42592d..62ded2741b96 100644
--- a/sys/dev/syscons/teken/teken.c
+++ b/sys/dev/syscons/teken/teken.c
@@ -226,6 +226,9 @@ teken_input_char(teken_t *t, teken_char_t c)
case '\x0B':
teken_subr_newline(t);
break;
+ case '\x0C':
+ teken_subr_newpage(t);
+ break;
case '\r':
teken_subr_carriage_return(t);
break;
diff --git a/sys/dev/syscons/teken/teken_demo.c b/sys/dev/syscons/teken/teken_demo.c
index acea4f7f099e..2d0a4bf3ad51 100644
--- a/sys/dev/syscons/teken/teken_demo.c
+++ b/sys/dev/syscons/teken/teken_demo.c
@@ -279,7 +279,11 @@ main(int argc __unused, char *argv[] __unused)
perror("forkpty");
exit(1);
case 0:
+#ifdef TEKEN_CONS25
setenv("TERM", "cons25", 1);
+#else /* !TEKEN_CONS25 */
+ setenv("TERM", "xterm", 1);
+#endif /* TEKEN_CONS25 */
#ifdef TEKEN_UTF8
setenv("LC_CTYPE", "UTF-8", 0);
#endif /* TEKEN_UTF8 */
diff --git a/sys/dev/syscons/teken/teken_subr.h b/sys/dev/syscons/teken/teken_subr.h
index 328858640b94..f26dc890d7a0 100644
--- a/sys/dev/syscons/teken/teken_subr.h
+++ b/sys/dev/syscons/teken/teken_subr.h
@@ -662,6 +662,24 @@ teken_subr_newline(teken_t *t)
}
static void
+teken_subr_newpage(teken_t *t)
+{
+#ifdef TEKEN_CONS25
+ teken_rect_t tr;
+
+ tr.tr_begin.tp_row = tr.tr_begin.tp_col = 0;
+ tr.tr_end = t->t_winsize;
+ teken_funcs_fill(t, &tr, BLANK, &t->t_curattr);
+
+ t->t_cursor.tp_row = t->t_cursor.tp_col = 0;
+ teken_funcs_cursor(t);
+#else /* !TEKEN_CONS25 */
+
+ teken_subr_newline(t);
+#endif /* TEKEN_CONS25 */
+}
+
+static void
teken_subr_next_line(teken_t *t)
{