Jim Meyering
e2e3a9a41c
(change_file_owner): Don't leak file descriptors when dereferencing symlinks.
2003-07-10 10:59:47 +00:00
Jim Meyering
3a7b7b002d
.
2003-07-09 17:55:29 +00:00
Jim Meyering
83ca2782f9
(xlseek): Avoid warning about ``return without value
...
from function returning non-void''.
2003-07-09 08:54:24 +00:00
Jim Meyering
05731b4717
Add support for a "[" that conforms to the GNU coding standards,
...
i.e., that does not depend on its name.
(LBRACKET): Define to 0 if not defined.
(main): Use LBRACKET rather than argv[0].
----------
(one_argument): Do not check for -t if POSIXLY_CORRECT.
(main): Do not recognize --help or --version if
POSIXLY_CORRECT, when invoked as "test". Handle "[ ]" correctly.
Do not bother testing that margv[margc] is non-null.
2003-07-06 06:12:20 +00:00
Jim Meyering
138fd919b8
(bin_PROGRAMS): Add "[".
...
(__SOURCES): New var.
2003-07-06 06:10:36 +00:00
Jim Meyering
12e8f82540
New file.
2003-07-06 06:08:40 +00:00
Jim Meyering
47dfac7b19
(print_line): Rewrite to use asprintf, in order to be
...
able to avoid emitting trailing blanks.
2003-07-04 12:25:29 +00:00
Jim Meyering
89d9530643
(do_copy): Give a better diagnostic when failing due
...
to nonexistent destination directory. Reported by Dmitry Rutsky.
See http://bugs.debian.org/199730 for details.
2003-07-04 10:01:35 +00:00
Jim Meyering
6e036c0593
tweak comment to fit in 80 columns
2003-06-28 10:30:04 +00:00
Jim Meyering
9e6e479047
split's --verbose option did nothing
...
(longopts): Use `1', not `0' as the value for for &verbose.
2003-06-27 07:41:55 +00:00
Jim Meyering
5fe0d2293d
(copy_internal) [HAVE_STRUCT_STAT_ST_AUTHOR]:
...
Use `error_t' (rather than int) as type for local `err'.
2003-06-19 22:01:47 +00:00
Jim Meyering
f0a5712f74
(copy_internal) [HAVE_STRUCT_STAT_ST_AUTHOR]:
...
Fix author preservation code.
2003-06-19 21:17:48 +00:00
Jim Meyering
0bf9e8687d
(ENABLE_HARD_LINK_TO_SYMLINK_WARNING): Define to 0.
...
(do_link): Don't warn about hard link to symlink.
2003-06-19 11:38:16 +00:00
Jim Meyering
91c698cb2f
Include "getdelim2.h", not "getstr.h".
...
Reflect renaming: getstr -> getdelim2.
2003-06-18 07:59:14 +00:00
Jim Meyering
4f1ec3fd54
Reflect renaming: readline -> readlinebuffer.
2003-06-18 07:37:29 +00:00
Jim Meyering
9ce9757db1
Include sys/types.h before system.h (because
...
the latter includes sys/stat.h). Required on Ultrix 4.3.
2003-06-17 18:39:20 +00:00
Jim Meyering
6bcd4b08ba
(main): Call initialize_main.
2003-06-17 18:13:23 +00:00
Jim Meyering
1844eee69a
(initialize_main): Define.
2003-06-17 18:12:26 +00:00
Jim Meyering
588e9f6a69
Fix for build failure on Ultrix 4.3.
...
Include sys/statvfs.h in preference to sys/vfs.h.
Include sys/param.h and sys/mount.h on ultrix.
2003-06-17 17:40:45 +00:00
Jim Meyering
0d6c9af250
(O_NDELAY, O_NONBLOCK, O_NOCTTY, EISDIR): New definitions.
...
Moved here from touch.c, with one change: define EISDIR to -1, not 0.
2003-06-16 10:46:59 +00:00
Jim Meyering
9253fdd9a2
(O_NDELAY, O_NONBLOCK, O_NOCTTY, EISDIR): Remove definitions.
...
Moved to system.h.
2003-06-16 10:45:18 +00:00
Jim Meyering
b8735ae4a0
(cat): Remove `#ifndef ENOSYS', now that it's
...
guaranteed to be defined.
2003-06-16 09:11:39 +00:00
Jim Meyering
0e79eb8a57
(ENOSYS, ENOTSUP): Define to -1 if not defined.
2003-06-16 09:10:53 +00:00
Jim Meyering
aa85d5d6c7
(touch): Call close only if necessary.
2003-06-12 08:17:49 +00:00
Jim Meyering
92bbc5bbaf
(usage): Correct wording: wc prints counts in the order `newline, word, byte'.
2003-06-12 06:55:57 +00:00
Jim Meyering
3c5cd2319b
.
2003-06-08 17:45:11 +00:00
Jim Meyering
1e006fb1ea
.
2003-06-06 23:04:56 +00:00
Jim Meyering
ec8405327c
(main): Avoid newer 3-arg form of open,
...
so this script works also with e.g., perl5.005_03.
2003-06-06 20:04:39 +00:00
Jim Meyering
da5cbe5ef8
Include <stdbool.h> unconditionally.
2003-06-06 19:17:37 +00:00
Jim Meyering
71bf6b1420
.
2003-06-06 07:04:45 +00:00
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