?? changelog
字號:
(hash_init): Register src_to_dest_free. * src/copy.c (copy_dir): Now that remember_copied copies the file name, free the temporary `dst_path' allocated here.2001-10-06 Jim Meyering <meyering@lucent.com> 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. * src/du.c (struct entry) [coll_link]: Remove member. (struct htab): Remove. (hash_reset, hash_init, hash_insert2, hash_insert): Remove functions. * src/du.c: 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 Jim Meyering <meyering@lucent.com> Rewrite cp-hash.c to use the functions in lib/hash.c. * src/cp-hash.c (hash_init): Die if hash_initialize fails. * src/cp-hash.c: Rewrite to use the functions in lib/hash.c. * src/cp-hash.h: Update prototype for hash_init. * src/mv.c (do_move): Reflect that hash_init now takes no arguments. * src/install.c (main): Likewise. * src/cp.c (main): Likewise.2001-10-06 Jim Meyering <meyering@lucent.com> * src/copy.c (record_dest): Avoid a small leak.2001-10-06 Jim Meyering <meyering@lucent.com> This decreases the memory footprint a little, when copying hierarchies containing many files. * src/copy.c (copy_internal): Call remember_copied only 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. * tests/mv/childproof: Redirect stderr on one test.2001-10-05 Jim Meyering <meyering@lucent.com> * src/copy.c: Include hash-pjw.h and remove definition of hash_pjw. * src/remove.c: Likewise.2001-10-01 Jim Meyering <meyering@lucent.com> * src/remove.c (hash_pjw): Remove function. * src/copy.c: Likewise.2001-09-29 Jim Meyering <meyering@lucent.com> * src/copy.c (copy_internal): Call record_dest for all types of files (for which this makes sense), not just regular ones. * mkinstalldirs: Update from master. * Makefile.maint (wget-update): Add mkinstalldirs.2001-09-28 Jim Meyering <meyering@lucent.com> This mv command should fail (likewise for cp), rather than silently clobbering one of the source files. rm -rf a b c; mkdir a b c; touch a/f b/f; mv a/f b/f c Reported by Dan Jacobson. * src/cp.c (do_copy): Call dest_info_init if necessary. * src/install.c (main): Likewise. * src/mv.c (main): Likewise. * src/copy.h (dest_info_init): Declare. * src/copy.c: 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. Accept new option: --reply={yes,no,query} * src/cp.c: (enum) [REPLY_OPTION]: Define. (usage): Describe new option. Split long usage string into smaller pieces. (main): Handle new option. * missing: Update from master. * config.guess: Likewise. * config.sub: Likewise. * configure.ac: Tell automake to use the file name `config.hin' rather than the two-`.' config.h.in.2001-09-26 Jim Meyering <meyering@lucent.com> * man/Makefile.am (common_dep): s/configure.in/configure.ac/. * configure.ac: Renamed from configure.in. * INSTALL, mkinstalldirs: Update to autoconf 2.50 version.2001-09-23 Jim Meyering <meyering@lucent.com> * tests/mv/childproof: New test, for the above fix. Based on a report from Dan Jacobson. * tests/mv/Makefile.am (TESTS): Add childproof. * Makefile.am (SUBDIRS): When using newer gettext (in which intl/libintl.h is created by rules intl/Makefile) `intl' must precede `lib'.2001-09-22 Jim Meyering <meyering@lucent.com> Mostly clean-up (modulo the better diagnostic). * src/copy.c (copy_internal): Rename parameter, move_mode, to command_line_arg, and adjust caller. Now, move_mode is a local that is derived from command_line_arg. Factor some involved code to produce something slightly more readable. Use x->move_mode, not move_mode in determining which diagnostic to give (`backing up %s would destroy source; %s not moved').2001-09-16 Paul Eggert <eggert@twinsun.com> * src/ls.c (usage): Fix typo in -g usage. -H now means --dereference-command-line.2001-09-16 Jim Meyering <meyering@lucent.com> * Makefile.am (AUTOMAKE_OPTIONS): Require automake-1.5. * man/Makefile.am (*.1): Depend on *source* files, not binaries. (.x.1): Add code to work around ginstall vs. install exception. * man/Makefile.am (dist_man_MANS): Use dist_man_MANS, not man_MANS.2001-09-15 Jim Meyering <meyering@lucent.com> Convert to a more conventional (e.g., like autoconf) Makefile.am. * man/Makefile.am: Remove hacks. * man/GNUmakefile: Remove file. * man/Makefile.summ: Remove file. * man/Makefile.maint: Remove file. * man/ginstall.x: Remove. Renamed to ... * man/install.x: ... this. New file. Michael Stone reported that man pages weren't built in non-srcdir build. * src/touch.c (EISDIR): Define to 0, if not already defined. (touch): Give a better diagnostic for e.g., `touch /' by non-root. Based on a patch from Michael Stone. Reported by Jeff Sheinberg as Debian bug #101677. * tests/touch/fail-diag: New test, for the above fix. * tests/touch/Makefile.am (TESTS): Add fail-diag. * src/copy.c (copy_internal) [move_mode]: Support the new --reply=... option. (UNWRITABLE): Define (factored out of copy_internal). (copy_internal): Use UNWRITABLE. Accept new option: --reply={yes,no,query} * src/mv.c: Include argmatch.h. (enum) [REPLY_OPTION]: Define. (usage): Describe new option. Split long usage string into smaller pieces. (main): Handle new option. * src/cp.c (main): Reflect renaming: s/I_ON/I_ASK_USER/. * src/copy.h (enum Interactive): Remove members, I_OFF and I_ON. Instead, add I_ALWAYS_YES, I_ALWAYS_NO, and I_ASK_USER. * tests/mv/i-2: Clean up: use priv-check rather than open-coding it.2001-05-11 Paul Eggert <eggert@twinsun.com> * src/chmod.c, src/chown.c, src/mkdir.c, src/rm.c, src/rmdir.c (main): Don't strip trailing slashes; POSIX doesn't allow it here. Don't include "dirname.h" when no longer needed.2001-09-08 Jim Meyering <meyering@lucent.com> * src/copy.c (copy_internal): Add braces around now-multi-stmt if-block. This fixes a bug introduced by my 2001-08-06 change. * tests/mv/i-4: New test, for the above. * tests/mv/Makefile.am (TESTS): Add i-4.2001-09-04 Paul Eggert <eggert@twinsun.com> * src/ls.c (get_link_name): Update use of xreadlink.2001-09-02 Jim Meyering <meyering@lucent.com> * tests/priv-check: Change usage not to use $1. That's not portable to e.g., Solaris2.6's /bin/sh. Communicate via an envvar instead. * tests/mv/i-3: Don't pass an argument to a sourced script. * tests/cp/special-bits: Likewise. * tests/chown/basic: Likewise. * Makefile.maint (alpha): Depend on local-check so that they run a little earlier.2001-09-01 Jim Meyering <meyering@lucent.com> * src/df.c (show_point): Use canonicalize_file_name, if possible. [HAVE_RESOLVEPATH], [!HAVE_RESOLVEPATH]: Use malloc, not alloca, so that these two paths also produce `resolved' in malloc'd storage. Free that memory when done with it. * src/ls.c: Include "xreadlink.h". (get_link_name): Don't use PATH_MAX. Rewrite to use xreadlink.2001-08-30 Paul Eggert <eggert@twinsun.com> * src/chgrp.c: Do not include savedir.h; not used. * src/chown.c: Likewise. * src/chmod.c (change_dir_mode): Remove statp arg; no longer needed. * src/chown-core.c (change_dir_owner): Likewise. * src/du.c (count_entry): Remove st_size argument. * src/copy.c (copy_dir): Likewise.2001-08-30 Paul Eggert <eggert@twinsun.com> * src/copy.c: Include full-write.h. * src/dd.c: Likewise. * src/copy.c (full_write): Remove decl; not needed. * src/dd.c: Likewise. * src/install.c: Likewise. * src/mv.c: Likewise. * src/copy.c (copy_reg): Don't assume read and write size fits in int. * src/dd.c (open_fd): Likewise.2001-08-30 Paul Eggert <eggert@twinsun.com> * src/remove.c (bool): Remove; moved to... * src/system.h: ...here. * src/du.c (count_entry, main): Reflect changes to the exclude functions.2001-08-13 Jim Meyering <meyering@lucent.com> * src/cp.c, src/dd.c, src/ln.c, src/ls.c, src/mv.c (AUTHORS): Mark string for translation, since it contains the English word `and'. * Makefile.maint (author_mark_check): New rule. (local-check): Depend on it. Change the rules governing when mv prompts before removing an existing destination file so it is consistent with POSIX: Now, in the absence of --force (-f), if stdin is a tty and an existing destination is not writable mv will prompt before overwriting the destination file. Reported by Vin Shelton. * src/copy.c (overwrite_prompt): New function. (copy_internal): Separate the mv-specific and non-move_mode code that determines whether to prompt the user. [move_mode]: Don't make mv fail (i.e. don't return 1) just because the user declined to remove one or more of the files. * src/copy.h (enum Interactive): New type. (struct cp_options) [interactive]: Change type to Interactive. (struct cp_options) [stdin_tty]: New member. * src/cp.c (cp_option_init): Adjust initialization of `interactive', and initialize new member, stdin_tty. * src/mv.c (cp_option_init): Likewise. * src/install.c (cp_option_init): Likewise. * src/cp.c (main): Adjust initialization(s) of `interactive', * src/mv.c (main): Likewise. * tests/mv/i-1: Change expected exit status to reflect the above.2001-08-12 Jim Meyering <meyering@lucent.com> * tests/mk-script ($program_name): Define. (main): Use $program_name, rather than long-inaccurate `build-script'. (main): Iterate over the sorted keys (rather than `while...each...'), so this script produces the same output regardless of which version of perl (e.g., perl5.6) is used. Work around non-compliant gettimeofday on Mac OS X 10.0.4, (aka Darwin 1.3.7) that caused the date of the first file listed in long output to be the current time rather than the file's mtime. The real work is in m4/gettimeofday.m4 and the wrapper function, lib/gettimeofday.c. * src/ls.c: Include gtod.h. (main): `Call' GETTIMEOFDAY_INIT. (print_long_format): Add a comment about gettimeofday. Report and diagnosis from Bernhard Baehr. * src/shred.c: Include gtod.h. (main): `Call' GETTIMEOFDAY_INIT, just in case the code ever changes to make it necessary.2001-08-10 Paul Eggert <eggert@twinsun.com> * src/ls.c (print_long_format): Simplify previous patch for listing negative sizes, by adding OFF_T_MAX - OFF_T_MIN + 1 instead of doing a fancy conditional shift. This is simpler and it avoids GCC's bogus compile-time warning about shift counts. (As a bonus, it is portable to hosts that do not use twos-complement arithmetic. :-)2001-08-10 Jim Meyering <meyering@lucent.com> * ls.c (print_long_format): Multiply the shift width by zero to avoid a warning from gcc on hosts with an unsigned type for the st_size member.2001-08-06 Paul Eggert <eggert@twinsun.com> * src/ls.c (print_long_format): If a file size is negative, assume the typical case where it has wrapped around from a positive value.2001-08-07 Jim Meyering <meyering@lucent.com> * Makefile.maint (m4-check): New rule. (local-check): Depend on it.2001-08-06 Jim Meyering <meyering@lucent.com> Fix the bug whereby `mv -uf source dest' would delete source, even though it's older than dest. * src/mv.c (usage): Correct the description of --update. * src/copy.c (copy_internal): Set *rename_succeeded, so that the caller (mv) doesn't remove the source file. Reported by Phelippe Neveu. * tests/mv/update: New test for the above. * tests/mv/Makefile.am (TESTS): Add update.2001-08-05 Jim Meyering <meyering@lucent.com> * tests/root-only: Generalize. Rename to ... * tests/priv-check: ...this. New file. Renamed from the above. * tests/Makefile.am (EXTRA_DIST): Reflect renaming. * tests/mv/i-3: Reflect name and usage changes. * tests/chown/basic: Likewise. * tests/cp/special-bits: Likewise. * tests/sample-test: Likewise.2001-08-04 Jim Meyering <meyering@lucent.com> * tests/root-only: Remove *all* write access, not just that of the owner. * tests/mv/i-3: New test for
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -