column: fix -l
The original implementation is complicated and broken.
It's possible to calculate the rest of the string (for the last
column) from the current position rather than calculate it
continuously. Use the last wcstok() result also means that it will
work as expected independently on "greedy" mode (skips repeating
separators.
# printf 'a b c d\n1 2 3 4\n' | ./column -t -o '|' -l3
a|b|c d
1|2|3 4
(see space between 'a' and 'b' on input)
References:
8ac75e31de0ece74515e98e0b22e54cc0a9808bd
Fixes: https://github.com/util-linux/util-linux/issues/1763
Signed-off-by: Karel Zak <kzak@redhat.com>