Jim Meyering [Wed, 23 Aug 2000 07:33:28 +0000 (07:33 +0000)]
back out last change
Jim Meyering [Tue, 22 Aug 2000 11:12:06 +0000 (11:12 +0000)]
*** empty log message ***
Jim Meyering [Tue, 22 Aug 2000 11:12:01 +0000 (11:12 +0000)]
Don't even try to use lseek on character devices.
(buggy_lseek_support): New function.
(skip): Use it.
Reported by Martin Gallant via Michael Stone.
Jim Meyering [Tue, 22 Aug 2000 11:05:47 +0000 (11:05 +0000)]
*** empty log message ***
Jim Meyering [Mon, 21 Aug 2000 09:45:52 +0000 (09:45 +0000)]
Clean up traps. Create files in a subdir.
Jim Meyering [Mon, 21 Aug 2000 09:41:56 +0000 (09:41 +0000)]
remove `dir' in trap, too
Jim Meyering [Mon, 21 Aug 2000 09:39:59 +0000 (09:39 +0000)]
use better trap
Jim Meyering [Mon, 21 Aug 2000 05:29:32 +0000 (05:29 +0000)]
*** empty log message ***
Jim Meyering [Mon, 21 Aug 2000 05:15:55 +0000 (05:15 +0000)]
*** empty log message ***
Jim Meyering [Sun, 20 Aug 2000 22:48:42 +0000 (22:48 +0000)]
*** empty log message ***
Jim Meyering [Sun, 20 Aug 2000 22:46:16 +0000 (22:46 +0000)]
remove blank line
Jim Meyering [Sun, 20 Aug 2000 22:46:05 +0000 (22:46 +0000)]
*** empty log message ***
Jim Meyering [Sun, 20 Aug 2000 22:35:52 +0000 (22:35 +0000)]
*** empty log message ***
Jim Meyering [Sun, 20 Aug 2000 21:16:36 +0000 (21:16 +0000)]
.
Jim Meyering [Sun, 20 Aug 2000 21:12:36 +0000 (21:12 +0000)]
New file. From J. David Anglin.
Jim Meyering [Sun, 20 Aug 2000 21:04:38 +0000 (21:04 +0000)]
*** empty log message ***
Jim Meyering [Sun, 20 Aug 2000 21:04:26 +0000 (21:04 +0000)]
*** empty log message ***
Jim Meyering [Sun, 20 Aug 2000 21:04:20 +0000 (21:04 +0000)]
(TESTS): Add cp-HL.
Jim Meyering [Sun, 20 Aug 2000 21:03:48 +0000 (21:03 +0000)]
*** empty log message ***
Jim Meyering [Sun, 20 Aug 2000 21:03:03 +0000 (21:03 +0000)]
*** empty log message ***
Jim Meyering [Sun, 20 Aug 2000 20:50:26 +0000 (20:50 +0000)]
*** empty log message ***
Jim Meyering [Sun, 20 Aug 2000 20:49:58 +0000 (20:49 +0000)]
*** empty log message ***
Jim Meyering [Sun, 20 Aug 2000 20:49:44 +0000 (20:49 +0000)]
(cp_option_init): Initialize to DEREF_ALWAYS, not `1'.
Jim Meyering [Sun, 20 Aug 2000 20:49:34 +0000 (20:49 +0000)]
(cp_option_init): Initialize to DEREF_NEVER, not `0'.
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.