Jim Meyering [Wed, 3 Mar 2004 07:57:33 +0000 (07:57 +0000)]
Don't include "posixver.h".
(parse_user_spec): Fall back on USER.GROUP parsing regardless
of POSIX version, as POSIX 1003.1-2001 allows that behavior as a
compatible extension. Simplify code by removing a boolean int
that was always nonzero if a string was nonnull.
Jim Meyering [Wed, 3 Mar 2004 07:52:36 +0000 (07:52 +0000)]
(chown invocation): Document that chown now falls
back on USER.GROUP parsing regardless of POSIX version, as POSIX
1003.1-2001 allows that behavior as a compatible extension.
Jim Meyering [Tue, 2 Mar 2004 22:49:44 +0000 (22:49 +0000)]
Include <signal.h> when checking for strsignal,
sys_siglist, and friends. Problem reported by Toney Leneis in
<http://mail.gnu.org/archive/html/bug-coreutils/2004-02/msg00136.html>.
Jim Meyering [Sun, 22 Feb 2004 14:56:58 +0000 (14:56 +0000)]
(eval, eval7, eval6, eval5, eval4, eval3, eval2, eval1):
Accept a bool argument specifying whether to evaluate the
expression. This is to allow short-circuit evaluation. All
callers changed.
(null): Report that a string is zero even if it has
a form like "-0" or "00".
(eval1, eval): Use short-circuit evaluation for | and &.
(eval): Return 0 if both arguments are null or zero, instead
of returning the first argument.
Jim Meyering [Sat, 21 Feb 2004 09:31:11 +0000 (09:31 +0000)]
(expr invocation):
Document what forms integers may take, and say "integer"
consistently instead of "number". Warn about operands
that "expr" can misinterpret, and how to work around the problem.
Jim Meyering [Sat, 21 Feb 2004 09:21:15 +0000 (09:21 +0000)]
(usage): Tell what comm does when there are no options.
Reword in terms of FILE1 and FILE2 rather than `left file' and
`right file'. Suggestion from Dan Jacobson.
Jim Meyering [Tue, 17 Feb 2004 10:52:49 +0000 (10:52 +0000)]
(usage) [-u]: Add punctuation so that the description in
the help2man-generated (line-joined) man page is more readable.
Reported by Tim Waugh.
[-T]: Add a semicolon, for the same reason.
Jim Meyering [Tue, 10 Feb 2004 08:17:33 +0000 (08:17 +0000)]
(dist-hook): New target, to ensure that config/install-sh
is executable. Otherwise, on systems that lack a suitable install
binary, `make install' would fail, because of the way this script
is invoked (without `$SHELL ' prefix).
Jim Meyering [Sat, 7 Feb 2004 16:01:20 +0000 (16:01 +0000)]
(re_protect): Use `XSTAT (x, ...)' in place of `*(x->xstat) (...)'.
(do_copy): Declare/use local xstat rather than x->xstat.
(main): Remove code that set x.xstat.
Jim Meyering [Sat, 7 Feb 2004 16:01:02 +0000 (16:01 +0000)]
Remove xstat function pointer member. The way it was used was not
portable, since some systems (OSF V5.1, Solaris 2.5.1) provide static
inline `stat' and `lstat' functions, thus making the tests of
`xstat == lstat' in copy.c always fail.
(struct cp_options) [xstat]: Remove member.
(XSTAT): New macro.
Jim Meyering [Sat, 7 Feb 2004 16:00:28 +0000 (16:00 +0000)]
Remove xstat function pointer member. The way it was used was not
portable, since some systems (OSF V5.1, Solaris 2.5.1) provide static
inline `stat' and `lstat' functions, thus making the tests of
`xstat == lstat' in copy.c always fail.
(copy_dir): Set `.dereference' member, not .xstat.
(copy_internal): Use `XSTAT (x, ...)' in place of `*(x->xstat) (...)'.
Use `x->dereference == DEREF_NEVER' in place of `x->xstat == lstat'.
(valid_options): Remove now-obsolete FIXME comments.
Jim Meyering [Fri, 6 Feb 2004 16:47:07 +0000 (16:47 +0000)]
Remove `du' stack space test.
Apparently, `ulimit -s N' isn't portable enough.
This test will be restored (with a guard against losing ulimit)
in its own file later.
Jim Meyering [Fri, 6 Feb 2004 15:26:12 +0000 (15:26 +0000)]
(deep): Remove progress-style diagnostics,
since this test doesn't take long enough to merit them.
Run du on $tmp (the containing dir), not $deep, the full path to leaf.
Jim Meyering [Thu, 5 Feb 2004 09:51:49 +0000 (09:51 +0000)]
Don't dump core if localtime returns NULL (possible on
hosts with 64-bit time_t and 32-bit int).
Print "??" if the current clock can't
be converted by localtime. This won't happen until the year
2*31 + 1900, but we don't want to dump core even if the current
clock has the wrong value.
Jim Meyering [Thu, 5 Feb 2004 09:50:18 +0000 (09:50 +0000)]
Don't dump core if localtime returns NULL (possible on
hosts with 64-bit time_t and 32-bit int).
Include "inttostr.h".
(batch_convert, main):
If time conversion fails, exit with nonzero status.
(show_date): Return int to report conversion failure.
Print the time as an int if localtime fails.
Jim Meyering [Thu, 5 Feb 2004 09:47:01 +0000 (09:47 +0000)]
Include "inttostr.h".
(human_time): Print the date/time as a number of seconds since the
epoch if it can't be converted by localtime. This is better than
just saying "invalid", and is consistent with what "ls" does.
Don't dump core if the year has more than 48 digits; this isn't
possible on any contemporary host, but we might as well do it right.