Commit Graph
4413 Commits
Author SHA1 Message Date
Jim Meyering ac5fc8ea73 Include exclude.h.
(exclude): New static var.
(long_options, usage, main): Add --exclude and --exclude-from or -X.
(count_entry): Skip excluded entries.
1997-12-21 11:47:27 +00:00
Jim Meyering a3e0b4392c (libfu_a_SOURCES): Add exclude.c.
(noinst_HEADERS): Add exclude.h.
1997-12-21 11:46:49 +00:00
Jim Meyering cbd71d8eea . 1997-12-21 11:43:34 +00:00
Jim Meyering a2c7ebd49c . 1997-12-21 11:24:53 +00:00
Jim Meyering 727298f3f5 Use PARAMS, not __P. 1997-12-21 11:22:51 +00:00
Jim Meyering 27d24b46ad (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.
1997-12-21 11:17:20 +00:00
Jim Meyering a2f0f9ac89 s/__P/PARAMS/g 1997-12-16 15:44:00 +00:00
Jim Meyering ece81e9e4a *** empty log message *** 1997-12-16 15:43:01 +00:00
Jim Meyering 70618de21b s/__P/PARAMS/g. 1997-12-16 15:42:48 +00:00
Jim Meyering 589a3c2872 *** empty log message *** 1997-12-16 15:33:33 +00:00
Jim Meyering 03f9f3dbec s/__P/PARAMS/g 1997-12-16 15:32:32 +00:00
Jim Meyering fc22546441 . 1997-12-16 15:16:20 +00:00
Jim Meyering 08b3d2975e *** empty log message *** 1997-12-16 15:13:06 +00:00
Jim Meyering 5d764734f7 tweak indentation 1997-12-16 15:11:23 +00:00
Jim Meyering 36665a7464 (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.
1997-12-16 15:09:19 +00:00
Jim Meyering 1ca40285b2 (deep): Remove `find > k' debugging remnant. 1997-12-15 11:35:22 +00:00
Jim Meyering ce939d6f44 Make sure we get diagnostics in English. 1997-12-14 21:51:44 +00:00
Jim Meyering f126c8d3a1 Remove lseek and memchr dcls. FILEUTILS-3_16g 1997-12-14 16:28:18 +00:00
Jim Meyering 970ffd8520 *** empty log message *** 1997-12-14 16:28:06 +00:00
Jim Meyering 7dcb361c82 *** empty log message *** 1997-12-14 16:25:06 +00:00
Jim Meyering 5867abf11e *** empty log message *** 1997-12-14 15:38:18 +00:00
Jim Meyering 9afbb6eec6 (ASSIGN_STRDUPA): Cast alloca return value to char*. 1997-12-14 15:38:04 +00:00
Jim Meyering ef938e62d0 s/HAVE_DECLARATION_/HAVE_DECL_/. 1997-12-14 15:15:07 +00:00
Jim Meyering e68f7b2e4b cast memcpy to char* 1997-12-14 15:12:29 +00:00
Jim Meyering b1bd801e94 Add #serial 1. 1997-12-14 15:03:38 +00:00
Jim Meyering 56b3459d40 add memchr dcl 1997-12-14 14:00:15 +00:00
Jim Meyering f684c873f7 s/HAVE_DECLARATION/HAVE_DECL_/g 1997-12-14 12:40:33 +00:00
Jim Meyering 7c474bb76f add lseek 1997-12-14 12:03:55 +00:00
Jim Meyering 31c36865e5 *** empty log message *** 1997-12-14 12:03:38 +00:00
Jim Meyering a6c30b90a3 *** empty log message *** 1997-12-14 08:03:18 +00:00
Jim Meyering 386843fd25 s/DECLARATION_/DECL_/g.
Add memchr.
1997-12-14 08:03:07 +00:00
Jim Meyering 457d8d9aef *** empty log message *** 1997-12-14 07:44:38 +00:00
Jim Meyering 15f5e27eaf s/HAVE_DECLARATION_/HAVE_DECL_/g 1997-12-14 07:40:32 +00:00
Jim Meyering 1ac1f811f6 *** empty log message *** 1997-12-13 23:42:54 +00:00
Jim Meyering b86f6c2308 (main): Add some braces.
Check return code from fclose of each input file.
Close stdout and check for errors.
1997-12-13 23:39:09 +00:00
Jim Meyering 444c6da144 (close_output_file): Check ferror before calling fclose.
(main): Close stdout and check for errors.
1997-12-13 23:38:53 +00:00
Jim Meyering 84a050b56f . 1997-12-13 22:56:50 +00:00
Jim Meyering b5697888a0 . 1997-12-13 22:55:52 +00:00
Jim Meyering 8f38e99480 . 1997-12-13 22:54:01 +00:00
Jim Meyering f977e4b5cf 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.
1997-12-13 22:49:33 +00:00
Jim Meyering d75ca19d76 (usage): Mention that `notrunc' is a conv= option.
Reported by Miles Bader.
1997-12-13 17:01:54 +00:00
Jim Meyering 587a9df786 . 1997-12-13 16:23:06 +00:00
Jim Meyering 295372322d (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.
1997-12-13 16:22:58 +00:00
Jim Meyering b2959537e6 *** empty log message *** 1997-12-13 16:13:34 +00:00
Jim Meyering 39546ad7d7 *** empty log message *** 1997-12-11 18:18:22 +00:00
Jim Meyering 322f7b0971 . 1997-12-11 08:40:21 +00:00
Jim Meyering a320eee158 (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.
1997-12-11 08:40:10 +00:00
Jim Meyering 603137e2ab *** empty log message *** 1997-12-10 11:17:16 +00:00
Jim Meyering 4f242b4d51 use NULL, '\0' instead of zeroes 1997-12-10 10:31:25 +00:00
Jim Meyering 3cd84da3a6 (main): Make sure pw->pw_shell is non-NULL before trying to strdup it.
Patch from Dick Streefland.
1997-12-10 10:25:46 +00:00