1
0
mirror of https://github.com/Interlisp/maiko.git synced 2026-01-25 19:46:21 +00:00

MDate: Make time_t, not long. (#206)

MDate, generated into `vdate.c` from `mkvdate.c`, was being
stored as a `long` rather than a `time_t`. This led to some
casts, but also a bit of platform #ifdef'd code.

This makes that go away by storing it as the `time_t` value
that it really is.

Also, update some comments and minor nits.
This commit is contained in:
Bruce Mitchener
2021-01-11 09:44:31 +07:00
committed by GitHub
parent 19033bba89
commit 9ba7e78625
3 changed files with 18 additions and 13 deletions

View File

@@ -260,7 +260,7 @@ int flushing = FALSE; /* see dbprint.h if set, all debug/trace printing will cal
extern DspInterface currentdsp;
#endif /* DOS || XWINDOW */
extern long MDate;
extern time_t MDate;
extern int nokbdflag;
extern int nomouseflag;
#ifdef DOS
@@ -736,11 +736,7 @@ void print_info_lines() {
#elif (RELEASE == 351)
printf("Emulator for Medley release 3.51\n");
#endif /* RELEASE */
#if defined(MACOSX) || defined(FREEBSD) || defined(LINUX)
printf("Creation date: %s", ctime((const time_t *)&MDate));
#else
printf("Creation date: %s", ctime(&MDate));
#endif
#ifdef LPSOLVE
printf("Contains lp_solve LP solver.\n");
#endif /* LPSOLVE */