summaryrefslogtreecommitdiff
path: root/src/tail.c
AgeCommit message (Collapse)Author
2002-10-12tail -c +N would perform an extra read after encountering EOFJim Meyering
[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.
2002-10-03Mark translatable string with `N_ (...)'.Jim Meyering
2002-09-29(parse_options): Give a sensible diagnostic forJim Meyering
an invalid byte or line count. Reported by Mikko Tuumanen.
2002-09-28(tail_bytes): Change type of bytes_remaining to off_tJim Meyering
to avoid overflow. Reported by Hans Lermen.
2002-09-12Include xnanosleep.h and xstrtod.h.Jim Meyering
Move declaration of global variable, sleep_interval, to ... (main): ...here. (usage): Update description of --sleep-interval option. (tail_forever): New parameter, sleep_interval. Update caller. Use xnanosleep, rather than sleep. (parse_options): New parameter, sleep_interval. Update caller. Use xstrtod, now that we accept floating point values.
2002-08-31Change `exit (0)' to `exit (EXIT_SUCCESS)',Jim Meyering
`exit (1)' to `exit (EXIT_FAILURE)', and `usage (1)' to `usage (EXIT_FAILURE)'.
2002-08-30Change `error (1, ...' to `error (EXIT_FAILURE, ...'.Jim Meyering
2002-08-25(main): Close STDIN_FILENO rather than a literal `0'.Jim Meyering
2002-07-29Adjust command examples in comments to use POSIX 1003.1-2001 option syntax.Jim Meyering
From Paul Eggert.
2002-07-02(usage): Use the PACKAGE_BUGREPORT e-mail address, rather than hard-coding it.Jim Meyering
2002-04-29(tail_forever): Do not treatJim Meyering
max_n_unchanged_stats_between_opens specially (as if it were infinite) if it has its maximal value. Similarly for max_n_consecutive_size_changes_between_opens.
2002-04-29(parse_obsolescent_option): Do not limit the maximumJim Meyering
line/byte count to be less than ULONG_MAX on systems where OFF_T_MAX is larger.
2002-02-16Include posixver.h.Jim Meyering
(usage): Document only the intersection of the old and new behaviors, to encourage portability. (main, parse_obsolescent_option): Parse options using POSIX 1003.1-2001 rules if conforming to that standard. Do not warn of obsolete options.
2002-02-01Add more support for POSIX 1003.1-2001, which requires removal forJim Meyering
support of obsolete "-N" option syntax in expand, head, fold, split, tail, unexpand, uniq, and which prohibits options with optional arguments in od and pr. (parse_obsolescent_option, main): Likewise.
2002-02-01(start_lines): Handle the case in which bytes_read is zero.Jim Meyering
2002-01-27tail -n +2 would perform an extra read after encountering EOFJim Meyering
(start_lines): Detect EOF, inform caller. (tail_lines): Upon EOF in start_lines, return immediately.
2002-01-18(parse_obsolescent_option): Issue a warning for obsolete usage,Jim Meyering
unless POSIXLY_CORRECT.
2002-01-16add 2002 to Copyright lineJim Meyering
2002-01-16Add support for POSIX 1003.1-2001, which requires removal forJim Meyering
support of obsolete "+" option syntax in sort, tail, and uniq. (usage, parse_obsolescent_option): Implement the above.
2001-12-03(usage): Don't split translatable strings in the middle of a sentence.Jim Meyering
2001-12-01Reflect renaming to, and new usage of these macros:Jim Meyering
HELP_OPTION_DESCRIPTION and VERSION_OPTION_DESCRIPTION.
2001-12-01(usage): Use new macros, EMIT_HELP_DESCRIPTION and EMIT_VERSION_DESCRIPTIONJim Meyering
instead of hard-coding --help and --version descriptions.
2001-11-23Factor out some common strings to make translation easier.Jim Meyering
Split usage strings so that --help and --version descriptions are alone in their own string. Likewise for the one that says: Mandatory arguments to long options are mandatory for short options too.
2001-11-20remove FIXME comment about duplicate codeJim Meyering
2001-11-19(xlseek): New function.Jim Meyering
Call it instead of lseek, in most cases, so any failure is reported.
2001-11-17(tail_forever): Add a cast.Jim Meyering
2001-11-14(file_lines): Remove unnecessary cast.Jim Meyering
(tail_lines): Could have called file_lines even though the first lseek failed. Fix that.
2001-11-13split a line that was too longJim Meyering
2001-11-13(file_lines): Add a parameter, start_pos.Jim Meyering
Work properly even when the read pointer is not at beginning of file. (tail_lines): Call file_lines for any regular file, as long as lseek can be used to seek to its end, not just when the initial read pointer is at beginning of file.
2001-11-13(tail_lines): Move declaration of local `length' into scope where it's used.Jim Meyering
(tail_file): Likewise for local `stats'.
2001-11-13`tail /proc/ksyms' would segfault on Linux.Jim Meyering
(tail_lines): Use status of lseek (...SEEK_END) call in deciding whether to call file_lines or pipe_lines. From Herbert Xu.
2001-11-11(xwrite): Remove assertion that size_t N >= 0.Jim Meyering
2001-11-11(usage): Split --help output into smaller pieces.Jim Meyering
Use fputs, not printf.
2001-11-04(usage): Say thatJim Meyering
``Mandatory arguments to long options are mandatory for short options too.\n\''
2001-09-30tail -F would segfaultJim Meyering
(parse_options): Add missing `break;' from last change.
2001-09-12tail: accept new option: -F, equivalent to `--follow=name --retry',Jim Meyering
for compatibility with FreeBSD and NetBSD versions of tail. (usage): Describe new option. (parse_options): Accept it.
2001-07-08(usage): Reformat so help2man generates a properly indented man page.Jim Meyering
2001-05-20(parse_obsolescent_option): Accept a b suffix.Jim Meyering
2001-05-15(parse_obsolescent_option): Use t_count_lines, notJim Meyering
count_lines, in error message.
2001-03-18(usage): Warn that the +N form will be withdrawn.Jim Meyering
2001-01-08whoops. move printf args, tooJim Meyering
2001-01-07Split a string that was longer than 2048 bytes.Jim Meyering
2000-12-03remove instrumentationJim Meyering
2000-12-03add instrumentation to detect some UMRsJim Meyering
2000-12-03(tail_file): Initialize ignore, dev, and ino members,Jim Meyering
when tailing forever and the open failed. Otherwise, we could get uninitialized memory references of those fields in recheck.
2000-12-03(OFF_T_MIN): Remove definition.Jim Meyering
(OFF_T_MAX): Likewise.
2000-12-03(parse_options): Use xstrtoumax to parse the byte and lineJim Meyering
offset. Give a better diagnostic when the requested offset is still representable but larger than OFF_T_MAX.
2000-08-06We know nbytes is 0, so remove it from bail-out test.Jim Meyering
2000-08-06(pipe_lines): Declare local `cp' to be const.Jim Meyering
2000-08-06(pipe_lines): Add variable `nbytes' so we can freeJim Meyering
`tmp' immediately after read loop. Don't process an empty file. This fixes a buffer-underrun error -- also thanks to bounded pointers.