summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2004-06-29(install invocation): Document --target-directory in synopsis, too.Jim Meyering
2004-06-29*** empty log message ***Jim Meyering
2004-06-29Add support for 'install --target-directory', an optionJim Meyering
that has been documented for years but not implemented (!). (TARGET_DIRECTORY_OPTION): New var. (long_options, main, usage): Add --target-directory. (target_directory_operand): New function, stolen from mv.c. (main): Use it. Check for -d and --target-directory. Alter wording of diagnostics to match other programs.
2004-06-29*** empty log message ***Jim Meyering
2004-06-29Don't let verbose-mode output from a subshell obscure actual differences.Jim Meyering
Turn off command-echoing just before invoking subshell, then turn it back on if VERBOSE=yes afterward.
2004-06-28Add a test to verify that we get the newJim Meyering
diagnostic when failing to copy through a symlink-to-inaccessible-dir.
2004-06-28*** empty log message ***Jim Meyering
2004-06-28Don't assume "mv --target=nonexistentdir" will complain about the arg count.Jim Meyering
Adjust to new (briefer) diagnostics.
2004-06-28 Use more-consistent rules among cp, ln, and mv when dealing withJim Meyering
last operands that are (or look like) directories. * src/cp.c (target_directory_operand): New, nearly-common function, It reports an error if the destination appears to be a directory (e.g., because it has a trailing slash) but is not. * src/ln.c, src/mv.c: Likewise. * src/cp.c (do_copy): Use it. * src/ln.c (main): Likewise. * src/mv.c (main): Likewise. * src/cp.c (do_copy): Don't output a usage message because of file problems (e.g., an operand is not a directory). Use it only for syntax. Standardize on "target %s is not a directory" for the diagnostic. * src/ln.c (main): Likewise. * src/mv.c (main): Likewise. * src/cp.c (do_copy): Remove test for trailing slash, since target_directory_operand now does this. * src/ln.c (main): Likewise. * src/mv.c (movefile): Likewise. * src/ln.c (isdir): Remove decl; no longer needed. * src/mv.c (isdir, lstat): Likewise. * src/ln.c (main): Use int to count to argc, not unsigned int. This handles negative operand counts. * src/mv.c (main): Likewise. * src/mv.c (do_move): Don't call hash_init; expect the caller to do it, for consistency with cp.c and ln.c. All callers changed. (movefile): dest_is_dir parameter is now bool, not int. (main): Standardize on "missing destination file operand after %s" for the diagnostic, for consistency with cp.c.
2004-06-28 Use more-consistent rules among cp, ln, and mv when dealing withJim Meyering
last operands that are (or look like) directories. * src/cp.c (target_directory_operand): New, nearly-common function, It reports an error if the destination appears to be a directory (e.g., because it has a trailing slash) but is not. * src/ln.c, src/mv.c: Likewise. * src/cp.c (do_copy): Use it. * src/ln.c (main): Likewise. * src/mv.c (main): Likewise. * src/cp.c (do_copy): Don't output a usage message because of file problems (e.g., an operand is not a directory). Use it only for syntax. Standardize on "target %s is not a directory" for the diagnostic. * src/ln.c (main): Likewise. * src/mv.c (main): Likewise. * src/cp.c (do_copy): Remove test for trailing slash, since target_directory_operand now does this. * src/ln.c (main): Likewise. * src/mv.c (movefile): Likewise. * src/cp.c (main): Reject multiple target directories. Check whether a specified target is a directory when parsing the options, using stat. This gives more-accurate diagnostics. * src/ln.c (main): Likewise. * src/ln.c (isdir): Remove decl; no longer needed. * src/mv.c (isdir, lstat): Likewise. * src/ln.c (do_link): New arg dest_is_dir. All uses changed. Don't check the destination ourself; rely on dest_is_dir. This way we can avoid lstatting the destination in the usual case, and in the worst case we lstat 1, not 3 times. Don't bother to unlink unless link failed; this saves a syscall. Remove unnecessary backup_succeeded flag; it was identical to "dest_backup != NULL". * src/ln.c (main): Use int to count to argc, not unsigned int. This handles negative operand counts. * src/mv.c (main): Likewise.
2004-06-28 Use more-consistent rules among cp, ln, and mv when dealing withJim Meyering
last operands that are (or look like) directories. * src/cp.c (target_directory_operand): New, nearly-common function, It reports an error if the destination appears to be a directory (e.g., because it has a trailing slash) but is not. * src/cp.c (do_copy): Use it. * src/cp.c (do_copy): Don't assume argc is positive. Don't bother to lstat dest, since copy() will do that for us. Use "const" to avoid the need for cast. * src/cp.c (do_copy): Don't output a usage message because of file problems (e.g., an operand is not a directory). Use it only for syntax. Standardize on "target %s is not a directory" for the diagnostic. * src/cp.c (do_copy): Remove test for trailing slash, since target_directory_operand now does this. * src/cp.c (main): Reject multiple target directories. Check whether a specified target is a directory when parsing the options, using stat. This gives more-accurate diagnostics.
2004-06-28(usage): Fix copy+paste error in description ofJim Meyering
--target-directory: s/move/copy/. From Paul Jarc.
2004-06-28*** empty log message ***Jim Meyering
2004-06-28*** empty log message ***Jim Meyering
2004-06-28.Jim Meyering
2004-06-27*** empty log message ***Jim Meyering
2004-06-27See whether a trailing slash is followed too far.Jim Meyering
2004-06-27 Fix a bug: formerly, if d/x was a directory and x a file, "ln xJim Meyering
d/" incorrectly created a link d/x/x. It also saves some system calls. Document the fix.
2004-06-27Fix a bug: formerly, if d/x was a directory and x a file, "ln xJim Meyering
d/" incorrectly created a link d/x/x. It also saves some system calls. (main): Don't append basename to dest if this results in an existing directory name.
2004-06-26put \n in format string, not in actual diagnosticJim Meyering
2004-06-26*** empty log message ***Jim Meyering
2004-06-26(main): When given no arguments, print the standardJim Meyering
"missing operand\nTry printf --help..." message -- to be consistent.
2004-06-26*** empty log message ***Jim Meyering
2004-06-26(main): Add \n at the end of message output via fprintf.Jim Meyering
2004-06-26Add Basque (eu).Jim Meyering
2004-06-26*** empty log message ***Jim Meyering
2004-06-26Add Basque (eu).Jim Meyering
2004-06-25*** empty log message ***Jim Meyering
2004-06-25(gl_AFS): Use AC_ARG_WITH instead of ancient, hard-codedJim Meyering
AC_MSG_CHECKING/AC_MSG_RESULT etc. From Tim Waugh.
2004-06-25*** empty log message ***Jim Meyering
2004-06-25Add test for ln subscript error.Jim Meyering
2004-06-25*** empty log message ***Jim Meyering
2004-06-25(do_link): Remove unnecessary call to lstat.Jim Meyering
(main): Avoid subscript error when the destination is "".
2004-06-24*** empty log message ***Jim Meyering
2004-06-24(obstack_base): Fix parentheses. From Paul Eggert.Jim Meyering
2004-06-23.Jim Meyering
2004-06-23*** empty log message ***Jim Meyering
2004-06-23Replace all occurrences of `(exit N); exit' withJim Meyering
`(exit N); exit N'. Otherwise, those many tests could exit with improper exit status when exiting via e.g., a trapped interrupt. Thanks to a report from Bob Proulx.
2004-06-23*** empty log message ***Jim Meyering
2004-06-23(idle_string, print_user): New arg boottime,Jim Meyering
specifying the most recent boot time. All uses changed. (idle_string) Consider a line to be "old" if it hasn't been used since the last boot time. Watch out for overflow when computing times, and for times in the future. (idle_string): Record latest boot time.
2004-06-22*** empty log message ***Jim Meyering
2004-06-22.Jim Meyering
2004-06-22The 2004-06-19 fix for who and pinky was incomplete, as ctimeJim Meyering
has undefined behavior if the year precedes -999 or follows 9999. Since we have to stop using ctime anyway, we might as well use strftime and fix the FIXME, and support internationalized dates. * src/who.c: Include "hard-locale.h". (time_format, time_format_width): New vars. (time_string, print_line): Use them. (main): Set them. (time_string): Use localtime + strftime instead of ctime, to avoid problems with years before -999 or after 9999. * src/pinky.c: Likewise.
2004-06-22The 2004-06-19 fix for who and pinky was incomplete, as ctimeJim Meyering
has undefined behavior if the year precedes -999 or follows 9999. Since we have to stop using ctime anyway, we might as well use strftime and fix the FIXME, and support internationalized dates. Include "hard-locale.h". (time_format, time_format_width): New vars. (time_string, print_line): Use them. (main): Set them. (time_string): Use localtime + strftime instead of ctime, to avoid problems with years before -999 or after 9999.
2004-06-22*** empty log message ***Jim Meyering
2004-06-22(usage): Correct description of `-t FD'. The fileJim Meyering
descriptor, FD, is no longer optional. Reported by Ton Nijkes.
2004-06-22*** empty log message ***Jim Meyering
2004-06-22*** empty log message ***Jim Meyering
2004-06-22Fix bug: GNU 'ls' didn't count columns correctly if user or groupJim Meyering
names contained multibyte characters where the column count differed from the byte count. This patch also corrects some comments. (format_user_or_group): New function, which counts columns correctly. (format_user, format_group): Use it. (format_user_or_group_width): New function, which counts columns correctly. (format_user_width, format_group_width): Use it.
2004-06-22*** empty log message ***Jim Meyering