Jim Meyering [Sun, 20 Aug 2000 20:48:57 +0000 (20:48 +0000)]
(long_opts): Add --dereference, -L.
(usage): Describe -L and -H.
(cp_option_init): Initialize to DEREF_UNDEFINED, not `1'.
(main): Add `H' and `-L' to getopt spec string.
[case 'a']: Initialize `dereference' to DEREF_NEVER, not 0.
[case 'd']: Likewise.
[case 'H']: New case.
[case 'L']: New case.
[case 'R']: Don't set dereference to `0' here.
If it's not yet defined, set x.dereference to DEREF_NEVER
if -R was specified, else set it to DEREF_ALWAYS.
Set x.xstat accordingly for -H.
Jim Meyering [Sun, 20 Aug 2000 20:48:45 +0000 (20:48 +0000)]
Declare lstat.
(copy_dir): Set `xstat' member to lstat so that with `-H' we don't
follow symlinks found via recursive traversal.
Update uses of `dereference' to compare against new enum member names.
Jim Meyering [Sun, 20 Aug 2000 20:35:25 +0000 (20:35 +0000)]
(enum Dereference_symlink): Define.
(struct cp_options) [dereference]: Change type to Dereference_symlink.
Jim Meyering [Sun, 20 Aug 2000 16:48:02 +0000 (16:48 +0000)]
.
Jim Meyering [Sun, 20 Aug 2000 15:56:43 +0000 (15:56 +0000)]
.
Jim Meyering [Sun, 20 Aug 2000 15:56:11 +0000 (15:56 +0000)]
.
Jim Meyering [Sun, 20 Aug 2000 12:45:35 +0000 (12:45 +0000)]
*** empty log message ***
Jim Meyering [Sun, 20 Aug 2000 12:45:31 +0000 (12:45 +0000)]
Include utmp.h `#if HAVE_UTMP_H', rather than
`#if !HAVE_UTMPX_H'. The latter would lose on systems with neither
utmp.h nor utmpx.h. Reported by Eli Zaretskii.
Jim Meyering [Sun, 20 Aug 2000 09:55:23 +0000 (09:55 +0000)]
(print_totals): Rename global from opt_combined_arguments.
Jim Meyering [Sat, 19 Aug 2000 11:09:03 +0000 (11:09 +0000)]
fix my grammar error in last change
Jim Meyering [Sat, 19 Aug 2000 11:07:46 +0000 (11:07 +0000)]
*** empty log message ***
Jim Meyering [Sat, 19 Aug 2000 11:07:37 +0000 (11:07 +0000)]
*** empty log message ***
Jim Meyering [Sat, 19 Aug 2000 11:07:32 +0000 (11:07 +0000)]
(writeline): Correct comments.
From Bruno Haible.
Jim Meyering [Fri, 18 Aug 2000 07:08:34 +0000 (07:08 +0000)]
*** empty log message ***
Jim Meyering [Fri, 18 Aug 2000 07:08:04 +0000 (07:08 +0000)]
(DO_CHOWN): Do not make a special case for non-root.
POSIX.2 requires that cp -p and mv attempt to set the uid of the
destination file, even if you're not root. This affects behavior
only on hosts that let you give files away via chmod.
Jim Meyering [Tue, 15 Aug 2000 13:12:57 +0000 (13:12 +0000)]
*** empty log message ***
Jim Meyering [Tue, 15 Aug 2000 13:12:48 +0000 (13:12 +0000)]
Add tests for just-fixed bug.
Jim Meyering [Tue, 15 Aug 2000 13:08:31 +0000 (13:08 +0000)]
*** empty log message ***
Jim Meyering [Tue, 15 Aug 2000 13:08:06 +0000 (13:08 +0000)]
*** empty log message ***
Jim Meyering [Tue, 15 Aug 2000 13:07:40 +0000 (13:07 +0000)]
*** empty log message ***
Jim Meyering [Tue, 15 Aug 2000 13:05:21 +0000 (13:05 +0000)]
*** empty log message ***
Jim Meyering [Tue, 15 Aug 2000 13:05:03 +0000 (13:05 +0000)]
(count_entry): Remember the current directory also for `.'
and `..'. Reported by Stephen Smoogen, based on a patch from H.J. Lu.
Jim Meyering [Mon, 14 Aug 2000 21:42:45 +0000 (21:42 +0000)]
*** empty log message ***
Jim Meyering [Mon, 14 Aug 2000 21:40:30 +0000 (21:40 +0000)]
remove incorrect FIXME comment.
Jim Meyering [Mon, 14 Aug 2000 09:58:58 +0000 (09:58 +0000)]
*** empty log message ***
Jim Meyering [Mon, 14 Aug 2000 09:58:25 +0000 (09:58 +0000)]
(copy_reg): Move declaration of local, `n_read', into
the scope where it's used.
(copy_internal): In calling copy_reg, pass not the raw `src_mode',
but the possibly-umask-relative mode, `get_dest_mode (x, src_mode)'.
Jim Meyering [Sun, 13 Aug 2000 13:13:25 +0000 (13:13 +0000)]
(copy_reg): Add comment.
Jim Meyering [Sun, 13 Aug 2000 13:05:16 +0000 (13:05 +0000)]
*** empty log message ***
Jim Meyering [Sun, 13 Aug 2000 13:04:52 +0000 (13:04 +0000)]
*** empty log message ***
Jim Meyering [Sun, 13 Aug 2000 13:04:27 +0000 (13:04 +0000)]
*** empty log message ***
Jim Meyering [Sun, 13 Aug 2000 13:03:41 +0000 (13:03 +0000)]
*** empty log message ***
Jim Meyering [Sun, 13 Aug 2000 13:03:13 +0000 (13:03 +0000)]
*** empty log message ***
Jim Meyering [Sun, 13 Aug 2000 13:03:07 +0000 (13:03 +0000)]
(get_dest_mode): Rename from new_nondir_mode.
Honor the umask for `cp', but not for `mv' or `cp -p'.
(copy_reg): New 4th parameter, dst_mode. Pass it as 3rd arg. to open.
(copy_internal): Change type of locals `src_mode' and `src_type' from
int to mode_t.
Remove unnecessary local `fix_mode'.
Combine two if-stmts into one.
Pass `src_mode' as 4th arg to copy_reg.
If we've just created a new regular file, return early, skipping the
chmod step. copy_reg now sets permissions of such files upon creation.
Use get_dest_mode, so there's just one chmod call here.
Jim Meyering [Sat, 12 Aug 2000 13:27:29 +0000 (13:27 +0000)]
Use jm_FUNC_UNLINK_BUSY_TEXT.
Jim Meyering [Sat, 12 Aug 2000 13:25:33 +0000 (13:25 +0000)]
*** empty log message ***
Jim Meyering [Sat, 12 Aug 2000 13:24:44 +0000 (13:24 +0000)]
.
Jim Meyering [Sat, 12 Aug 2000 13:24:31 +0000 (13:24 +0000)]
(TESTS): Add perm.
Jim Meyering [Sat, 12 Aug 2000 13:23:18 +0000 (13:23 +0000)]
*** empty log message ***
Jim Meyering [Sat, 12 Aug 2000 13:22:59 +0000 (13:22 +0000)]
Remove test for the VERSION_CONTROL and/or
SIMPLE_BACKUP_SUFFIX envvars. Source ../envvar-check instead.
Jim Meyering [Sat, 12 Aug 2000 13:22:19 +0000 (13:22 +0000)]
Remove test for the VERSION_CONTROL and/or
SIMPLE_BACKUP_SUFFIX envvars. Source ../envvar-check instead.
Jim Meyering [Sat, 12 Aug 2000 13:21:47 +0000 (13:21 +0000)]
Remove test for the VERSION_CONTROL and/or
SIMPLE_BACKUP_SUFFIX envvars. Source ../envvar-check instead.
Jim Meyering [Sat, 12 Aug 2000 13:21:13 +0000 (13:21 +0000)]
Remove test for the VERSION_CONTROL and/or
SIMPLE_BACKUP_SUFFIX envvars. Source ../envvar-check instead.
Jim Meyering [Sat, 12 Aug 2000 13:19:27 +0000 (13:19 +0000)]
*** empty log message ***
Jim Meyering [Sat, 12 Aug 2000 07:24:27 +0000 (07:24 +0000)]
*** empty log message ***
Jim Meyering [Sat, 12 Aug 2000 06:17:33 +0000 (06:17 +0000)]
.
Jim Meyering [Sat, 12 Aug 2000 05:50:21 +0000 (05:50 +0000)]
*** empty log message ***
Jim Meyering [Sat, 12 Aug 2000 05:16:40 +0000 (05:16 +0000)]
*** empty log message ***
Jim Meyering [Sat, 12 Aug 2000 04:59:31 +0000 (04:59 +0000)]
tweak the `whether...' message
Jim Meyering [Sat, 12 Aug 2000 04:57:18 +0000 (04:57 +0000)]
(jm_FUNC_UNLINK_BUSY_TEXT): New file/macro.
From J. David Anglin.
Jim Meyering [Fri, 11 Aug 2000 20:59:57 +0000 (20:59 +0000)]
*** empty log message ***
Jim Meyering [Fri, 11 Aug 2000 20:59:49 +0000 (20:59 +0000)]
Portable shell scripts should specify global options before key fields.
Move global LC_CTYPE remark to each sort option that depends on LC_CTYPE.
sort -g depends on LC_NUMERIC.
Add @vindex where it's missing.
"radix character" -> "decimal-point character", to match Standard C
terminology, which is easier for most people to follow.
"comm" does not consider trailing newlines to be significant.
Jim Meyering [Fri, 11 Aug 2000 09:20:36 +0000 (09:20 +0000)]
*** empty log message ***
Jim Meyering [Fri, 11 Aug 2000 09:20:31 +0000 (09:20 +0000)]
Add support for multi-byte locales.
(iswprint, mbrtowc, wcwidth): Provide default definitions.
(total_bytes): New variable.
(print_bytes): New variable.
(longopts): Change abbreviation for --chars from 'c' to 'm'.
(usage): Update.
(write_counts): Add `bytes' argument.
(wc): New variables `bytes', `count_bytes', `count_chars',
`count_complicated'. The old code determines `bytes', not `chars'.
New case for MB_CUR_MAX > 1. A non-printable non-space character does
not increment the line position or start a word. Update `total_bytes'.
(main): Initialize `print_bytes' and `total_bytes' to 0. Accept 'm'
option. Pass `total_bytes' to write_counts.
Jim Meyering [Fri, 11 Aug 2000 09:13:00 +0000 (09:13 +0000)]
*** empty log message ***
Jim Meyering [Fri, 11 Aug 2000 09:12:47 +0000 (09:12 +0000)]
(usage): Describe -d and -i in a locale-independent way.
Jim Meyering [Fri, 11 Aug 2000 09:12:05 +0000 (09:12 +0000)]
(usage): Don't describe System V syntax, as it doesn't always work.
Jim Meyering [Fri, 11 Aug 2000 09:11:20 +0000 (09:11 +0000)]
Recommend against the System V syntax
for tr ranges, and don't use it in examples. Use POSIX
classes rather than ranges, for portability.
Jim Meyering [Fri, 11 Aug 2000 09:10:22 +0000 (09:10 +0000)]
(wc invocation): Update accordingly.
Jim Meyering [Tue, 8 Aug 2000 10:53:28 +0000 (10:53 +0000)]
*** empty log message ***
Jim Meyering [Tue, 8 Aug 2000 10:53:23 +0000 (10:53 +0000)]
(movefile): Invoke xalloc_die instead of printing our own message.
Jim Meyering [Tue, 8 Aug 2000 07:16:45 +0000 (07:16 +0000)]
*** empty log message ***
Jim Meyering [Tue, 8 Aug 2000 07:13:46 +0000 (07:13 +0000)]
*** empty log message ***
Jim Meyering [Tue, 8 Aug 2000 07:13:36 +0000 (07:13 +0000)]
(remove_cwd_entries, rm): Invoke xalloc_die instead of printing our own message.
Jim Meyering [Tue, 8 Aug 2000 07:12:24 +0000 (07:12 +0000)]
(main): Invoke xalloc_die instead of printing our own message.
Jim Meyering [Tue, 8 Aug 2000 07:11:46 +0000 (07:11 +0000)]
(do_link): Invoke xalloc_die instead of printing our own message.
Jim Meyering [Tue, 8 Aug 2000 07:11:30 +0000 (07:11 +0000)]
(main): Invoke xalloc_die instead of printing our own message.
Jim Meyering [Tue, 8 Aug 2000 07:11:12 +0000 (07:11 +0000)]
(xstrndup): Invoke xalloc_die instead of printing our own message.
Jim Meyering [Tue, 8 Aug 2000 07:10:22 +0000 (07:10 +0000)]
*** empty log message ***
Jim Meyering [Tue, 8 Aug 2000 07:09:31 +0000 (07:09 +0000)]
(cut_fields): Invoke xalloc_die instead of printing our own message.
(cut_fields): Check for I/O error as well as end-of-file.
Jim Meyering [Tue, 8 Aug 2000 07:08:17 +0000 (07:08 +0000)]
(copy_dir, copy_internal): Invoke xalloc_die instead of printing our own message.
Jim Meyering [Tue, 8 Aug 2000 07:07:55 +0000 (07:07 +0000)]
(main): Invoke xalloc_die instead of printing our own message.
Jim Meyering [Tue, 8 Aug 2000 07:03:41 +0000 (07:03 +0000)]
(quotearg_colon, xmalloc): "virtual memory exhausted" -> "memory exhausted"
Jim Meyering [Tue, 8 Aug 2000 06:55:47 +0000 (06:55 +0000)]
(usage, main): For cp -P messages, mention the new behavior as well as the old.
Jim Meyering [Tue, 8 Aug 2000 06:53:14 +0000 (06:53 +0000)]
Invoke xalloc_die instead of printing our own message.
Jim Meyering [Mon, 7 Aug 2000 17:07:19 +0000 (17:07 +0000)]
*** empty log message ***
Jim Meyering [Mon, 7 Aug 2000 17:06:38 +0000 (17:06 +0000)]
(xalloc_msg_memory_exhausted): Now char const[],
not char *const and pointing to a constant array.
(xrealloc): Comment fix.
Jim Meyering [Mon, 7 Aug 2000 17:05:37 +0000 (17:05 +0000)]
(print_and_abort): Use "memory exhausted", not "virtual memory exhausted".
Jim Meyering [Mon, 7 Aug 2000 17:03:20 +0000 (17:03 +0000)]
comment fix
Jim Meyering [Mon, 7 Aug 2000 17:02:15 +0000 (17:02 +0000)]
(xalloc_msg_memory_exhausted): Now char const[],
not char *const and pointing to a constant array.
Jim Meyering [Mon, 7 Aug 2000 16:56:29 +0000 (16:56 +0000)]
(same_name): Invoke xalloc_die instead of printing our own message.
(parse_user_spec):
Don't translate a message until just before returning,
to avoid unnecessary translation.
Jim Meyering [Mon, 7 Aug 2000 16:55:57 +0000 (16:55 +0000)]
(same_name): Invoke xalloc_die instead of printing our own message.
Jim Meyering [Mon, 7 Aug 2000 16:50:27 +0000 (16:50 +0000)]
*** empty log message ***
Jim Meyering [Mon, 7 Aug 2000 16:50:11 +0000 (16:50 +0000)]
(xputenv): Invoke xalloc_die instead of printing our own message.
Jim Meyering [Mon, 7 Aug 2000 15:51:08 +0000 (15:51 +0000)]
*** empty log message ***
Jim Meyering [Mon, 7 Aug 2000 15:48:18 +0000 (15:48 +0000)]
back out Copyright date changes for files with no changes year
Jim Meyering [Mon, 7 Aug 2000 13:27:40 +0000 (13:27 +0000)]
*** empty log message ***
Jim Meyering [Mon, 7 Aug 2000 13:27:33 +0000 (13:27 +0000)]
*** empty log message ***
Jim Meyering [Mon, 7 Aug 2000 13:27:24 +0000 (13:27 +0000)]
(head): Call write_header here.
(head_file): ... not here.
Jim Meyering [Mon, 7 Aug 2000 13:23:44 +0000 (13:23 +0000)]
(closeout_func): Remove variable.
(close_stdout_wrapper): Remove unused function.
(main): Remove assignment to closeout_func.
Jim Meyering [Mon, 7 Aug 2000 13:19:52 +0000 (13:19 +0000)]
(fold_file): Remove ferror(stdout) check, already done in close_stdout.
Jim Meyering [Mon, 7 Aug 2000 08:57:11 +0000 (08:57 +0000)]
*** empty log message ***
Jim Meyering [Mon, 7 Aug 2000 08:55:50 +0000 (08:55 +0000)]
(enum) [PARENTS_OPTION]: New member.
(long_opts): Update "parents" and deprecated "path" entries to use
`PARENTS_OPTION', not `P'.
(usage): Update --help output.
(main): Warn that the meaning of `-P' will soon change.
Jim Meyering [Mon, 7 Aug 2000 08:18:32 +0000 (08:18 +0000)]
*** empty log message ***
Jim Meyering [Mon, 7 Aug 2000 07:15:31 +0000 (07:15 +0000)]
*** empty log message ***
Jim Meyering [Mon, 7 Aug 2000 07:15:25 +0000 (07:15 +0000)]
(AC_MBSTATE_T): Define mbstate_t to be int,
not char, for compatibility with glibc 2.1.3 strftime.c.
Jim Meyering [Mon, 7 Aug 2000 07:07:00 +0000 (07:07 +0000)]
(usage): Warn more succintly about the effects of
the locale on sort order.
Jim Meyering [Sun, 6 Aug 2000 19:54:55 +0000 (19:54 +0000)]
*** empty log message ***
Jim Meyering [Sun, 6 Aug 2000 19:09:08 +0000 (19:09 +0000)]
.
Jim Meyering [Sun, 6 Aug 2000 16:12:42 +0000 (16:12 +0000)]
*** empty log message ***
Jim Meyering [Sun, 6 Aug 2000 15:08:29 +0000 (15:08 +0000)]
We know nbytes is 0, so remove it from bail-out test.