Jim Meyering
20522f2f5d
(main): Interpret the old-style +VALUE and -VALUE
...
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-05-31 03:35:32 +00:00
Jim Meyering
59d334f4d4
update Copyright years for 1996
1996-04-24 04:50:53 +00:00
Jim Meyering
5ac0cdbfce
(main): Make separation of case for n_files == 0 more clear.
1996-04-20 03:43:10 +00:00
Jim Meyering
cccb23f01b
(main): Make code clearer: use new variable `n_files' in
...
place of `argc - optind'. Use `file' instead of `argv + optind'.
1996-04-19 03:17:23 +00:00
Jim Meyering
818d29db9b
Call error with EXIT_FAILURE (rather than `1') as first actual parameter.
1996-03-24 16:59:11 +00:00
Jim Meyering
47f70113d4
Exit with status EXIT_SUCCESS or EXIT_FAILURE, rather than 0 or 1.
...
This doesn't change `error (1' calls.
1996-03-24 14:58:01 +00:00
Jim Meyering
adb7c216b2
(main): Declare to be of type int, not void.
1996-03-21 22:41:04 +00:00
Jim Meyering
4229a555fc
Don't include version.h.
...
(main): Use PACKAGE_VERSION instead of version_string.
1996-03-16 22:30:54 +00:00
Jim Meyering
715765a548
(main): Initialize for internationalized message support: call setlocale,
...
bindtextdomain, and textdomain.
1996-03-09 20:19:13 +00:00
Jim Meyering
a468d7579f
(dump_remainder): Flush stdout when tailing-forever on multiple files.
...
From Carlos Canau <Carlos.Canau@relay.puug.pt >.
1996-02-01 05:25:54 +00:00
Jim Meyering
7956c15081
s/non-zero/nonzero/g
1995-11-27 03:09:18 +00:00
Jim Meyering
8831ffbec4
Protoize.
...
Reorder functions to obviate forward dcls.
Remove forward dcls.
1995-10-16 21:30:25 +00:00
Jim Meyering
92c50e7f52
Annotate localizable strings with _(...). From Franc,ois.
1995-08-07 14:57:29 +00:00
Jim Meyering
8c17f50aea
(tail_bytes) [from_start]: For regular files, seek
...
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-27 03:56:35 +00:00
Jim Meyering
ba34723398
(tail): Explicitly cast to long the N_UNITS argumennt in
...
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-07-12 02:59:44 +00:00
Jim Meyering
6ebaf82426
merge with 1.12
1995-06-18 19:33:31 +00:00
Jim Meyering
4657b1e9ec
(main): Remove dcl of and statements that set now-unused variable.
1995-05-28 02:04:55 +00:00
Jim Meyering
a660862d4c
(tail_lines): Change one more long' to off_t'.
...
Otherwise, tail didn't work on NetBSD. From by Arne H. Juul.
1995-05-25 05:09:00 +00:00
Jim Meyering
7cdc7a0bd9
(usage): Include one- or two-line synopsis in --help output.
...
From Karl Berry.
1995-05-13 18:34:54 +00:00
Jim Meyering
eba8aab7f2
add 1995 to Copyright dates
1995-03-09 22:20:59 +00:00
Jim Meyering
7fc638a948
(pipe_lines, pipe_bytes): Use memcpy instead of bcopy.
1995-01-28 13:22:25 +00:00
Jim Meyering
7c141b258d
(main): Update xstrtol calls to be consistent with new decl.
1994-12-22 05:08:40 +00:00
Jim Meyering
398dbbb832
(numerous functions): Give char* filename arguments the const attribute.
1994-12-20 04:27:35 +00:00
Jim Meyering
73d8d0a43f
Include "error.h" instead of simply declaring `void error ();'.
...
(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-16 05:45:57 +00:00
Jim Meyering
f46511eb69
* (<most functions>): Change the type of n_units/n_lines/n_bytes
...
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-12-11 23:53:54 +00:00
Jim Meyering
f2fc6e9054
name changes: number->n_lines|n_bytes
1994-11-30 20:54:21 +00:00
Jim Meyering
53c46c67ac
(dump_remainder): Flush standard output just before
...
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.
1994-11-17 12:49:10 +00:00
Jim Meyering
5d9de33889
Use BUFSIZ instead of BUFSIZE.
1994-11-16 13:13:07 +00:00
Jim Meyering
1423156a9c
merge with 1.9.1j2
1994-11-03 04:33:52 +00:00
Jim Meyering
32340b45e7
(XWRITE): Guard against calling xwrite with n_bytes == 0.
1994-11-01 22:38:11 +00:00
Jim Meyering
7a5462a0b7
(XWRITE): Allow n_bytes to be zero in assertion. Otherwise `tail /dev/null'
...
gets failed assertion.
1994-11-01 22:21:23 +00:00
Jim Meyering
544baf5482
merge with 1.9.1h
1994-10-19 03:39:33 +00:00
Jim Meyering
ec13d92b20
.
1994-09-12 17:35:58 +00:00
Jim Meyering
556cdce5c8
.
1994-05-06 15:28:01 +00:00
Jim Meyering
85842e28eb
.
1994-04-13 17:12:17 +00:00
Jim Meyering
07cd9a8d15
safe_read and full_write + join patch
1994-01-09 03:47:21 +00:00
Jim Meyering
3bc2827212
merge with 1.8h
1993-10-24 20:00:39 +00:00
Jim Meyering
6d920eca0c
merge with 1.8g
1993-10-24 19:04:12 +00:00
Jim Meyering
b869639f46
merge with 1.8d+
1993-10-23 15:37:19 +00:00
Jim Meyering
d1df8c198d
merge with 1.8d
1993-10-21 22:08:53 +00:00
Jim Meyering
712109716a
merge with 1.8a
1993-10-05 18:29:39 +00:00
Jim Meyering
6587c39b3a
merge with 1.5.2
1993-05-22 05:06:39 +00:00
Jim Meyering
2ff4fc1672
add --version and --help
1993-04-29 05:26:22 +00:00
Jim Meyering
b538765547
merge with 1.4
1993-01-20 04:29:09 +00:00
Jim Meyering
38575ad462
Merge with pre-release 1.3.6.
1992-12-10 19:34:55 +00:00
Jim Meyering
d179df1b06
Remove inclusion of <ctype.h> and definitions of is* ctype macros to system.h.
...
Change a few more uses of is* ctype macros to (protected) upper case versions.
1992-12-07 04:54:04 +00:00
Jim Meyering
eb3a2516db
Convert static declarations of struct option to use new macros from
...
getopt.h: no_argument, required_argument, and optional_argument.
1992-12-02 18:31:56 +00:00
Jim Meyering
750bb6aa69
Merged in changes for 1.3.5.
1992-11-19 21:03:49 +00:00
Jim Meyering
925487607c
Declared lots of external functions and variables static.
...
Made several statically-initialized arrays `const'
1992-11-08 20:19:58 +00:00
Jim Meyering
b25038ce9a
Initial revision
1992-11-08 02:50:43 +00:00