uutils/coreutils — pull request #290 by kwantam (2014-06-20 22:47:35+00:00)
Title: fmt: correct tab support, better formatting

In brief:

- Lines no longer end with trailing whitespace.
- fixed length calculation when tabs are present
- word splitting gives more info to the line
breaking process, which should be useful for K-P
- code cleanup here and there
- K-P is not implemented yet. That's next. There
is some dead code in linebreak.rs that forms the
basis for K-P.
- Performance has regressed somewhat; we're now about
60% slower than GNU fmt (formerly about 20%), but we
are basically on par with OpenBSD fmt. After K-P I'll
take another look at this.

This is a squash of the following local commits:

b36aa90 - use word_nchars rather than w.len() for first word
f44a629 - proper tab handling
4f57593 - added tab analysis info to WordInfo
211f4a5 - pass WordInfo by ref
80e14b9 - overhaul word splitting apparatus
d29f2e6 - tidy up the breaking by passing arg struct pointer
d8020df - lines blank save for prefix act as par separators
8bd7f1e - fixed tab behavior in -u
a2387f7 - cleaner prefix handling ; cleanup ; prep for K-P