From 42f661410d8a513800dc49721bd8c0ac164cb502 Mon Sep 17 00:00:00 2001 From: michaels Date: Tue, 8 Apr 1997 23:30:26 +0000 Subject: [PATCH] minor cleanup regarding forward scrolling usage, also only scroll one line at a time rather than 10. (slower, but not so distractingly ugly anymore) --- sys/arch/alpha/wscons/wscons_emul.c | 34 ++++++++--------------------- sys/arch/alpha/wscons/wscons_emul.h | 4 +++- sys/dev/wscons/wscons_emul.c | 34 ++++++++--------------------- sys/dev/wscons/wscons_emul.h | 4 +++- 4 files changed, 24 insertions(+), 52 deletions(-) diff --git a/sys/arch/alpha/wscons/wscons_emul.c b/sys/arch/alpha/wscons/wscons_emul.c index fc40d12638c..2da6f03048b 100644 --- a/sys/arch/alpha/wscons/wscons_emul.c +++ b/sys/arch/alpha/wscons/wscons_emul.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wscons_emul.c,v 1.4 1997/01/24 19:58:31 niklas Exp $ */ +/* $OpenBSD: wscons_emul.c,v 1.5 1997/04/08 23:30:26 michaels Exp $ */ /* $NetBSD: wscons_emul.c,v 1.7 1996/11/19 05:23:13 cgd Exp $ */ /* @@ -130,19 +130,11 @@ wscons_emul_input_normal(we, c) if (we->ac_crow >= we->ac_nrow) panic("wscons_emul: didn't scroll (1)"); #endif - -#if 0 - (*we->ac_ef->wef_copyrows)(we->ac_efa, 1, 0, - we->ac_nrow - 1); + (*we->ac_ef->wef_copyrows)(we->ac_efa, JUMPSCROLL, 0, + we->ac_nrow - JUMPSCROLL); (*we->ac_ef->wef_eraserows)(we->ac_efa, - we->ac_nrow - 1, 1); -#else - (*we->ac_ef->wef_copyrows)(we->ac_efa, 10, 0, - we->ac_nrow - 10); - (*we->ac_ef->wef_eraserows)(we->ac_efa, - we->ac_nrow - 10, 10); - we->ac_crow -= 10 - 1; -#endif + we->ac_nrow - JUMPSCROLL, JUMPSCROLL); + we->ac_crow -= JUMPSCROLL - 1; break; case ASCII_VT: @@ -193,19 +185,11 @@ wscons_emul_input_normal(we, c) panic("wscons_emul: didn't scroll (2)"); #endif -#if 0 - /* scroll all of the rows up one; leave current row # alone */ - (*we->ac_ef->wef_copyrows)(we->ac_efa, 1, 0, - we->ac_nrow - 1); - (*we->ac_ef->wef_eraserows)(we->ac_efa, - we->ac_nrow - 1, 1); -#else - (*we->ac_ef->wef_copyrows)(we->ac_efa, 10, 0, - we->ac_nrow - 10); + (*we->ac_ef->wef_copyrows)(we->ac_efa, JUMPSCROLL, 0, + we->ac_nrow - JUMPSCROLL); (*we->ac_ef->wef_eraserows)(we->ac_efa, - we->ac_nrow - 10, 10); - we->ac_crow -= 10 - 1; -#endif + we->ac_nrow - JUMPSCROLL, JUMPSCROLL); + we->ac_crow -= JUMPSCROLL - 1; break; } diff --git a/sys/arch/alpha/wscons/wscons_emul.h b/sys/arch/alpha/wscons/wscons_emul.h index 12368860050..20c9235b7d7 100644 --- a/sys/arch/alpha/wscons/wscons_emul.h +++ b/sys/arch/alpha/wscons/wscons_emul.h @@ -1,4 +1,4 @@ -/* $OpenBSD: wscons_emul.h,v 1.3 1996/10/30 22:41:49 niklas Exp $ */ +/* $OpenBSD: wscons_emul.h,v 1.4 1997/04/08 23:30:27 michaels Exp $ */ /* $NetBSD: wscons_emul.h,v 1.2 1996/04/12 06:10:32 cgd Exp $ */ /* @@ -46,6 +46,8 @@ struct wscons_emul_data { #define ANSICONS_STATE_HAVEESC 1 /* seen start of ctl seq */ #define ANSICONS_STATE_CONTROL 2 /* processing ctl seq */ +#define JUMPSCROLL 1 /* lines to scroll at once */ + void wscons_emul_attach __P((struct wscons_emul_data *, const struct wscons_odev_spec *)); void wscons_emul_input __P((struct wscons_emul_data *, char *, int)); diff --git a/sys/dev/wscons/wscons_emul.c b/sys/dev/wscons/wscons_emul.c index fc40d12638c..2da6f03048b 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.4 1997/01/24 19:58:31 niklas Exp $ */ +/* $OpenBSD: wscons_emul.c,v 1.5 1997/04/08 23:30:26 michaels Exp $ */ /* $NetBSD: wscons_emul.c,v 1.7 1996/11/19 05:23:13 cgd Exp $ */ /* @@ -130,19 +130,11 @@ wscons_emul_input_normal(we, c) if (we->ac_crow >= we->ac_nrow) panic("wscons_emul: didn't scroll (1)"); #endif - -#if 0 - (*we->ac_ef->wef_copyrows)(we->ac_efa, 1, 0, - we->ac_nrow - 1); + (*we->ac_ef->wef_copyrows)(we->ac_efa, JUMPSCROLL, 0, + we->ac_nrow - JUMPSCROLL); (*we->ac_ef->wef_eraserows)(we->ac_efa, - we->ac_nrow - 1, 1); -#else - (*we->ac_ef->wef_copyrows)(we->ac_efa, 10, 0, - we->ac_nrow - 10); - (*we->ac_ef->wef_eraserows)(we->ac_efa, - we->ac_nrow - 10, 10); - we->ac_crow -= 10 - 1; -#endif + we->ac_nrow - JUMPSCROLL, JUMPSCROLL); + we->ac_crow -= JUMPSCROLL - 1; break; case ASCII_VT: @@ -193,19 +185,11 @@ wscons_emul_input_normal(we, c) panic("wscons_emul: didn't scroll (2)"); #endif -#if 0 - /* scroll all of the rows up one; leave current row # alone */ - (*we->ac_ef->wef_copyrows)(we->ac_efa, 1, 0, - we->ac_nrow - 1); - (*we->ac_ef->wef_eraserows)(we->ac_efa, - we->ac_nrow - 1, 1); -#else - (*we->ac_ef->wef_copyrows)(we->ac_efa, 10, 0, - we->ac_nrow - 10); + (*we->ac_ef->wef_copyrows)(we->ac_efa, JUMPSCROLL, 0, + we->ac_nrow - JUMPSCROLL); (*we->ac_ef->wef_eraserows)(we->ac_efa, - we->ac_nrow - 10, 10); - we->ac_crow -= 10 - 1; -#endif + we->ac_nrow - JUMPSCROLL, JUMPSCROLL); + we->ac_crow -= JUMPSCROLL - 1; break; } diff --git a/sys/dev/wscons/wscons_emul.h b/sys/dev/wscons/wscons_emul.h index 12368860050..20c9235b7d7 100644 --- a/sys/dev/wscons/wscons_emul.h +++ b/sys/dev/wscons/wscons_emul.h @@ -1,4 +1,4 @@ -/* $OpenBSD: wscons_emul.h,v 1.3 1996/10/30 22:41:49 niklas Exp $ */ +/* $OpenBSD: wscons_emul.h,v 1.4 1997/04/08 23:30:27 michaels Exp $ */ /* $NetBSD: wscons_emul.h,v 1.2 1996/04/12 06:10:32 cgd Exp $ */ /* @@ -46,6 +46,8 @@ struct wscons_emul_data { #define ANSICONS_STATE_HAVEESC 1 /* seen start of ctl seq */ #define ANSICONS_STATE_CONTROL 2 /* processing ctl seq */ +#define JUMPSCROLL 1 /* lines to scroll at once */ + void wscons_emul_attach __P((struct wscons_emul_data *, const struct wscons_odev_spec *)); void wscons_emul_input __P((struct wscons_emul_data *, char *, int)); -- 2.20.1