/*
event.c -- event queue
- Copyright (C) 2002 Guus Sliepen <guus@sliepen.eu.org>,
- 2002 Ivo Timmermans <ivo@o2w.nl>
+ Copyright (C) 2002-2003 Guus Sliepen <guus@sliepen.eu.org>,
+ 2002-2003 Ivo Timmermans <ivo@o2w.nl>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- $Id: event.c,v 1.1.4.5 2002/09/09 21:24:31 guus Exp $
+ $Id: event.c,v 1.1.4.9 2003/07/17 15:06:26 guus Exp $
*/
-#include "config.h"
-
-#include <stdlib.h>
-#include <xalloc.h>
-#include <string.h>
-#include <utils.h>
-#include <avl_tree.h>
-#include <time.h>
+#include "system.h"
+#include "avl_tree.h"
#include "event.h"
-
-#include "system.h"
+#include "utils.h"
+#include "xalloc.h"
avl_tree_t *event_tree;
extern time_t now;
int id;
-int event_compare(event_t * a, event_t * b)
+static int event_compare(event_t *a, event_t *b)
{
if(a->time > b->time)
return 1;
return (event_t *) xmalloc_and_zero(sizeof(event_t));
}
-void free_event(event_t * event)
+void free_event(event_t *event)
{
cp();
free(event);
}
-void event_add(event_t * event)
+void event_add(event_t *event)
{
cp();
avl_insert(event_tree, event);
}
-void event_del(event_t * event)
+void event_del(event_t *event)
{
cp();