X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Frequestq.c;h=02a2689dd5fccd2c6ef811dc6129332e995527a0;hb=173f78f50536784bdc6a59d4586ba409b2b69182;hp=97d371e69ea0d0aa5e05b8a6bcb9cffeaa8f9360;hpb=05c274ef315384faafcc5900c17468f0ea2474e6;p=yaz-moved-to-github.git diff --git a/src/requestq.c b/src/requestq.c index 97d371e..02a2689 100644 --- a/src/requestq.c +++ b/src/requestq.c @@ -1,8 +1,6 @@ -/* - * Copyright (C) 1994-2004, Index Data. +/* This file is part of the YAZ toolkit. + * Copyright (C) 1995-2009 Index Data * See the file LICENSE for details. - * - * $Id: requestq.c,v 1.2 2004-10-15 00:19:00 adam Exp $ */ /** * \file requestq.c @@ -20,9 +18,9 @@ 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++; } @@ -37,10 +35,10 @@ request *request_deq(request_q *q) 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; } @@ -56,7 +54,7 @@ void request_delq(request_q *q) request *r1, *r = q->list; while (r) { - xfree (r->response); + xfree (r->response); r1 = r; r = r->next; xfree (r1); @@ -68,13 +66,13 @@ request *request_get(request_q *q) 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; @@ -96,3 +94,12 @@ void request_release(request *r) q->list = r; } +/* + * Local variables: + * c-basic-offset: 4 + * c-file-style: "Stroustrup" + * indent-tabs-mode: nil + * End: + * vim: shiftwidth=4 tabstop=8 expandtab + */ +