X-Git-Url: https://git.subgeniuskitty.com/unix-history/.git/blobdiff_plain/27704fe4c77e63607f86d8d3399b72a14b1ff5ae..31cef89cb428866f787983e68246030321893df4:/usr/src/cmd/ex/ex_v.c diff --git a/usr/src/cmd/ex/ex_v.c b/usr/src/cmd/ex/ex_v.c index c42808b9f2..be06ec5a7e 100644 --- a/usr/src/cmd/ex/ex_v.c +++ b/usr/src/cmd/ex/ex_v.c @@ -1,4 +1,5 @@ -/* Copyright (c) 1979 Regents of the University of California */ +/* Copyright (c) 1980 Regents of the University of California */ +static char *sccsid = "@(#)ex_v.c 6.1 10/18/80"; #include "ex.h" #include "ex_re.h" #include "ex_tty.h" @@ -53,7 +54,7 @@ oop() { register char *ic; char atube[TUBESIZE + LBSIZE]; - register int f; + register ttymode f; ovbeg(); if (peekchar() == '/') { @@ -128,7 +129,7 @@ ovbeg() } ovend(f) - int f; + ttymode f; { splitw++; @@ -153,7 +154,7 @@ vop() { register int c; char atube[TUBESIZE + LBSIZE]; - register int f; + register ttymode f; if (!CA && UP == NOSTR) { if (initev) { @@ -175,6 +176,11 @@ toopen: goto toopen; error("Visual requires clear screen capability"); } + if (NS && !SF) { + if (initev) + goto toopen; + error("Visual requires scrolling"); + } ovbeg(); bastate = VISUAL; c = 0; @@ -258,6 +264,8 @@ undvis() undap1 = one; undap2 = dol + 1; undkind = UNDALL; + if (undadot <= zero || undadot > dol) + undadot = zero+1; } /* @@ -318,11 +326,11 @@ vok(atube) vtube0 = atube; vclrbyte(atube, WCOLS * (WECHO - ZERO + 1)); for (i = 0; i < ZERO; i++) - vtube[i] = (char *) -20000; + vtube[i] = (char *) 0; for (; i <= WECHO; i++) vtube[i] = atube, atube += WCOLS; for (; i < TUBELINES; i++) - vtube[i] = (char *) -20000; + vtube[i] = (char *) 0; vutmp = atube; vundkind = VNONE; vUNDdot = 0;