Replace datime() with just time().
Also make the 'savetime' value meaningful. This removes a separate library dependency on some systems.
This commit is contained in:
parent
fb8ba08986
commit
d23111daba
4 changed files with 2 additions and 19 deletions
|
@ -1,6 +1,7 @@
|
|||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <editline/readline.h>
|
||||
#include <time.h>
|
||||
|
||||
#include "advent.h"
|
||||
#include "dungeon.h"
|
||||
|
@ -31,12 +32,8 @@ struct save_t save;
|
|||
int savefile(FILE *fp, long version)
|
||||
/* Save game to file. No input or output from user. */
|
||||
{
|
||||
long i, k;
|
||||
datime(&i, &k);
|
||||
k = i + 650 * k;
|
||||
save.savetime = k;
|
||||
save.savetime = time(NULL);
|
||||
save.mode = -1;
|
||||
|
||||
save.version = (version == 0) ? VRSION : version;
|
||||
|
||||
memcpy(&save.game, &game, sizeof(struct game_t));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue