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.
Jim Meyering [Thu, 5 Feb 2004 09:26:52 +0000 (09:26 +0000)]
(ST_TIME_CMP_NS, ST_TIME_CMP): Remove definitions.
(ATIME_CMP, CTIME_CMP, MTIME_CMP, TIMESPEC_NS): Likewise.
Now, those are all defined in timespec.h.
Include timespec.h.
Jim Meyering [Tue, 3 Feb 2004 18:40:25 +0000 (18:40 +0000)]
(print_numbers): Use 'double' for loop index, not
'int', to avoid problems with integer overflow. On almost all
machines 'double' works in every case where 'int' works, and
it works on other cases besides.
Jim Meyering [Mon, 2 Feb 2004 13:20:52 +0000 (13:20 +0000)]
(nice invocation): Add examples.
Prompted by suggestion from Dan Jacobson.
(factor invocation): Add an example.
Update timing numbers for a more modern CPU.
Jim Meyering [Tue, 27 Jan 2004 12:53:24 +0000 (12:53 +0000)]
Separate `Synopses' section into three examples.
Clarify first paragraph. @w{}-protect an expression.1
Use @option{--option}, rather than @code{--option}.
Jim Meyering [Thu, 22 Jan 2004 22:13:27 +0000 (22:13 +0000)]
(Exit status): Document that ordinary failure
might not exit with status 1 on unusual platforms.
Mention chroot, env, nice, and su as having unusual exit
status patterns. Don't bother to mention true and false
since their exit status patterns are actually normal.
(sort invocation, su invocation): Mention its unusual exit
status pattern.
(chroot invocation): Simplify description of exit status 1.
Remove duplicate description of status 127.
(env invocation): Use consistent tenses; simplifiy description
of status 1.
(nice invocation): Likewise.
Jim Meyering [Thu, 22 Jan 2004 21:09:33 +0000 (21:09 +0000)]
(usage): Use EXIT_SUCCESS, not 0, for clarity.
(main): Use initialize_exit_failure rather than
setting exit_failure directly; this optimizes away redundant assignments.
(TTY_FAILURE, TTY_WRITE_ERROR): New enum values;
substitute them for the corresponding integer constants.
Jim Meyering [Thu, 22 Jan 2004 21:07:40 +0000 (21:07 +0000)]
(usage): Use EXIT_SUCCESS, not 0, for clarity.
(usage): Don't bother normalizing exit status
since the arg is already the correct exit status now.
(FATAL_ERROR, main): Exit with status EXIT_FAILURE, not 2, on errors.
Jim Meyering [Thu, 22 Jan 2004 21:03:13 +0000 (21:03 +0000)]
(usage): Use EXIT_SUCCESS, not 0, for clarity.
(main): Use initialize_exit_failure rather than
setting exit_failure directly; this optimizes away redundant
assignments.
Jim Meyering [Thu, 22 Jan 2004 21:02:22 +0000 (21:02 +0000)]
(initialize_exit_failure): New inline function.
Include exitfail.h here, since we refer to exit_failure.
All callers changed to not include exitfail.h.
(EXIT_FAIL, EXIT_CANNOT_INVOKE, EXIT_ENOENT): New enum values.
Jim Meyering [Thu, 22 Jan 2004 20:55:26 +0000 (20:55 +0000)]
(usage): Use EXIT_SUCCESS, not 0, for clarity.
(main): Use initialize_exit_failure rather than
setting exit_failure directly; this optimizes away redundant
assignments.
Don't include <assert.h>.
(SORT_OUT_OF_ORDER, SORT_FAILURE): Now enums, not macros.
(usage): Don't use 'assert'.
(main): Remove redundant assignment to exit_failure.
Jim Meyering [Thu, 22 Jan 2004 20:53:55 +0000 (20:53 +0000)]
(usage): Use EXIT_SUCCESS, not 0, for clarity.
(main): Likewise, to SETUIDGID_FAILURE.
(SETUIDGID_FAILURE): Renamed from FAIL_STATUS,
for consistency with other programs here. All uses changed.
(main): Use 'error' to exit rather than invoking 'exit' here.
Jim Meyering [Thu, 22 Jan 2004 20:51:09 +0000 (20:51 +0000)]
(usage): Use EXIT_SUCCESS, not 0, for clarity.
(print_numbers): Now returns void, not (zero) int.
All callers changed.
(main): Remove unused local variable 'errs'. Always exit successfully
if we reach the end.
Jim Meyering [Thu, 22 Jan 2004 20:48:38 +0000 (20:48 +0000)]
(usage): Use EXIT_SUCCESS, not 0, for clarity.
(remove_parents): Don't set 'fail' to a negative number.
(main): Avoid integer overflow when seeing whether errors occurred.
Jim Meyering [Thu, 22 Jan 2004 20:44:15 +0000 (20:44 +0000)]
(usage): Use EXIT_SUCCESS, not 0, for clarity.
(main): Use initialize_exit_failure rather than setting
exit_failure directly; this optimizes away redundant assignments.
(PRINTENV_FAILURE): New constant.
(main): Exit with status PRINTENV_FAILURE, not EXIT_FAILURE, on
command-line syntax problems.