2
0
Fork 0
mirror of https://github.com/uutils/coreutils synced 2024-12-15 07:42:48 +00:00
coreutils/fmt
kwantam c9ee0a3e4d 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.
- addressed comments from Arcterus on PR

This is a squash of the following local commits:

 1feceb0 - address comments from Arcterus on PR
 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
2014-06-20 18:59:45 -04:00
..
fmt.rs fmt: correct tab support, better formatting 2014-06-20 18:59:45 -04:00
linebreak.rs fmt: correct tab support, better formatting 2014-06-20 18:59:45 -04:00
parasplit.rs fmt: correct tab support, better formatting 2014-06-20 18:59:45 -04:00