tail -c +N would perform an extra read after encountering EOF
authorJim Meyering <jim@meyering.net>
Sat, 12 Oct 2002 08:39:12 +0000 (08:39 +0000)
committerJim Meyering <jim@meyering.net>
Sat, 12 Oct 2002 08:39:12 +0000 (08:39 +0000)
commit0ddadb624574197d7f2ed5983ee1e9f2cf3678d1
treef6144c5cbde9ec91982e12d819f08654a0f78875
parentfb8af4b59f9b5f7c858bf8449555d3199afcd199
tail -c +N would perform an extra read after encountering EOF
[this change is analogous (bytes vs. lines) to the one of 2002-01-27]

(start_bytes): Detect EOF, inform caller.
(tail_bytes): Upon EOF in start_bytes, return immediately.
(file_lines): Reorganize to use memrchr rather than an explicit loop.
Adapt to new safe_read ABI.
src/tail.c