Commit Graph
17790 Commits
Author SHA1 Message Date
Jim Meyering c904b0cae6 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.
2004-02-05 09:50:18 +00:00
Jim Meyering adc816c05a 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.
2004-02-05 09:47:01 +00:00
Jim Meyering b5cfd989df *** empty log message *** 2004-02-05 09:35:02 +00:00
Jim Meyering e32369feb8 (human_time): Accept time rather than pointer-to-const-time parameter,
for clarity.  All callers changed.
2004-02-05 09:34:33 +00:00
Jim Meyering b13975e227 (ST_TIME_CMP_NS, ST_TIME_CMP): Define.
(ATIME_CMP, CTIME_CMP, MTIME_CMP, TIMESPEC_NS): Likewise.
From coreutils' system.h.
2004-02-05 09:28:22 +00:00
Jim Meyering 3c22aefe80 *** empty log message *** 2004-02-05 09:26:56 +00:00
Jim Meyering 143799aecc (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.
2004-02-05 09:26:52 +00:00
Jim Meyering f37f61b461 Don't include timespec.h, now that system.h does it. 2004-02-05 09:24:05 +00:00
Jim Meyering 816174d119 *** empty log message *** 2004-02-05 09:08:52 +00:00
Jim Meyering 54da1d6493 *** empty log message *** 2004-02-04 09:46:10 +00:00
Jim Meyering 0b28b559f4 *** empty log message *** 2004-02-03 20:57:40 +00:00
Jim Meyering 3c365a2f32 *** empty log message *** 2004-02-03 18:40:30 +00:00
Jim Meyering e8416c5e12 (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.
2004-02-03 18:40:25 +00:00
Jim Meyering c19b38ed34 *** empty log message *** 2004-02-02 17:41:52 +00:00
Jim Meyering 3b1d58cb3f *** empty log message *** 2004-02-02 17:35:56 +00:00
Jim Meyering 9323d8baed *** empty log message *** 2004-02-02 17:33:35 +00:00
Jim Meyering fa377fd8c1 (do_stat): Remove extra trailing newline from default formats. 2004-02-02 17:33:11 +00:00
Jim Meyering 258e4f3a5b . 2004-02-02 15:00:32 +00:00
Jim Meyering 16c721f762 *** empty log message *** 2004-02-02 13:20:55 +00:00
Jim Meyering a61d512f4c (nice invocation): Add examples.
Prompted by suggestion from Dan Jacobson.
(factor invocation): Add an example.
Update timing numbers for a more modern CPU.
2004-02-02 13:20:52 +00:00
Jim Meyering e562fd7057 *** empty log message *** 2004-02-02 13:12:51 +00:00
Jim Meyering eaa7370746 *** empty log message *** 2004-02-02 08:08:09 +00:00
Jim Meyering ca6973a9a9 *** empty log message *** 2004-02-02 08:05:36 +00:00
Jim Meyering c057bb50b5 Print actual fractional seconds in time stamps, not just `.00000000'.
(human_time): Add and use new parameter, t_ns.
(print_stat): Update callers.
2004-02-02 07:59:58 +00:00
Jim Meyering dd42ad9e9c (TIMESPEC_NS): Define here, instead, now that stat.c also uses this macro. 2004-02-02 07:59:35 +00:00
Jim Meyering 19b1ba88d5 (TIMESPEC_NS): Remove definition. 2004-02-02 07:59:23 +00:00
Jim Meyering 206610bd6c . 2004-01-29 20:42:25 +00:00
Jim Meyering 641c7269f7 *** empty log message *** 2004-01-29 20:41:22 +00:00
Jim Meyering 21def62f57 [HAVE_SYS_UCRED_H]: Include grp.h before sys/ucred.h. 2004-01-29 20:41:16 +00:00
Jim Meyering 533aba4a37 *** empty log message *** 2004-01-29 20:38:56 +00:00
Jim Meyering 2b47cfe6eb Avoid a configure-time warning about sys/ucred.h on OSF V4.0.
Test for sys/ucred.h separately, since
on some systems one must include <grp.h> before it.
2004-01-29 20:38:52 +00:00
Jim Meyering 364cb07f31 update from automake 2004-01-28 17:16:15 +00:00
Jim Meyering eb8a9910f2 . 2004-01-27 15:38:00 +00:00
Jim Meyering cddfd09f09 *** empty log message *** 2004-01-27 13:09:20 +00:00
Jim Meyering 058f602aeb Reword so as not to exclude the possibility that INCREMENT be zero. 2004-01-27 13:09:16 +00:00
Jim Meyering 821287c6c5 *** empty log message *** 2004-01-27 12:53:29 +00:00
Jim Meyering 8c16c67625 Separate `Synopses' section into three examples.
Clarify first paragraph.  @w{}-protect an expression.1
	Use @option{--option}, rather than @code{--option}.
2004-01-27 12:53:24 +00:00
Jim Meyering 82ad938e92 *** empty log message *** 2004-01-27 12:30:46 +00:00
Jim Meyering 15dc7fd365 (seq invocation): Remove `@dots{}' at end of synopsis. 2004-01-27 12:30:36 +00:00
Jim Meyering 047f0d1324 *** empty log message *** 2004-01-25 22:58:00 +00:00
Jim Meyering bfbd195ecf bump version to 5.1.3 2004-01-25 22:57:23 +00:00
Jim Meyering 690b8fa75d correct example 2004-01-25 13:40:09 +00:00
Jim Meyering 22c7bc2b47 . 2004-01-24 23:32:11 +00:00
Jim Meyering f7ed1e923b *** empty log message *** COREUTILS-5_1_2 2004-01-24 23:16:21 +00:00
Jim Meyering e75b7f6bda (signatures): Comment out definition. 2004-01-24 23:16:18 +00:00
Jim Meyering 9386bcf106 minor tweaks 2004-01-23 21:55:56 +00:00
Jim Meyering 395de8b154 . 2004-01-23 18:48:03 +00:00
Jim Meyering 41b51ec34b *** empty log message *** 2004-01-23 15:55:39 +00:00
Jim Meyering f2dcda17a6 (header_regexp): Add exitfail. 2004-01-23 15:55:34 +00:00
Jim Meyering 083b1ded85 . 2004-01-23 15:55:13 +00:00