Remove arbitrary restrictions on sizes, fixing a bug reported
authorJim Meyering <jim@meyering.net>
Sat, 25 Aug 2001 07:33:20 +0000 (07:33 +0000)
committerJim Meyering <jim@meyering.net>
Sat, 25 Aug 2001 07:33:20 +0000 (07:33 +0000)
commit59d2dceb2c2c8ce3ff1ac9a5cfc4e53d5b4c56af
treed0b2637359d2eb03f709e79b6c5c0c6ba40daab5
parentb087829d9b0eb660d77b5a23c78d756ce42a8a6f
Remove arbitrary restrictions on sizes, fixing a bug reported
by Geoff Whale.

(skip_fields, skip_chars, check_chars): Now size_t, not int.
(size_opt): New function.  Do not arbitrarily reject size zero.
Change the wording of the error message slightly, for convenience.
(find_field): Use size_t, not int, to compute sizes.
(different, main): check_chars==0 is no longer a special case, as
it defaults to SIZE_MAX.
(main): Check for overflow with args like -234234234234234.
Use 'size_opt' to convert optional arguments to sizes.
src/uniq.c