Jim Meyering
e53732b471
Avoid unnecessary copying of environment.
...
(main): Rather than clearing the environment and --
unless told to ignore environment -- copying all settings from
the saved, original environment, clear the environment only when
that is requested. Suggested by Jens Elkner.
2003-06-03 08:29:41 +00:00
Jim Meyering
6b6141eb01
[!TEST_STANDALONE]: Remove #if-0'd block.
...
(STREQ, S_IXUGO): Remove redundant (in system.h) definitions.
2003-06-02 06:58:18 +00:00
Jim Meyering
885d681dff
Always include <string.h>, since we assume C89.
...
Include <limits.h> without checking for HAVE_LIMITS_H.
2003-06-02 06:56:30 +00:00
Jim Meyering
72944b4c69
Avoid a race condition in `tail -f' described by Ken Raeburn in
...
http://mail.gnu.org/archive/html/bug-textutils/2003-05/msg00007.html
(file_lines): Add new parameter, *read_pos, and set it.
(pipe_lines, pipe_bytes, start_bytes, start_lines): Likewise.
(tail_bytes, tail_lines, tail): Likewise.
(tail_file): Use the new `read_pos' value as the size,
rather than stats.st_size from the fstat call.
2003-06-01 18:26:38 +00:00
Jim Meyering
ddfb52fb2f
.
2003-05-29 19:53:52 +00:00
Jim Meyering
95fa743ec4
.
2003-05-28 18:07:17 +00:00
Jim Meyering
38f8cadb9c
Allow expansion of `$file' in the here-
...
document corresponding to comment at the top of fs.h.
2003-05-28 18:05:46 +00:00
Jim Meyering
e4ac725a11
Fix portability problem on FreeBSD5.0: don't include
...
<sys/statvfs.h> on systems without HAVE_STRUCT_STATVFS_F_BASETYPE.
Use #if/#elif/... cascade so we get only one set of include files.
2003-05-26 20:23:14 +00:00
Jim Meyering
55dab17c42
(split_3): Accept the BSD format only when in MD5 mode.
2003-05-24 16:55:37 +00:00
Jim Meyering
75247be90c
(bsd_split_3): New function.
...
(split_3): Detect checksums from BSD 'md5' command and handle them
using bsd_split_3.
2003-05-24 16:51:52 +00:00
Jim Meyering
dadd6992a2
(elide_tail_lines_pipe): Fix a thinko.
...
This sort of thing is why it'd be *Really Good* to factor
out the common code used here and in tail.c.
2003-05-21 09:29:50 +00:00
Jim Meyering
c86a6cc089
(usage): Document new feature: --bytes=-N and --lines=-N.
2003-05-14 14:43:13 +00:00
Jim Meyering
4f821757d2
.
2003-05-14 09:33:42 +00:00
Jim Meyering
85ad1d09c1
(AUTHORS): Enclose string in N_(...), now that it includes `and'.
2003-05-14 09:20:32 +00:00
Jim Meyering
dc7b620a31
(usage): Don't use `,' as the thousands separator
...
in e.g. 1,000,000 and 1,048,576. Instead, do this:
`SIZE may be ..., MB 1000*1000, M 1024*1024 and so on...'
2003-05-14 09:13:26 +00:00
Jim Meyering
e83a04a9d7
(usage): Don't use `,' as the thousands separator
...
in e.g. 1,000,000 and 1,048,576. Instead, do this:
`SIZE may be ..., MB 1000*1000, M 1024*1024 and so on...'
2003-05-14 09:12:43 +00:00
Jim Meyering
ad54994c9b
Fix uniq to conform to POSIX, which requires that "uniq -d -u"
...
must output nothing. Problem reported by Josh Hyman.
(enum output_mode, mode): Remove, replacing with:
(output_unique, output_first_repeated, output_later_repeated):
New vars. All uses of "mode" changed to use these variables,
which are not mutually exclusive as "mode" was.
(writeline): New arg "match", used to control whether to
obey output_first_repeated or output_later_repeated.
All callers changed.
(check_file, main): Adjust to above changes.
2003-05-14 08:34:56 +00:00
Jim Meyering
98e8b5e058
Handle argc < optind.
2003-05-13 17:03:58 +00:00
Jim Meyering
5c0abf663a
(elide_tail_lines_pipe): Don't apply cast to argument of free.
2003-05-13 14:54:31 +00:00
Jim Meyering
3b7798ab52
(struct F_triple) [name]: Remove const attribute.
...
(triple_free): Don't apply cast to argument of free.
(seen_file): Add cast here instead.
2003-05-13 14:45:00 +00:00
Jim Meyering
6fc0245123
(sort): Don't apply cast to argument of free.
2003-05-13 14:43:43 +00:00
Jim Meyering
40b700eadb
(struct Src_to_dest) [name]: Remove const attribute.
...
(src_to_dest_free): Don't apply cast to argument of free.
2003-05-13 14:40:50 +00:00
Jim Meyering
80d799b8a2
(OLD): Don't apply cast to argument of free.
2003-05-13 14:38:40 +00:00
Jim Meyering
2a1e8507f4
(delseq, freeline): Don't apply cast to argument of free.
2003-05-13 14:38:18 +00:00
Jim Meyering
aeec25d170
shorten long line
2003-05-13 14:37:45 +00:00
Jim Meyering
038a9b42a6
(init_fps, init_store_cols): Don't apply cast to argument of free.
2003-05-13 14:37:33 +00:00
Jim Meyering
25227196a8
(zaptemp): Don't apply cast to argument of free.
2003-05-13 14:36:29 +00:00
Jim Meyering
b20134e12c
Remove unnecessary cast of argument to free. twice more
2003-05-13 14:32:10 +00:00
Jim Meyering
949f3a3c76
Remove unnecessary cast of argument to free.
2003-05-13 14:31:39 +00:00
Jim Meyering
26532ef1f2
Include "quote.h".
...
Use quote in diagnostics. Change many error format strings
from just `%s' to e.g., `error reading %s'.
(pipe_lines): Change type of parameter, n_lines, to uintmax_t.
Rewrite newline-counting loop to use memchr.
2003-05-13 13:25:10 +00:00
Jim Meyering
5352c4a62b
(elide_tail_lines_pipe): Use `if', not an assert.
...
Now that assert is no longer used, don't include <assert.h>.
2003-05-13 10:21:13 +00:00
Jim Meyering
8f59417689
Include <assert.h>.
...
(AUTHORS): Add my name.
(elide_tail_lines_pipe): New function.
2003-05-12 09:36:26 +00:00
Jim Meyering
5b5557e3a3
.
2003-05-11 06:35:10 +00:00
Jim Meyering
92f900fdf3
(main): Handle argc < optind.
2003-05-11 06:32:47 +00:00
Jim Meyering
6a0019aa78
(main): Handle argc < optind.
2003-05-10 20:27:56 +00:00
Jim Meyering
4fd6d22880
(main): Handle argc == 0.
2003-05-10 20:27:16 +00:00
Jim Meyering
c2173890f0
(main): Handle argc < optind.
2003-05-10 20:01:32 +00:00
Jim Meyering
9eb8322209
(main): Handle argc == 0.
2003-05-10 20:00:54 +00:00
Jim Meyering
888d3d38d9
Handle argc < optind.
2003-05-10 19:58:04 +00:00
Jim Meyering
a6a4c372c0
(main): Handle argc == 0.
2003-05-10 19:56:49 +00:00
Jim Meyering
74de8e29a8
Handle argc < optind.
2003-05-10 19:56:10 +00:00
Jim Meyering
e2cad9b457
(send_signals): Don't check command line arguments here.
...
(main): Check them here instead. Handle argc < optind.
2003-05-10 15:45:00 +00:00
Jim Meyering
9153514495
Handle argc < optind.
2003-05-10 15:39:39 +00:00
Jim Meyering
f01fcb05a9
Handle argc < optind.
2003-05-10 15:00:00 +00:00
Jim Meyering
9b652d0790
Handle argc < optind.
2003-05-10 14:59:04 +00:00
Jim Meyering
8a7f744635
Handle argc < optind.
2003-05-10 14:58:15 +00:00
Jim Meyering
ddc5610b88
(main): Set program_name before first use.
...
Remove that (redundant) first use.
Don't exit successfully just because --verbose was specified.
Pass 0, not EXIT_SUCCESS, as first argument to error; when that
parameter is 0, error does not exit.
2003-05-10 14:54:23 +00:00
Jim Meyering
f6d13ddf6d
(main): Handle argc < optind.
2003-05-10 14:39:16 +00:00
Jim Meyering
b037820eb4
(main): Handle argc < optind.
2003-05-10 14:37:12 +00:00
Jim Meyering
8eb2464d3e
(main): Handle argc < optind.
2003-05-10 14:33:24 +00:00