From owner-freebsd-bugs Fri Aug 10 4:40:10 2001 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 2057737B405 for ; Fri, 10 Aug 2001 04:40:02 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.4/8.11.4) id f7ABe2A89890; Fri, 10 Aug 2001 04:40:02 -0700 (PDT) (envelope-from gnats) Received: from mout0.freenet.de (mout0.freenet.de [194.97.50.131]) by hub.freebsd.org (Postfix) with ESMTP id B6D9037B401 for ; Fri, 10 Aug 2001 04:32:05 -0700 (PDT) (envelope-from nmh@t3x.org) Received: from [194.97.50.144] (helo=mx1.freenet.de) by mout0.freenet.de with esmtp (Exim 3.32 #1) id 15VAWK-0005th-00 for FreeBSD-gnats-submit@freebsd.org; Fri, 10 Aug 2001 13:32:04 +0200 Received: from b85aa.pppool.de ([213.7.133.170]) by mx1.freenet.de with esmtp (Exim 3.32 #1) id 15VAWK-0006If-00 for FreeBSD-gnats-submit@freebsd.org; Fri, 10 Aug 2001 13:32:04 +0200 Message-Id: Date: Fri, 10 Aug 2001 13:34:48 +0200 (CEST) From: Nils M Holm Reply-To: nmh@t3x.org To: FreeBSD-gnats-submit@freebsd.org In-Reply-To: Subject: bin/29601: Re: doscmd INT 10, FNs 0x09,0x0A cause wrong output Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 29601 >Category: bin >Synopsis: doscmd INT 10, FNs 0x09,0x0A cause wrong output >Confidential: yes >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Aug 10 04:40:01 PDT 2001 >Closed-Date: >Last-Modified: >Originator: Nils M Holm >Release: FreeBSD 4.2-RELEASE i386 >Organization: >Environment: >Description: Sorry, my original fix had a side effect and is unusable. Here is an improved one. >How-To-Repeat: >Fix: --- /usr/src/usr.bin/doscmd/doscmd.h.org Fri Aug 10 13:28:30 2001 +++ /usr/src/usr.bin/doscmd/doscmd.h Fri Aug 10 13:26:09 2001 @@ -278,7 +278,7 @@ void tty_move(int, int); void tty_report(int *, int *); void tty_flush(); -void tty_index(); +void tty_index(int); void tty_pause(); int tty_peek(REGISTERS, int); int tty_state(); --- /usr/src/usr.bin/doscmd/tty.c.org Thu Aug 9 19:03:25 2001 +++ /usr/src/usr.bin/doscmd/tty.c Fri Aug 10 13:25:35 2001 @@ -1586,7 +1586,7 @@ } void -tty_index() +tty_index(int scroll) { int i; @@ -1594,9 +1594,11 @@ row = 0; else if (++row >= height) { row = height - 1; - memcpy(vmem, &vmem[width], 2 * width * (height - 1)); - for (i = 0; i < width; ++i) - vmem[(height - 1) * width + i] = vattr | ' '; + if (scroll) { + memcpy(vmem, &vmem[width], 2 * width * (height - 1)); + for (i = 0; i < width; ++i) + vmem[(height - 1) * width + i] = vattr | ' '; + } } SetVREGCur(); } @@ -1639,19 +1641,19 @@ col = (col + 8) & ~0x07; if (col > width) { col = 0; - tty_index(); + tty_index(1); } break; case '\r': col = 0; break; case '\n': - tty_index(); + tty_index(1); break; default: if (col >= width) { col = 0; - tty_index(); + tty_index(1); } if (row > (height - 1)) row = 0; @@ -1676,7 +1678,7 @@ while (n--) { if (col >= width) { col = 0; - tty_index(); + tty_index(0); } if (row > (height - 1)) row = 0; >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message