* src/tail.c (struct File_spec): New member read_pos, replacing
size, since the value was really a read position not a size.
All uses changed.
(xlseek): Move defn up.
(record_open_fd): If the read_pos (formerly) size arg is unknown,
compute it here if it is a regular file.
(file_lines): Return the resulting read pos (or -1 on failure)
instead of storing it via a pointer. Caller changed.
Simplify by using SEEK_CUR instead of SEEK_SET when that is easy.
Avoid reading the same data twice when there are not enough
lines in the file.
(pipe_lines): Return -2 on success, -1 on failure, rather than
updating a read pos via a pointer (which was weird for pipes anyway).
Caller changed.
(pipe_bytes, tail_bytes, tail_lines, tail):
Return -1 on failure, a file offset if known, and < -1 otherwise,
instead of storing a file offset via a pointer. Caller changed.
(pipe_bytes): Take initial file offset as an arg, or -1 if unknown.
(start_bytes, start_lines): Return -1 (not 1) on error, -2 (not
-1) on EOF, and do not accept pointer to read pos as an arg since
neither we nor our caller know the read pos. Callers changed.
(recheck): Do not assume a newly-opened file is at offset zero,
as this is not always true on Solaris.
(tail_forever, check_fspec): Use dump_remainder result only
on regular files, to prevent (very unlikely) overflow.
(tail_file): Remove no-longer-needed TAIL_TEST_SLEEP code.