Fix wc(1) output for large files
Previously, we used the System V output format: "%7d%7d%7d %s\n" The problem here is, that if any number has more than six digits, the result looks like one big number, as we don't mandate spaces. POSIX says the output format should rather be "%d %d %d %s\n" but in this case we wouldn't get consistent results. To serve both camps, I changed it to the following: "%6d %6d %6d %s\n" This won't change the output for normal values, but also prevent the output of large files to be ambiguous.master
parent
a392cd475e
commit
79e8e330cb
Loading…
Reference in New Issue