Bug 19071

Summary: fmt not folding very long lines
Product: Base System Reporter: kannanv <kannanv>
Component: binAssignee: ru <ru>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 3.4-STABLE   
Hardware: Any   
OS: Any   

Description kannanv 2000-06-06 22:00:01 UTC
Given a file containing a very long line as:

$ cat foo
./config ./keys inside/org/113440/reports/index.html outside/org/113440/index.html outside/user/girishc/index.html outside/user/girishc/no outside/user/karaul/index.html outside/user/kvaradhan/index.html outside/user/kvaradhan/doc/index.html outside/user/kvaradhan/doc/dynamics/index.html outside/user/kvaradhan/doc/oscillations/index.html outside/user/kvaradhan/doc/rs_design/index.html outside/user/kvaradhan/doc/thesis/index.html outside/user/murakami/index.html
$ fmt < foo
./config ./keys inside/org/113440/reports/index.html outside/org/113440/index.html outside/user/girishc/index.html outside/user/girishc/no outside/user/karaul/index.html outside/user/kvaradhan/index.html outside/user/kvaradhan/doc/index.html outside/user/kvaradhan/doc/dynamics/index.html outside/user/kvaradhan/doc/oscillations/index.html outside/user/kvaradhan/doc/rs_design/index.html outside/user/kvaradhan/doc/thesis/index.html outside/user/murakami/index.html


Notice that fmt did not fold the lines to within 65-75 columns as is 
documented.

fmt version (by grepping the binary) is:
$FreeBSD: src/usr.bin/fmt/fmt.c,v 1.11.2.1 1999/08/29 15:28:00 peter Exp $

How-To-Repeat: As above.
Comment 1 Poul-Henning Kamp freebsd_committer freebsd_triage 2001-06-02 09:36:19 UTC
Responsible Changed
From-To: freebsd-bugs->ru

I belive that fmt does what it should.  Lines starting with a '.' or a 
known mail header it will not format. 

Assign this to ru@ in a blatant attempt to get him to improve the docs.
Comment 2 ru freebsd_committer freebsd_triage 2001-06-06 11:22:36 UTC
State Changed
From-To: open->closed

The bug of not formatting lines starting with the dot (`.') 
character has been fixed in the new version of the fmt(1) 
utility.  MFC into 4.3-STABLE is planned within two weeks.