Commit Graph

11708 Commits

Author SHA1 Message Date
Jim Meyering
79476921ef (TESTS): Add link-preserve. 2001-10-07 07:47:41 +00:00
Jim Meyering
d34280f171 *** empty log message *** 2001-10-07 07:47:29 +00:00
Jim Meyering
c8987dca56 *** empty log message *** 2001-10-06 21:31:57 +00:00
Jim Meyering
ccdb1b0215 Convert du.c to use the functions in lib/hash.c, not private,
slightly-modified copies of those that used to be in cp-hash.c.

(struct entry) [coll_link]: Remove member.
(struct htab): Remove.
(hash_reset, hash_init, hash_insert2, hash_insert): Remove functions.

Include hash.h and same.h.
(htab): Change type of global to `struct hash';
(entry_hash, entry_compare, hash_ins): New functions.
(count_entry): Use hash_ins instead of hash_insert.
2001-10-06 21:29:19 +00:00
Jim Meyering
bf0b70f10d (hash_init): Die if hash_initialize fails. 2001-10-06 21:25:08 +00:00
Jim Meyering
adac7cd0e3 *** empty log message *** 2001-10-06 17:25:12 +00:00
Jim Meyering
de879011f3 Update prototype for hash_init. 2001-10-06 17:24:58 +00:00
Jim Meyering
f275d7ae99 Rewrite to use the functions in lib/hash.c. 2001-10-06 17:24:10 +00:00
Jim Meyering
f5b2352264 (record_dest): Fix test for whether to free `ent'.
Thank heavens for regression tests.
2001-10-06 17:07:15 +00:00
Jim Meyering
110190e4d9 *** empty log message *** 2001-10-06 16:46:27 +00:00
Jim Meyering
e1b81c9b74 (main): Reflect that hash_init now takes no arguments. 2001-10-06 16:46:06 +00:00
Jim Meyering
3dfa4910e2 (do_move): Reflect that hash_init now takes no arguments. 2001-10-06 16:45:53 +00:00
Jim Meyering
706a45c0b8 (record_dest): Avoid a small leak.
(copy_internal): Call remember_copied only for if the source file
has 1 < st_nlink, or if it's a directory.
Now that EARLIER_FILE is set conditionally, initialize it to NULL.
2001-10-06 16:43:07 +00:00
Jim Meyering
7bdd841fd2 Redirect stderr. 2001-10-06 10:43:07 +00:00
Jim Meyering
6d64ac8442 *** empty log message *** 2001-10-05 11:47:15 +00:00
Jim Meyering
175e677c82 Include hash-pjw.h and remove definition of hash_pjw. 2001-10-05 11:46:57 +00:00
Jim Meyering
8b856a3132 . 2001-10-05 11:45:36 +00:00
Jim Meyering
a97b7f61ff (libfetish_a_SOURCES): Add hash-pjw.c and hash-pjw.h. 2001-10-05 11:45:25 +00:00
Jim Meyering
0b9c7cac74 *** empty log message *** 2001-10-05 11:44:30 +00:00
Jim Meyering
32852d9825 *** empty log message *** 2001-10-04 07:52:44 +00:00
Jim Meyering
63b6a548e1 adjust to use new option-arg name 2001-10-04 07:50:09 +00:00
Jim Meyering
f27c09a303 *** empty log message *** 2001-10-04 07:49:19 +00:00
Jim Meyering
fb4a9133ed Rename --all-repeated argument precede' to prepend'.
* src/uniq.c (enum delimit_method): s/DM_PRECEDE/DM_PREPEND/
and change all uses.
(delimit_method_string): s/precede/prepend/
Patch by Padraig Brady.

* src/uniq.c (usage): Correct typo in description of --all-repeated.
Patch by Padraig Brady.
2001-10-04 07:49:10 +00:00
Jim Meyering
11691bf911 *** empty log message *** 2001-09-30 21:39:54 +00:00
Jim Meyering
034781fc4f (jm_LIST_MOUNTED_FILESYSTEMS): See if
`struct fsstat' has the `f_fstypename' member.
Use that to define FS_TYPE, which is now used to make
the getfsstat link test tighter.
2001-09-30 21:39:51 +00:00
Jim Meyering
2fa9e8e2d9 *** empty log message *** 2001-09-30 21:28:26 +00:00
Jim Meyering
565b41ed31 [MOUNTED_GETFSSTAT]:
Include <sys/ucred.h>, for Apple Darwin.
Include sys/mount.h and sys/fs_types.h only if available.
(FS_TYPE): Define.
(read_filesystem_list): Use FS_TYPE.
2001-09-30 21:28:15 +00:00
Jim Meyering
2570759aa0 *** empty log message *** 2001-09-30 15:38:23 +00:00
Jim Meyering
eb04599224 *** empty log message *** 2001-09-30 11:33:04 +00:00
Jim Meyering
83e51f160b tail -F would segfault
(parse_options): Add missing `break;' from last change.
2001-09-30 11:32:58 +00:00
Jim Meyering
3bf61e47d8 *** empty log message *** 2001-09-30 06:26:57 +00:00
Jim Meyering
1c670cbcd2 (excluded_filename): 0 -> false, since it's a boolean context. 2001-09-30 06:26:46 +00:00
Jim Meyering
82f70b1ed9 *** empty log message *** 2001-09-29 10:30:41 +00:00
Jim Meyering
56a2795f38 *** empty log message *** 2001-09-29 10:29:25 +00:00
Jim Meyering
dd39ed6e81 *** empty log message *** 2001-09-29 10:27:35 +00:00
Jim Meyering
726b66072a (jm_LIST_MOUNTED_FILESYSTEMS)
Check for these headers: sys/param.h sys/ucred.h sys/mount.h
sys/fs_types.h, and make the link-test for getfsstat guard #include
directives with appropriate #if HAVE_*_H tests so that we can
detect getfsstat on Apple Darwin1.3.7 systems.

Also fix harmless typo in cache variable name: s/getsstat/getfsstat/.
2001-09-29 10:27:28 +00:00
Jim Meyering
7bf6b048be *** empty log message *** 2001-09-29 09:37:13 +00:00
Jim Meyering
10a482fd41 (copy_internal): Call record_dest for all types of
files (for which this makes sense), not just regular ones.
2001-09-29 09:35:01 +00:00
Jim Meyering
16de496c5d *** empty log message *** 2001-09-29 08:13:26 +00:00
Jim Meyering
33e8cff715 (jm_LIST_MOUNTED_FILESYSTEMS)
[one-argument getmntent function]): Include stdio.h before mntent.h.
SunOS4.1.x needs it for the declaration of `FILE'.
Patch by Volker Borchert.
2001-09-29 08:13:18 +00:00
Jim Meyering
23eb5e1acd *** empty log message *** 2001-09-29 06:49:35 +00:00
Jim Meyering
900acbdbcb (wget-update): Add mkinstalldirs. 2001-09-29 06:49:25 +00:00
Jim Meyering
45d6772cfe *** empty log message *** 2001-09-28 19:58:37 +00:00
Jim Meyering
fa805211ac *** empty log message *** 2001-09-28 19:55:51 +00:00
Jim Meyering
eca1e2d890 (main): Call dest_info_init if necessary. 2001-09-28 19:55:06 +00:00
Jim Meyering
6027bfa668 (main): Call dest_info_init if necessary. 2001-09-28 19:53:21 +00:00
Jim Meyering
679295f1de (do_copy): Call dest_info_init if necessary. 2001-09-28 19:52:34 +00:00
Jim Meyering
beee918e72 (dest_info_init): Declare. 2001-09-28 19:52:01 +00:00
Jim Meyering
9d0fbdaf36 Include "hash.h" and "same.h".
(struct Dest_info): Define.
(dest_info): Declare global.
(DEST_INFO_INITIAL_CAPACITY): Define.
(hash_pjw): New function.
(dest_info_hash): Likewise.
(dest_info_compare): Likewise.
(dest_info_init): Likewise.
(seen_dest): Likewise.
(record_dest): Likewise.
(copy_internal): If the destination exists, fail if it's in the set
of files that have already been created as part of this mv or cp.
(copy_internal) [move_mode]: Record the destination dev/ino/filename.
(copy_internal) [!move_mode, regular file]: Likewise.
2001-09-28 19:51:19 +00:00
Jim Meyering
e60f34c475 Accept new option: --reply={yes,no,query}
(enum) [REPLY_OPTION]: Define.
(usage): Describe new option.
Split long usage string into smaller pieces.
(main): Handle new option.
2001-09-28 19:43:17 +00:00