(weekday, daytime, daytime_range): New; replace kw_parse(). Parsing

is somewhat stricter.
(is_wday_allowed, is_daytime_allowed, is_daytime_nar,
min_to_next_daytime): New.
(demand_update_time, scheduled_update_time, next_scheduled_time,
update_time, gamehours): Use them to replace kw_parse().
(kw_parse): No longer used, remove.
This commit is contained in:
Markus Armbruster 2004-04-04 15:52:26 +00:00
parent ded3daf70d
commit acdee1e3b6
12 changed files with 211 additions and 295 deletions

View file

@ -34,7 +34,6 @@
#include "options.h"
#include "misc.h"
#include "player.h"
#include "keyword.h"
#include "empthread.h"
#include "file.h"
#include "lost.h"

View file

@ -34,7 +34,6 @@
#include "options.h"
#include "misc.h"
#include "player.h"
#include "keyword.h"
#include "empthread.h"
#include "file.h"
#include "server.h"

View file

@ -35,7 +35,6 @@
#include "options.h"
#include "misc.h"
#include "player.h"
#include "keyword.h"
#include "empthread.h"
#include <stdio.h>
#include "prototypes.h"
@ -96,7 +95,6 @@ mobility_init(void)
time_t now;
time_t lastsavedtime;
FILE *fp;
int hour[2];
/* During downtime, we don't want mobility to accrue. So, we look
at the timestamp file, and determine how far forward to push
@ -109,6 +107,7 @@ mobility_init(void)
if ((fp = fopen(timestampfil, "r+b")) == NULL) {
#endif
logerror("Unable to edit timestamp file.");
/* FIXME safe to continue? */
} else {
rewind(fp);
fread(&timestamps, sizeof(timestamps), 1, fp);

View file

@ -34,7 +34,6 @@
#include "misc.h"
#include "player.h"
#include "keyword.h"
#include "empthread.h"
#include "prototypes.h"
#include "optlist.h"
@ -49,7 +48,6 @@ time_t update_time;
void
update_sched(void *unused)
{
s_char *kw;
int wind;
time_t now, delta;