From owner-freebsd-bugs Sun Jan 21 20:00:09 1996 Return-Path: owner-bugs Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id UAA04196 for bugs-outgoing; Sun, 21 Jan 1996 20:00:09 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id UAA04186 Sun, 21 Jan 1996 20:00:04 -0800 (PST) Resent-Date: Sun, 21 Jan 1996 20:00:04 -0800 (PST) Resent-Message-Id: <199601220400.UAA04186@freefall.freebsd.org> Resent-From: gnats (GNATS Management) Resent-To: freebsd-bugs Resent-Reply-To: FreeBSD-gnats@freefall.FreeBSD.org, adam@ubiq.veda.is Received: from ubiq.veda.is (root@ubiq.veda.is [193.4.230.60]) by freefall.freebsd.org (8.7.3/8.7.3) with ESMTP id TAA04125 for ; Sun, 21 Jan 1996 19:59:15 -0800 (PST) Received: (from adam@localhost) by ubiq.veda.is (8.7.3/8.6.9) id DAA00888; Mon, 22 Jan 1996 03:59:08 GMT Message-Id: <199601220359.DAA00888@ubiq.veda.is> Date: Mon, 22 Jan 1996 03:59:08 GMT From: Adam David Reply-To: adam@ubiq.veda.is To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.2 Subject: bin/961: 'more $file', incorrect CRLF compacting. Sender: owner-bugs@freebsd.org Precedence: bulk >Number: 961 >Category: bin >Synopsis: 'more $file', incorrect CRLF compacting. >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Jan 21 20:00:02 PST 1996 >Last-Modified: >Originator: Adam David >Organization: Veda Internet >Release: FreeBSD 2.2-CURRENT i386 >Environment: >Description: 'more' from a file containing CRLF sequences results in incorrect positioning within the file and the production of spurious output. CR is stripped on input to an internal buffer and the implementation is inconsistent about whether file positions are within the internal buffer or in the underlying file. >How-To-Repeat: Let FILE.DOS be any typical DOS textfile containing CRLF as a line terminator. 'more FILE.DOS' and if it is more than one screenfull go to the end by pressing G. Compare the end of the more output with the output from 'tail FILE.DOS'. >Fix: Strip CR on output from (rather than input to) the internal buffer when input is taken from a regular file. Otherwise, the internal and external file positioning would have to be tracked separately. There seem to be various kludges possible to tidy up the output in the existing implementation, but it is very messy. As a workaround, 'more Audit-Trail: >Unformatted: