]> git.eshelyaron.com Git - emacs.git/commit
Improve time error reporting
authorPaul Eggert <eggert@cs.ucla.edu>
Sat, 3 Nov 2018 20:11:26 +0000 (13:11 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Sun, 4 Nov 2018 04:36:46 +0000 (21:36 -0700)
commitb4eb908f858284a7962851fd99c94598f76afa6f
treed4e91b37d685ec7491c34e76598a0d3b3429cf34
parent07048183a86134b63cb7132038fab6f36a1e57ca
Improve time error reporting

* src/timefns.c (emacs_mktime_z): Remove; no longer needed.
(time_error): New function, replacing invalid_time.
All callers changed.
(decode_float_time, decode_ticks_hz, decode_time_components):
Return an error number instead of merely a boolean.
All callers changed.
(decode_lisp_time): Signal an error based on the error number,
instead of merely returning a boolean to the caller.
All callers changed.
(format_time_string, Fdecode_time, Fencode_time)
(Fcurrent_time_string):
Do not assume that a failure of a system time function
must be due to time overflow.
(Fencode_time): Don't report an error merely because mktime
returned ((time_t) -1), as that may be a valid time_t value.
Use a simpler error check.  See:
https://www.sourceware.org/ml/libc-alpha/2018-11/msg00062.html
src/timefns.c