summaryrefslogtreecommitdiff
path: root/src/tail.c
AgeCommit message (Collapse)Author
1997-10-07update bug-reporting addressJim Meyering
1997-07-22(parse_obsolescent_option): #ifdef-out portability warning.Jim Meyering
1997-07-05(parse_obsolescent_option): If POSIXLY_CORRECT is set, giveJim Meyering
a diagnostic and fail when there are two or more non-option arguments.
1997-02-16Add missing paren.Jim Meyering
1997-02-16(parse_obsolescent_option): Reverse order of args in diagnostic.Jim Meyering
Remove `' quotes in diagnostic. (parse_options): Remove `' quotes in diagnostic.
1997-02-09change wording in messageJim Meyering
1997-02-09update copyrights for 1997Jim Meyering
1997-02-09(parse_obsolescent_option): Give warning diagnostic forJim Meyering
(but now accept) obsolescent usage with more than one file argument.
1997-02-01bracket bug address with <> and append a periodJim Meyering
1997-02-01Compare getopt_long return value against -1, not EOF. Use NULL, not '(int ↵Jim Meyering
*) 0' as last parameter in getopt_long call.
1997-01-27really make the messages identicalJim Meyering
1997-01-26(parse_options): Add quotes to make messages identical.Jim Meyering
1997-01-26(parse_options): Remove unnecessary goto and label.Jim Meyering
1997-01-26(parse_obsolescent_option): Comment.Jim Meyering
1997-01-25.Jim Meyering
1997-01-24(parse_obsolescent_option): Recognize and fail forJim Meyering
more malformed obsolescent options. Makes for better diagnostics.
1997-01-23(parse_options): New function.Jim Meyering
(parse_obsolescent_option): New function. (main): Use the new functions instead of open-coding them. This better fixes the bug in handling obsolescent `+Nc' options. General cleanup.
1997-01-22(main): Properly handle what the POSIX spec callsJim Meyering
the `obsolescent' usage (e.g., tail +2c). It didn't work. Reported by Karl Heuer.
1996-11-03change bug-reporting addressJim Meyering
1996-11-02change bug-reporting addressJim Meyering
1996-10-04(main): update --version output againJim Meyering
1996-10-04(main): update --version output to conform to coding standardJim Meyering
1996-09-02(usage): Tell where to report bugs.Jim Meyering
1996-05-31(main): Interpret the old-style +VALUE and -VALUEJim Meyering
options like -c VALUE and -c +VALUE (resp) when VALUE has one of the [bkm] suffix multipliers. This makes the code consistent with --help output.
1996-04-24update Copyright years for 1996Jim Meyering
1996-04-20(main): Make separation of case for n_files == 0 more clear.Jim Meyering
1996-04-19(main): Make code clearer: use new variable `n_files' inJim Meyering
place of `argc - optind'. Use `file' instead of `argv + optind'.
1996-03-24Call error with EXIT_FAILURE (rather than `1') as first actual parameter.Jim Meyering
1996-03-24Exit with status EXIT_SUCCESS or EXIT_FAILURE, rather than 0 or 1.Jim Meyering
This doesn't change `error (1' calls.
1996-03-21(main): Declare to be of type int, not void.Jim Meyering
1996-03-16Don't include version.h.Jim Meyering
(main): Use PACKAGE_VERSION instead of version_string.
1996-03-09(main): Initialize for internationalized message support: call setlocale,Jim Meyering
bindtextdomain, and textdomain.
1996-02-01(dump_remainder): Flush stdout when tailing-forever on multiple files.Jim Meyering
From Carlos Canau <Carlos.Canau@relay.puug.pt>.
1995-11-27s/non-zero/nonzero/gJim Meyering
1995-10-16Protoize.Jim Meyering
Reorder functions to obviate forward dcls. Remove forward dcls.
1995-08-07Annotate localizable strings with _(...). From Franc,ois.Jim Meyering
1995-07-27(tail_bytes) [from_start]: For regular files, seekJim Meyering
relative to the initial input file pointer position, not necessarily from the beginning of the file. [!from_start]: Don't back up past the initial position of the input file pointer. (tail_lines): Call file_lines only if FD refers to a regular file with its file pointer positioned at beginning of file. Otherwise, call pipe_lines. This is a kludge. Once there's a decent test suite, fix this properly. Before, (echo 1; echo 2) > k; sh -c 'read x; tail' < k would output both lines of the input file even though the first had already been read. Reported by John Roll (john@panic.harvard.edu).
1995-07-12(tail): Explicitly cast to long the N_UNITS argumennt inJim Meyering
call to tail_lines. Otherwise, NetBSD lost because N_UNITS (of type off_t, a 64-bit type on NetBSD) wasn't converted to the target type, long. Reported by Dan Hagerty (hag@gnu.ai.it.edu).
1995-06-18merge with 1.12Jim Meyering
1995-05-28(main): Remove dcl of and statements that set now-unused variable.Jim Meyering
1995-05-25(tail_lines): Change one more `long' to `off_t'.Jim Meyering
Otherwise, tail didn't work on NetBSD. From by Arne H. Juul.
1995-05-13(usage): Include one- or two-line synopsis in --help output.Jim Meyering
From Karl Berry.
1995-03-09add 1995 to Copyright datesJim Meyering
1995-01-28(pipe_lines, pipe_bytes): Use memcpy instead of bcopy.Jim Meyering
1994-12-22(main): Update xstrtol calls to be consistent with new decl.Jim Meyering
1994-12-20(numerous functions): Give char* filename arguments the const attribute.Jim Meyering
1994-12-16Include "error.h" instead of simply declaring `void error ();'.Jim Meyering
(main): Don't advance optarg past leading sign -- otherwise, we'd be making tail accept invalid options like `-+1'. (tail_file): Fix call to error with %s in format, but no corresponding argument.
1994-12-11* (<most functions>): Change the type of n_units/n_lines/n_bytesJim Meyering
to off_t because n_bytes is used as the option to fseek and off_t may be long long (e.g. on BSD4.4). The only place where a 32-bit limit is imposed is in the string-to-integer converstion of xstrtol. (main): Use xstrtol instead of manual string to integer conversion.
1994-11-30name changes: number->n_lines|n_bytesJim Meyering
1994-11-17(dump_remainder): Flush standard output just beforeJim Meyering
sleeping so that `tail -f' will output partial lines sooner. This applies only when following the end of a single file. From Leonard N. Zubkoff <lnz@dandelion.com>. (file_lines, pipe_lines, pipe_bytes, start_bytes, start_lines, dump_remainder): Use STDOUT_FILENO instead of `1' in XWRITE calls.