Both `pr -0' and e.g., `pr -03' evoke `column count too large'.
authorJim Meyering <jim@meyering.net>
Tue, 15 Mar 2005 18:05:13 +0000 (18:05 +0000)
committerJim Meyering <jim@meyering.net>
Tue, 15 Mar 2005 18:05:13 +0000 (18:05 +0000)
commit6d9f816b5c21fc8ae9574db21e517a5a3785e41c
tree728774103d7696f53ebb51b11e3c572bb062c61a
parente2938a5d847639dd354bc92fcce51af9e0128d43
Both `pr -0' and e.g., `pr -03' evoke `column count too large'.
`pr -0' should give a better diagnostic and `pr -03' should be
equivalent to `pr -3'.

(parse_column_count): Change return type to void.
Call error (EXIT_FAILURE, ... for an invalid string.
(main): Allocate space for column_count_string using malloc.
Accumulate all old-style column-count digits before converting.
When the number of columns is specified via both old-style,
(e.g., -3), and a long option (--columns=5), ensure that only
the last one specified takes effect.
src/pr.c