minor cleanup regarding forward scrolling usage, also only scroll one line
authormichaels <michaels@openbsd.org>
Tue, 8 Apr 1997 23:30:26 +0000 (23:30 +0000)
committermichaels <michaels@openbsd.org>
Tue, 8 Apr 1997 23:30:26 +0000 (23:30 +0000)
at a time rather than 10.  (slower, but not so distractingly ugly anymore)

sys/arch/alpha/wscons/wscons_emul.c
sys/arch/alpha/wscons/wscons_emul.h
sys/dev/wscons/wscons_emul.c
sys/dev/wscons/wscons_emul.h

index fc40d12..2da6f03 100644 (file)
@@ -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;
        }
 
index 1236886..20c9235 100644 (file)
@@ -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));
index fc40d12..2da6f03 100644 (file)
@@ -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;
        }
 
index 1236886..20c9235 100644 (file)
@@ -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));