Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/wscons Add rin, indn, vpa, hpa, and cbt terminfo cap...
details: https://anonhg.NetBSD.org/src/rev/9a8ff79ac51c
branches: trunk
changeset: 373098:9a8ff79ac51c
user: christos <christos%NetBSD.org@localhost>
date: Wed Jan 18 17:02:17 2023 +0000
description:
Add rin, indn, vpa, hpa, and cbt terminfo capabilities (Crystal Kolipe)
diffstat:
sys/dev/wscons/wsemul_vt100_subr.c | 34 +++++++++++++++++++++++++++++++---
1 files changed, 31 insertions(+), 3 deletions(-)
diffs (78 lines):
diff -r 1c7aa35d15d6 -r 9a8ff79ac51c sys/dev/wscons/wsemul_vt100_subr.c
--- a/sys/dev/wscons/wsemul_vt100_subr.c Wed Jan 18 12:58:08 2023 +0000
+++ b/sys/dev/wscons/wsemul_vt100_subr.c Wed Jan 18 17:02:17 2023 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: wsemul_vt100_subr.c,v 1.25 2023/01/09 21:53:44 christos Exp $ */
+/* $NetBSD: wsemul_vt100_subr.c,v 1.26 2023/01/18 17:02:17 christos Exp $ */
/*
* Copyright (c) 1998
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: wsemul_vt100_subr.c,v 1.25 2023/01/09 21:53:44 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wsemul_vt100_subr.c,v 1.26 2023/01/18 17:02:17 christos Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -188,7 +188,7 @@
void
wsemul_vt100_handle_csi(struct vt100base_data *edp, u_char c)
{
- int n, help, flags, fgcol, bgcol;
+ int n, m, help, flags, fgcol, bgcol;
long attr, bkgdattr;
#define A3(a, b, c) (((a) << 16) | ((b) << 8) | (c))
@@ -410,6 +410,9 @@
edp->ccol -= uimin(DEF1_ARG(edp, 0), edp->ccol);
edp->flags &= ~VTFL_LASTCHAR;
break;
+ case 'G': /* CHA */
+ edp->ccol = uimin(DEF1_ARG(edp, 0) - 1, edp->ncols -1);
+ break;
case 'H': /* CUP */
case 'f': /* HVP */
if (edp->flags & VTFL_DECOM)
@@ -445,15 +448,40 @@
COPYCOLS(edp, edp->ccol + n, edp->ccol, help);
ERASECOLS(edp, NCOLS(edp) - n, n, edp->bkgdattr);
break;
+ case 'S': /* SU */
+ wsemul_vt100_scrollup(edp, DEF1_ARG(edp, 0));
+ break;
+ case 'T': /* SD */
+ wsemul_vt100_scrolldown(edp, DEF1_ARG(edp, 0));
+ break;
case 'X': /* ECH erase character */
n = uimin(DEF1_ARG(edp, 0), COLS_LEFT(edp) + 1);
ERASECOLS(edp, edp->ccol, n, edp->bkgdattr);
break;
+ case 'Z': /* CBT */
+ if (edp->ccol == 0)
+ break;
+ for (m = 0; m < DEF1_ARG(edp, 0); m++) {
+ if (edp->tabs) {
+ for (n = edp->ccol - 1; n > 0; n--) {
+ if (edp->tabs[n])
+ break;
+ }
+ } else
+ n = (edp->ccol - 1) & ~7;
+ edp->ccol = n;
+ if (n == 0)
+ break;
+ }
+ break;
case 'c': /* DA primary */
if (ARG(edp, 0) == 0)
wsdisplay_emulinput(edp->cbcookie, WSEMUL_VT_ID1,
sizeof(WSEMUL_VT_ID1) - 1);
break;
+ case 'd': /* VPA */
+ edp->crow = uimin(DEF1_ARG(edp, 0) - 1, edp->nrows - 1);
+ break;
case 'g': /* TBC */
KASSERT(edp->tabs != 0);
switch (ARG(edp, 0)) {
Home |
Main Index |
Thread Index |
Old Index