Change type of n_units, n_bytes, n_lines to be `uintmax_t'.
authorJim Meyering <jim@meyering.net>
Thu, 1 May 2003 16:25:13 +0000 (16:25 +0000)
committerJim Meyering <jim@meyering.net>
Thu, 1 May 2003 16:25:13 +0000 (16:25 +0000)
commitc8e2fca40cf01a523f8061876c94db1907463027
treecebe65e15220e5d81910dc7f3f221741df6a9adc
parent5bc75bf6a03d401d07fb26d8c10cbc503b4c67a8
Change type of n_units, n_bytes, n_lines to be `uintmax_t'.
(dump_remainder): Move two declarations `down' into the scope
where they are used.
(xlseek): Return the resulting offset.
(file_lines): Rename parameter, file_length, to end_pos.
(pipe_lines): Don't coerce safe_read return value to `int'.
Adapt tests accordingly.
(pipe_bytes) [struct charbuffer] (nbytes): Change type from `int'
to `unsigned int'.
Change type of `total_bytes' from `int' to `size_t',
since the former wouldn't always be wide enough.
Don't coerce safe_read return value to `int',
and adapt tests accordingly.
Now that testing for a read error no longer involves
using `tmp', handle that case *after* freeing `tmp'.
(start_bytes): Clean up.
(tail_bytes): Now that `n_bytes' may be larger than
OFF_T_MAX, test for that condition and, if it's true, don't
use lseek optimizations.
(parse_options): Don't fail just because N_UNITS is larger than
the maximum size of a file -- tail may be applied to an input
stream (e.g., a pipe) with more data than that.
src/tail.c