Remove unused kill_timer() and get_delete_timer() functions

These functions are completely unused.  Also remove the TimerList.delete member that is only used
by these functions.
This commit is contained in:
Kevin Easton 2017-09-20 15:31:41 +10:00
parent 5bd8a40cf8
commit 604fcf794b
3 changed files with 1 additions and 40 deletions

View File

@ -1038,7 +1038,7 @@ typedef struct timerlist_stru
struct timerlist_stru *next;
char ref[REFNUM_MAX + 1];
unsigned long refno;
struct timeval time;
struct timeval time;
int (*callback) (void *, char *);
char *command;
char *subargs;
@ -1047,7 +1047,6 @@ struct timeval time;
int server;
int window;
char *whom;
int delete;
} TimerList;
typedef struct nicktab_stru

View File

@ -10,8 +10,6 @@ extern void timercmd (char *, char *, char *, char *);
extern void ExecuteTimers (void);
extern char *BX_add_timer (int, char *, double, long, int (*) (void *, char *), char *, char *, int, char *);
extern int BX_delete_timer (char *);
extern int get_delete_timer(char *);
extern int kill_timer(char *);
extern void BX_delete_all_timers (void);
extern int timer_exists (char *ref);

View File

@ -247,14 +247,6 @@ extern void ExecuteTimers (void)
break;
}
}
if (current && current->delete)
{
if (!current->callback)
new_free(&current->command);
new_free(&current->subargs);
new_free(&current->whom);
new_free(&current);
}
}
parsingtimer = 0;
}
@ -376,34 +368,6 @@ extern int BX_delete_timer (char *ref)
return -1;
}
int kill_timer(char *ref)
{
TimerList *tmp;
for (tmp = PendingTimers; tmp; tmp = tmp->next)
{
/* can only delete user created timers */
if (!my_stricmp(tmp->ref, ref))
{
tmp->delete = 1;
return 0;
}
}
return -1;
}
int get_delete_timer(char *ref)
{
TimerList *tmp;
for (tmp = PendingTimers; tmp; tmp = tmp->next)
{
/* can only delete user created timers */
if (!my_stricmp(tmp->ref, ref))
return tmp->delete;
}
return -1;
}
void BX_delete_all_timers (void)
{
while (PendingTimers)