wc: ensure we update file offset
commitce630dfc7ef32ff7e35c627bd061a45ce9053d9d
authorPádraig Brady <P@draigBrady.com>
Sun, 5 Feb 2023 19:52:31 +0000 (5 19:52 +0000)
committerPádraig Brady <P@draigBrady.com>
Sat, 8 Apr 2023 11:19:40 +0000 (8 12:19 +0100)
treee198bd7070f7ce510498c61af2243096e4913104
parentf6c21f6d3addb6461c41af612e73fbb15d21545f
wc: ensure we update file offset

* src/wc.c (wc): Update the offset when not reading,
and do read if we can't update the offset.
* tests/misc/wc-proc.sh: Add a test case.
* NEWS: Mention the bug fix.
Fixes https://bugs.gnu.org/61300
NEWS
src/wc.c
tests/misc/wc-proc.sh