From 73a75656f1872be30066976899d91218f11a78d4 Mon Sep 17 00:00:00 2001 From: kstailey Date: Thu, 10 Jul 1997 23:12:20 +0000 Subject: add insert char capability (and no bickering about it being ANSI 8c{)] --- sys/dev/wscons/wscons_emul.c | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'sys/dev/wscons/wscons_emul.c') diff --git a/sys/dev/wscons/wscons_emul.c b/sys/dev/wscons/wscons_emul.c index 2da6f03048b..aafe9fb3d4b 100644 --- a/sys/dev/wscons/wscons_emul.c +++ b/sys/dev/wscons/wscons_emul.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wscons_emul.c,v 1.5 1997/04/08 23:30:26 michaels Exp $ */ +/* $OpenBSD: wscons_emul.c,v 1.6 1997/07/10 23:12:19 kstailey Exp $ */ /* $NetBSD: wscons_emul.c,v 1.7 1996/11/19 05:23:13 cgd Exp $ */ /* @@ -347,6 +347,26 @@ wscons_emul_docontrol(we, c) break; } break; + case '@': /* Insert Char */ + { + int copy_src, copy_dst, copy_ncols; + + n = we->ac_args[0] ? we->ac_args[0] : 1; + n = min(n, we->ac_ncol - we->ac_ccol); + + copy_src = we->ac_ccol; + copy_dst = we->ac_ccol + n; + copy_ncols = we->ac_ncol - copy_src - 1; + if (copy_ncols > 0) + (*we->ac_ef->wef_copycols)(we->ac_efa, + we->ac_crow, copy_src, copy_dst, + copy_ncols); + + (*we->ac_ef->wef_erasecols)(we->ac_efa, + we->ac_crow, we->ac_ccol, + we->ac_ncol - (we->ac_ccol + copy_ncols)); + } + break; } } -- cgit v1.2.3