X-Git-Url: https://git.subgeniuskitty.com/unix-history/.git/blobdiff_plain/59ae34644c8440e31debf7babcca223e9690b164..7c4625ef998807f077925afb853299edf2fd5202:/usr/src/usr.bin/ex/ex_v.c?ds=inline diff --git a/usr/src/usr.bin/ex/ex_v.c b/usr/src/usr.bin/ex/ex_v.c index c42808b9f2..a0f1ea53b7 100644 --- a/usr/src/usr.bin/ex/ex_v.c +++ b/usr/src/usr.bin/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 4.2 %G%"; #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;