Jim Meyering
1237bc6c72
Change type of global, field_1_bufsize, from int to size_t.
2000-07-01 15:41:01 +00:00
Jim Meyering
81d46d192a
(find_bracketed_repeat): Add a cast to suppress a warning.
2000-06-29 11:15:52 +00:00
Jim Meyering
86956748b1
(enum): Remove comma from end of enumerator list.
...
From Gerhard Poul <gpoul@gnu.org
2000-06-29 10:39:41 +00:00
Jim Meyering
b1b5fb67fc
(count_entry): Don't set errno before
...
invoking savedir, and assume that errno is nonzero if savedir fails.
2000-06-27 13:12:12 +00:00
Jim Meyering
7e2d22e2a6
(copy_dir): Don't set errno before
...
invoking savedir, and assume that errno is nonzero if savedir fails.
2000-06-27 13:11:36 +00:00
Jim Meyering
53ec884edb
(change_dir_mode): Don't set errno before
...
invoking savedir, and assume that errno is nonzero if savedir fails.
2000-06-27 13:10:50 +00:00
Jim Meyering
7aa50cfb3c
(change_dir_owner): Don't set errno before
...
invoking savedir, and assume that errno is nonzero if savedir fails.
2000-06-27 13:10:24 +00:00
Jim Meyering
db0cd2f7e6
(change_dir_group): Don't set errno before
...
invoking savedir, and assume that errno is nonzero if savedir fails.
2000-06-27 13:09:57 +00:00
Jim Meyering
99c1d22a99
(show_dev): Round disk usage percentage up, not to nearest value.
...
Use integer arithmetic if it's easy.
Fix bug when converting twos-complement negative values to floating point.
2000-06-27 06:33:31 +00:00
Jim Meyering
9abfcc500a
`id -Gn' (invoked by groups) would fail without giving a diagnostic
...
on malconfigured systems.
(print_user): Give a diagnostic if number->name lookup fails.
(print_group): Likewise.
2000-06-26 06:32:58 +00:00
Jim Meyering
92ead9886c
(copy_internal): Don't return return immediately after a
...
failed copy_dir call -- otherwise, the failure to read a single file
in a source directory would cause the containing destination directory
not to have owner/perms set properly. Reported by Piotr Kwapulinski.
2000-06-25 15:50:51 +00:00
Jim Meyering
39f35a55d3
tweak copyright
2000-06-24 07:37:55 +00:00
Jim Meyering
a6e6a1e05b
(sysv_sum_file): Avoid overflowing 32-bit accumulator
...
on files larger than 256 MB.
2000-06-24 07:37:44 +00:00
Jim Meyering
62e3f1f1ef
(main): Correct a comment.
2000-06-22 17:10:51 +00:00
Jim Meyering
6b01706633
(getstr): Remove private (and out of date) version of this function.
...
(cut_fields): Adjust caller to use the just-extended one in ../lib.
2000-06-21 09:20:40 +00:00
Jim Meyering
e1e0683c82
(valid_options): Don't segfault on `stty erase -'.
2000-06-21 07:29:03 +00:00
Jim Meyering
b1c4d0148a
(main): Fix off-by-argc test, so +N-style options are recognized once again.
...
Reported by Geoff Keunning.
Fix typo in diagnostic: s/compare/skip/.
2000-06-20 06:46:28 +00:00
Jim Meyering
a6b9441450
(print_size): Round disk usage up.
2000-06-16 12:50:27 +00:00
Jim Meyering
78362b9aa4
(print_dir, gobble_file, print_long_format, print_file_name_and_frills):
...
Round disk usage up.
2000-06-16 12:49:52 +00:00
Jim Meyering
f570d032b4
(df_readable): New arg for rounding style.
...
Round negative numbers correctly.
(show_dev): Round disk usage up and disk free space down.
2000-06-16 12:49:20 +00:00
Jim Meyering
2795faa36f
(copy_reg): Give a slightly better diagnostic.
2000-06-16 12:47:36 +00:00
Jim Meyering
3e9e02727b
(main): Give the correct diagnostic when using the
...
--target-dir=DIR option, but no arguments.
Patch from Michael Stone. Reported by herbert@gondor.apana.org.au .
2000-06-12 06:09:32 +00:00
Jim Meyering
98a1d5e72a
(show_point) [HAVE_REALPATH && !HAVE_RESOLVEPATH]:
...
Cast undeclared `realpath' to char* to avoid warning.
2000-06-04 06:51:46 +00:00
Jim Meyering
b662dfc657
Allow -v as synonym for --verbose, to be consistent with other fileutils.
2000-06-03 08:11:08 +00:00
Jim Meyering
8cb9b753c5
Allow -v as synonym for --verbose, to be consistent with other fileutils.
2000-06-03 08:10:37 +00:00
Jim Meyering
2d5e52c70d
(usage): Document that -v is a synonym for --verbose.
2000-06-03 08:09:53 +00:00
Jim Meyering
f06a2374fd
Allow `cp -d -u' to copy one symlink onto another that's identical.
...
(copy_internal): Change the || to ^ in the big sameness
test, so copying one symlink onto another, identical one doesn't fail here.
If the symlink call fails, don't report the failure if the destination
already exists and is a symlink pointing to the proper name.
2000-05-29 21:05:07 +00:00
Jim Meyering
d73513786d
Arrange to call close_stdout upon exit.
...
Don't close stdout explicitly.
(usage): Add missing backslash at end of line.
(write_header): Remove now-unused COMMENT parameter.
Update all callers.
2000-05-27 21:17:39 +00:00
Jim Meyering
8ccf29f7fe
Arrange to call close_stdout upon exit.
...
Don't close stdout explicitly. Replace uses of global constant,
output_desc, with uses of STDOUT_FILENO.
2000-05-27 21:14:26 +00:00
Jim Meyering
87da84ba81
(close_stdout_wrapper): Don't dereference NULL pointer.
...
From Bob Proulx.
2000-05-25 07:14:13 +00:00
Jim Meyering
449fa131d6
(head_file): Use STDIN_FILENO in place of `0'.
...
(main): Likewise.
2000-05-24 07:10:12 +00:00
Jim Meyering
24f2bd8c9f
Arrange to call close_stdout upon exit. Don't close stdout explicitly.
2000-05-20 22:06:38 +00:00
Jim Meyering
ac81803363
Arrange to call close_stdout upon exit. Don't close stdout explicitly.
2000-05-20 22:04:40 +00:00
Jim Meyering
b2c7c6055d
Arrange to call close_stdout upon exit. Don't close stdout explicitly.
2000-05-20 22:04:16 +00:00
Jim Meyering
c75dc9689e
Arrange to call close_stdout upon exit. Don't close stdout explicitly.
2000-05-20 22:03:55 +00:00
Jim Meyering
02f7878928
Arrange to call close_stdout upon exit. Don't close stdout explicitly.
...
(but set exit status and file name, too)
2000-05-20 22:03:12 +00:00
Jim Meyering
8f8938e366
add format args to match new %lu directives
2000-05-20 15:37:26 +00:00
Jim Meyering
15ecc0f435
tweak warning diagnostic
2000-05-20 12:41:13 +00:00
Jim Meyering
5c34a06b45
(struct File_spec) [have_device, st_dev]: New members
2000-05-20 09:23:41 +00:00
Jim Meyering
f5fb72e12c
Save device number as well as inode number for each directory.
...
(struct active_dir_ent) [st_dev]: New member.
[st_ino]: Rename from `inum'.
(make_active_dir_ent) [device]: New parameter.
(hash_compare_active_dir_ents): Compare using SAME_INODE macro.
(fspec_init_common): New function, factored out.
(fspec_init_file): Initialize have_device member.
(fspec_get_full_mode): Remove parameter. Update caller.
Set have_device and st_dev members.
2000-05-20 09:23:27 +00:00
Jim Meyering
b55a5cc86c
(rm): Combine adjacent fputc and fprintf.
2000-05-18 21:10:55 +00:00
Jim Meyering
4d453f5691
remove some parens from some cpp lines
2000-05-18 14:56:42 +00:00
Jim Meyering
9d67112156
(remove_dir): Detect (and fail upon) attempt to subvert a running `rm -r'.
...
Reported by Morten Welinder.
2000-05-18 14:49:34 +00:00
Jim Meyering
1ca5f870b6
tweak comment
2000-05-17 12:19:39 +00:00
Jim Meyering
f13c5ee9ce
(do_link): Use complete strings in diagnostics so they
...
are easier to translate. Reported by Michel Robitaille.
(main): Drop support for the case in which S_ISLNK wasn't defined.
It was broken in any case.
2000-05-15 20:41:52 +00:00
Jim Meyering
81b16373ae
Arrange to call close_stdout only upon exit.
2000-05-13 06:49:53 +00:00
Jim Meyering
47827e2ec2
Include closeout.h.
...
(usage): Don't call close_stdout here.
(close_stdout_wrapper): New, kludgey, function and file-scoped global.
(main): Register it with atexit.
2000-05-13 06:46:55 +00:00
Jim Meyering
30c412049f
Detect and report write failure of --help/--version.
2000-05-12 22:38:58 +00:00
Jim Meyering
fc64ba37d4
(copy_internal): Fix force and interactive tests.
2000-05-12 20:40:39 +00:00
Jim Meyering
a5c02a198b
Unlike for mv, -i doesn't cancel the effect of -f
...
and -f doesn't cancel the effect of -i.
(main) ['f']: Don't reset `x.interactive'.
['i']: Don't reset `x.force'.
2000-05-12 20:39:34 +00:00