elapsed time handling
The code has been assuming that time_t is some number of seconds. That's valid for traditional Unix systems and for Posix compliant systems but is not something guaranteed by the C standard. (We ran into a long time ago when trying out an alternate way to calculate phase of moon. That code made a similar assumption and broke one of the ports.) 'ubirthday' also warrants being re-done but I've run out of energy.
This commit is contained in:
+3
-2
@@ -367,8 +367,9 @@ writexlentry(FILE* rfile, struct toptenentry* tt, int how)
|
||||
Fprintf(rfile, "%cachieveX=%s", XLOG_SEP, encode_extended_achievements());
|
||||
Fprintf(rfile, "%cconductX=%s", XLOG_SEP, encode_extended_conducts());
|
||||
Fprintf(rfile, "%crealtime=%ld%cstarttime=%ld%cendtime=%ld", XLOG_SEP,
|
||||
(long) urealtime.realtime, XLOG_SEP,
|
||||
(long) ubirthday, XLOG_SEP, (long) urealtime.finish_time);
|
||||
urealtime.realtime, XLOG_SEP,
|
||||
timet_to_seconds(ubirthday), XLOG_SEP,
|
||||
timet_to_seconds(urealtime.finish_time));
|
||||
Fprintf(rfile, "%cgender0=%s%calign0=%s", XLOG_SEP,
|
||||
genders[flags.initgend].filecode, XLOG_SEP,
|
||||
aligns[1 - u.ualignbase[A_ORIGINAL]].filecode);
|
||||
|
||||
Reference in New Issue
Block a user