Hi
Michael Forney <mforney_AT_mforney.org> wrote:
> [...]
>
> This leaves issue 1, which makes me wonder about the point of the
> field widths if they aren't for alignment of the output. If we don't
> care about alignment, I think we should just use "%zu %zu %zu %s\n".
> If we do care about the alignment, we should use fixed widths similar
> to the original code, like "%6zu %6zu %6zu %s\n". But now we've come
> full circle, which makes me wonder what POSIX compliance issue commit
> 39802832 was meant to fix. Is the leading whitespace for the first
> field a problem? If so, I don't think trying for alignment makes sense
I assume it's the leading whitespace that was the problem since here[0]
the output format is given as
"%d %d %d %s\n", <newlines>, <words>, <bytes>, <file>
Considering this and that [0] doesn't mention anything about alignment,
just having "%zu %zu %zu %s\n" as before seems like the right choice.
Cheers,
Silvan
[0]
https://pubs.opengroup.org/onlinepubs/9699919799/
Received on Sun Nov 03 2019 - 11:30:39 CET