uniq: simplify and fix unlikely bug by using bool
commita72b7823b455a3bab85d5b6a09e6ff884cb2842a
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 15 Nov 2023 22:57:17 +0000 (15 14:57 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 16 Nov 2023 19:37:25 +0000 (16 11:37 -0800)
tree6ce035231810c45080d9b5531a856354a4696b38
parenta257b63ce7ebcc4577adb5406b39fc0edd61dcac
uniq: simplify and fix unlikely bug by using bool

* src/uniq.c (enum countmode): Remove this type.
(count_occurrences): New static var, replacing the old countmode,
and of type boolean instead of a two-value enum type that was
confusing (and which caused a hard-to-test bug when the count
exceeded INTMAX_MAX - 1).  All uses changed.
src/uniq.c