/*
- * Copyright (C) 1995-2005, Index Data ApS
+ * Copyright (C) 1995-2007, Index Data ApS
* See the file LICENSE for details.
*
- * $Id: requestq.c,v 1.3 2005-01-15 19:47:14 adam Exp $
+ * $Id: requestq.c,v 1.5 2007-01-03 08:42:15 adam Exp $
*/
/**
* \file requestq.c
void request_enq(request_q *q, request *r)
{
if (q->tail)
- q->tail->next = r;
+ q->tail->next = r;
else
- q->head = r;
+ q->head = r;
q->tail = r;
q->num++;
}
request *r = q->head;
if (!r)
- return 0;
+ return 0;
q->head = q->head->next;
if (!q->head)
- q->tail = 0;
+ q->tail = 0;
q->num--;
return r;
}
request *r1, *r = q->list;
while (r)
{
- xfree (r->response);
+ xfree (r->response);
r1 = r;
r = r->next;
xfree (r1);
request *r = q->list;
if (r)
- q->list = r->next;
+ q->list = r->next;
else
{
- if (!(r = (request *)xmalloc(sizeof(*r))))
- abort();
- r->response = 0;
- r->size_response = 0;
+ if (!(r = (request *)xmalloc(sizeof(*r))))
+ abort();
+ r->response = 0;
+ r->size_response = 0;
}
r->q = q;
r->len_refid = 0;
q->list = r;
}
+/*
+ * Local variables:
+ * c-basic-offset: 4
+ * indent-tabs-mode: nil
+ * End:
+ * vim: shiftwidth=4 tabstop=8 expandtab
+ */
+