From adam@ubiq.veda.is  Sun Jan 21 19:59:23 1996
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 <FreeBSD-gnats-submit@freebsd.org>; 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 <adam@ubiq.veda.is>
Reply-To: adam@ubiq.veda.is
To: FreeBSD-gnats-submit@freebsd.org
Subject: 'more $file', incorrect CRLF compacting.
X-Send-Pr-Version: 3.2

>Number:         961
>Category:       bin
>Synopsis:       'more $file', incorrect CRLF compacting.
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    hoek
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Jan 21 20:00:02 PST 1996
>Closed-Date:    Thu Apr 29 11:03:54 PDT 1999
>Last-Modified:  Thu Apr 29 11:04:22 PDT 1999
>Originator:     Adam David
>Release:        FreeBSD 2.2-CURRENT i386
>Organization:
Veda Internet
>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 <FILE.DOS' gives unmangled output.
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->suspended 
State-Changed-By: phk 
State-Changed-When: Mon Apr 13 01:38:47 PDT 1998 
State-Changed-Why:  
-> suspended 

From: ac199@hwcn.org
To: freebsd-gnats-submit@freebsd.org, adam@ubiq.veda.is
Cc:  Subject: Re:bin/961:'more$file',incorrectCRLFcompacting.
Date: Mon, 13 Apr 1998 12:09:11 -0400 (EDT)

 >        As a workaround, 'more &lt;FILE.DOS' gives unmangled output.
 
 Note that an inferior work-around is documented in more.1 as of Rev 1.3.
 
 
State-Changed-From-To: suspended->open 
State-Changed-By: hoek 
State-Changed-When: Sat Jul 18 16:55:29 PDT 1998 
State-Changed-Why:  
This sounds familiar.  I think I just assigned the PR containing a fix 
to myself (assigned to myself, that is). 


Responsible-Changed-From-To: freebsd-bugs->hoek 
Responsible-Changed-By: hoek 
Responsible-Changed-When: Sat Jul 18 16:55:29 PDT 1998 
Responsible-Changed-Why:  
Ooops.  See above "Why did the state change?". 
. 
State-Changed-From-To: open->closed 
State-Changed-By: hoek 
State-Changed-When: Thu Apr 29 11:03:54 PDT 1999 
State-Changed-Why:  
Fixed in -current.  Merge to -stable pending. 
>Unformatted:
