Article View: net.bugs
Article #233Re: 3 minor 'vi' bugs.
From: W Stevens
Date: Mon, 09 Jul 1984 17:41
Date: Mon, 09 Jul 1984 17:41
28 lines
1411 bytes
1411 bytes
> > The first bug is in the CTRL(b) case of vmain(), line ~= 425 in
> >ex_vmain.c. There are some parentheses missing in the address ...
> >
> > /* original code */
> > addr = dot - vcline - 2 + (cnt-1)*basWLINES;
> > /* modified code */
> > addr = dot - ((vcline - 2) + (cnt-1)*basWLINES);
> I'll have to take exception to this; the correctly modified line
> should be:
>
> addr = dot - vcline - 2 - (cnt-1)*basWLINES;
Wrongo; the first fix is correct. In fact, there's another bug in the
following line, too. The complete fix is:
if (one + vcline != dot && vcnt > 2) {
* addr = dot - vcline + 2 - (cnt-1)*basWLINES;
* forbid (addr <= one);
dot = addr;
vcnt = vcline = 0;
}
--
Scott Stevens
AT&T Consumer Products
Indianapolis, Indiana, USA
UUCP: inuxh!stevens
Technical Details
Message-ID:
<290@inuxh.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!watmath!clyde!burl!ulysses!mhuxl!ihnp4!inuxc!inuxh!stevensReferences:
<43@pixutl.UUCP> <270@voder.UUCP>Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site inuxh.UUCP Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!burl!ulysses!mhuxl!ihnp4!inuxc!inuxh!stevens From: stevens@inuxh.UUCP (W Stevens) Newsgroups: net.bugs Subject: Re: 3 minor 'vi' bugs. Message-ID: <290@inuxh.UUCP> Date: Mon, 9-Jul-84 13:41:33 EDT Article-I.D.: inuxh.290 Posted: Mon Jul 9 13:41:33 1984 Date-Received: Tue, 10-Jul-84 02:00:35 EDT References: <43@pixutl.UUCP> <270@voder.UUCP> Organization: AT&T Consumer Products Div., Indianapolis Lines: 28