Jim Meyering [Sat, 28 Oct 1995 21:01:01 +0000 (21:01 +0000)]
(md5_check): Use the same message format when the single file has a
read error or checksum mismatch as when there are more.
Write diagnostic to stderr, not stdout.
Jim Meyering [Sat, 28 Oct 1995 05:52:24 +0000 (05:52 +0000)]
New option --reference=FILE (-r FILE) analogous to the
like-named touch option.
(main): Recognize it and give diagnostic for misuse.
(usage): Describe briefly.
From Franc,ois Pinard.
(batch_convert): Close input stream also when it's not stdin.
(main): Reorganize to do option-consistency checks before all else.
Jim Meyering [Fri, 20 Oct 1995 04:26:56 +0000 (04:26 +0000)]
(BEGIN_STATE): Use INT_MAX - 1 so as not to interfere with large repeat counts.
(struct E_string): New struct.
(find_closing_delim): Take E_string arg rather than char* and length.
(find_bracketed_repeat): Likewise.
(star_digits_closebracket): New function.
(append_char_class): No longer give diagnostic.
(append_equiv_class): No longer give diagnostic.
(build_spec_list): Give them here instead, allowing things like [:*][:upper:]
that got errors before.
Take E_string arg rather than char*.
Convert switch stmts into if-then so as to use ES_MATCH.
Jim Meyering [Thu, 19 Oct 1995 15:33:33 +0000 (15:33 +0000)]
(struct E_string): Define.
(unquote): Convert string to E_string instead of overwriting input.
Backslash-escaped non-special characters are marked as quoted in E_string.
(build_spec_list): Convert outer switch stmt to an if-stmt.
(parse_str): Update sole caller of unquote.
Jim Meyering [Wed, 18 Oct 1995 22:05:29 +0000 (22:05 +0000)]
Use HAVE_SYS_WAIT_H, not _POSIX_VERSION in conditional
inclusion of sys/wait.h.
[endgrent]: Test !HAVE_ENDGRENT rather than _POSIX_SOURCE.
[endpwent]: Test !HAVE_ENDPWENT rather than _POSIX_SOURCE.
Jim Meyering [Fri, 13 Oct 1995 17:22:58 +0000 (17:22 +0000)]
(prjoin): Handle case in which file spec is 0.
(add_field): Update assertions.
(decode_field_spec): For S == "0", set file spec to zero and don't modify
*FIELD_INDEX. Otherwise, *FIELD_INDEX gets the zero-based index.
Jim Meyering [Sun, 8 Oct 1995 03:28:21 +0000 (03:28 +0000)]
(add_field): No longer return a value.
(decode_field_spec): New function.
(add_field_list): Rewrite to be more strict about what is accepted.
Before, `,1.2' was accepted as valid.
(main): Use xstrtol instead atoi.
Combine nearly identical -a and -v cases.
Jim Meyering [Wed, 4 Oct 1995 21:17:43 +0000 (21:17 +0000)]
(main): Report `too few/many non-option arguments' then print --help
output rather than just the latter.
Properly interpret obsolescent usage like `join -o 2.1 2.1 2.2'.
(usage): Describe POSIX -1, -2 options and deprecate -j* ones
Jim Meyering [Wed, 4 Oct 1995 03:46:35 +0000 (03:46 +0000)]
Test SA_INTERRUPT, not _POSIX_VERSION,
to determine whether `sigaction' functions are available.
Reported by Paul Nevai <nevai@ops.mps.ohio-state.edu>.
Fix suggested by Karl Berry.
Jim Meyering [Sun, 1 Oct 1995 18:23:29 +0000 (18:23 +0000)]
(get_fs_usage) [STATFS_TRUNCATES_BLOCK_COUNTS]: Copy untruncated block
counts from f_spare array into proper members of struct statfs.
From Eirik Fuller (eirik@netapp.com);