(getminleft): Parameter hours unused since the previous rev., remove.

Change parameter mpd from int * to int, because its only use is *mpd
as r-value.  Callers changed.
This commit is contained in:
Markus Armbruster 2004-04-04 14:07:51 +00:00
parent 05acaece48
commit 2df3f002e1
3 changed files with 5 additions and 8 deletions

View file

@ -254,7 +254,7 @@ extern void init_player_commands(void);
extern void log_last_commands(void);
extern int gamedown(void);
extern void daychange(time_t);
extern int getminleft(time_t, int *, int *);
extern int getminleft(time_t, int);
/* more in commands.h */
/* empmod.c */
/* init_nats.c */

View file

@ -199,19 +199,16 @@ daychange(time_t now)
}
int
getminleft(time_t now, int *hour, int *mpd)
getminleft(time_t now, int mpd)
{
s_char *bp;
struct tm *tm;
int nminleft;
int curtime;
struct natstr *natp;
int n;
tm = localtime(&now);
curtime = tm->tm_min + tm->tm_hour * 60;
natp = getnatp(player->cnum);
nminleft = *mpd - natp->nat_minused;
nminleft = mpd - natp->nat_minused;
n = 60 * 24 - (tm->tm_min + tm->tm_hour * 60);
if (n < nminleft)
nminleft = n;

View file

@ -89,7 +89,7 @@ player_main(struct player *p)
return;
}
daychange(player->curup);
if ((player->minleft = getminleft(player->curup, hour, &m_m_p_d)) <= 0) {
if ((player->minleft = getminleft(player->curup, m_m_p_d)) <= 0) {
pr("Time exceeded today\n");
return;
}
@ -256,7 +256,7 @@ status(void)
return 0;
}
}
player->minleft = getminleft(player->curup, hour, &m_m_p_d);
player->minleft = getminleft(player->curup, m_m_p_d);
}
player->lasttime += minute * 60;
natp->nat_minused += minute;