summaryrefslogtreecommitdiff
path: root/zhm/queue.c
diff options
context:
space:
mode:
authorGravatar Karl Ramm <kcr@mit.edu>2008-01-21 03:11:12 +0000
committerGravatar Karl Ramm <kcr@mit.edu>2008-01-21 03:11:12 +0000
commit71f70d3066d1c038e1794c4ffe804591eda3d1af (patch)
treeccd1648560deabce78490f6c6585e3e8e38b730f /zhm/queue.c
parent6ff9e17ef29f984a45a1b9dd4ece890aef7f5439 (diff)
de K&Rify
Diffstat (limited to 'zhm/queue.c')
-rw-r--r--zhm/queue.c50
1 files changed, 27 insertions, 23 deletions
diff --git a/zhm/queue.c b/zhm/queue.c
index 5a072aa..27e7ca2 100644
--- a/zhm/queue.c
+++ b/zhm/queue.c
@@ -30,17 +30,18 @@ typedef struct _Queue {
static Queue *hm_queue;
static int retransmits_enabled = 0;
-static Queue *find_notice_in_queue __P((ZNotice_t *notice));
-static Code_t dump_queue __P((void));
-static void queue_timeout __P((void *arg));
+static Queue *find_notice_in_queue(ZNotice_t *notice);
+static Code_t dump_queue(void);
+static void queue_timeout(void *arg);
int rexmit_times[] = { 2, 2, 4, 4, 8, -1 };
#ifdef DEBUG
-Code_t dump_queue();
+Code_t dump_queue(void);
#endif
-void init_queue()
+void
+init_queue(void)
{
Queue *q;
@@ -56,11 +57,11 @@ void init_queue()
DPR("Queue initialized and flushed.\n");
}
-Code_t add_notice_to_queue(notice, packet, repl, len)
- ZNotice_t *notice;
- char * packet;
- struct sockaddr_in *repl;
- int len;
+Code_t
+add_notice_to_queue(ZNotice_t *notice,
+ char *packet,
+ struct sockaddr_in *repl,
+ int len)
{
Queue *entry;
@@ -89,10 +90,10 @@ Code_t add_notice_to_queue(notice, packet, repl, len)
return(ZERR_NONE);
}
-Code_t remove_notice_from_queue(notice, kind, repl)
- ZNotice_t *notice;
- ZNotice_Kind_t *kind;
- struct sockaddr_in *repl;
+Code_t
+remove_notice_from_queue(ZNotice_t *notice,
+ ZNotice_Kind_t *kind,
+ struct sockaddr_in *repl)
{
Queue *entry;
@@ -115,8 +116,8 @@ Code_t remove_notice_from_queue(notice, kind, repl)
}
/* We have a server; transmit all of our packets. */
-void retransmit_queue(sin)
- struct sockaddr_in *sin;
+void
+retransmit_queue(struct sockaddr_in *sin)
{
Queue *entry;
Code_t ret;
@@ -148,7 +149,8 @@ void retransmit_queue(sin)
}
/* We lost our server; nuke all of our timers. */
-void disable_queue_retransmits()
+void
+disable_queue_retransmits(void)
{
Queue *entry;
@@ -161,7 +163,8 @@ void disable_queue_retransmits()
}
#ifdef DEBUG
-static Code_t dump_queue()
+static Code_t
+dump_queue(void)
{
Queue *entry;
caddr_t mp;
@@ -193,7 +196,8 @@ static Code_t dump_queue()
}
#endif /* DEBUG */
-int queue_len()
+int
+queue_len(void)
{
int length = 0;
Queue *entry;
@@ -203,8 +207,8 @@ int queue_len()
return length;
}
-static Queue *find_notice_in_queue(notice)
- ZNotice_t *notice;
+static Queue *
+find_notice_in_queue(ZNotice_t *notice)
{
Queue *entry;
@@ -215,8 +219,8 @@ static Queue *find_notice_in_queue(notice)
return NULL;
}
-static void queue_timeout(arg)
- void *arg;
+static void
+queue_timeout(void *arg)
{
Queue *entry = (Queue *) arg;
Code_t ret;