Jim Meyering [Sun, 21 Dec 1997 12:05:42 +0000 (12:05 +0000)]
Include exclude.h.
(exclude): New static var.
(long_options, usage, main): Add --exclude and --exclude-from or -X.
(count_entry): Skip excluded entries.
Jim Meyering [Sun, 21 Dec 1997 11:47:27 +0000 (11:47 +0000)]
Include exclude.h.
(exclude): New static var.
(long_options, usage, main): Add --exclude and --exclude-from or -X.
(count_entry): Skip excluded entries.
Jim Meyering [Sun, 21 Dec 1997 11:17:20 +0000 (11:17 +0000)]
(rpl_chown): Rename from chown.
Undefine chown just after including config.h.
Include sys/stat.h.
Use correct ordering of uid and gid parameters both in function
definition and in call to chown.
With patches from Kaveh Ghazi.
Jim Meyering [Tue, 16 Dec 1997 15:09:19 +0000 (15:09 +0000)]
(struct bin_str): Make len int, not unsigned, to avoid
bogus comparison < 0.
(quote_filename): Add forward decl.
(decode_switches): -b, -e, -N, -Q are now mutually exclusive.
(print_dir): Quote directory name as per quoting options.
(print_long_format): Don't count color changes as part of file name.
(quote_filename): Revamp interface: now accepts stream to output to
and filename, and returns length of quoted filename.
This removes duplicated code and should make errors less likely.
Also, no longer mallocs storage. All callers changed.
Don't quote ' ' if -Q.
(OUTCHAR): New macro.
(SAVECHAR, SAVE_2_CHARS): Remove.
(print_name_with_quoting): New stack arg. All callers changed.
(print_color_indicator): Cast ext len to size_t to avoid warning
with GCC 2.8.
(length_of_file_name_and_frills): Rewrite to use quote_filename.
This fixes bug when computing file name length with -e.
1997-12-14 Paul Eggert <eggert@twinsun.com>
Add shell style quoting, and make it the default.
* NEWS, doc/fileutils.texi: Describe -e, which is now the default.
Describe change to --dired output.
* src/ls.c (quote_shell): New var.
(long_options, decode_switches, usage): New option -e or --quote-shell.
(dired_dump_obstack): New arg STYLE.
(main): Pass quoting style to dired_dump_obstack.
(decode_switches): -N now clears quote_as_string.
(quote_filename): Add shell style quoting.
Jim Meyering [Sat, 13 Dec 1997 22:49:33 +0000 (22:49 +0000)]
Change --help output to tell the truth: that for of=FILE,
FILE *is* truncated. Reported by Miles Bader.
Remove incomplete, usage-like comment at top of file.
Jim Meyering [Sat, 13 Dec 1997 16:22:58 +0000 (16:22 +0000)]
(do_move): If rename fails for any reason (not just when
errno == EXDEV), then revert to trying copy-then-unlink. This is
necessary to allow moving files within certain types of Linux NFS
mounted filesystems. Reported by Marty Leisner.
Jim Meyering [Thu, 11 Dec 1997 08:40:10 +0000 (08:40 +0000)]
(do_link): Don't require --force when target exists and
using --backup. This changes makes ln consistent with cp and mv in
this respect. Suggestion from Eli Zaretskii.