Instrument Neutral Distributed Interface INDI  1.9.2
fq.h
Go to the documentation of this file.
1 /* a fifo queue that never fills.
2  * Copyright (C) 2005 Elwood C. Downey ecdowney@clearskyinstitute.com
3 
4  This library is free software; you can redistribute it and/or
5  modify it under the terms of the GNU Lesser General Public
6  License as published by the Free Software Foundation; either
7  version 2.1 of the License, or (at your option) any later version.
8 
9  This library is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  Lesser General Public License for more details.
13 
14  You should have received a copy of the GNU Lesser General Public
15  License along with this library; if not, write to the Free Software
16  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17  */
18 
19 #pragma once
20 
21 #include <stddef.h>
22 
23 typedef struct _FQ FQ;
24 
25 extern FQ *newFQ(int grow);
26 extern void delFQ(FQ *q);
27 extern void pushFQ(FQ *q, void *e);
28 extern void *popFQ(FQ *q);
29 extern void *peekFQ(FQ *q);
30 extern void *peekiFQ(FQ *q, int i);
31 extern int nFQ(FQ *q);
32 extern void setMemFuncsFQ(void *(*newmalloc)(size_t size), void *(*newrealloc)(void *ptr, size_t size),
33  void (*newfree)(void *ptr));
newFQ
FQ * newFQ(int grow)
Definition: fq.c:71
popFQ
void * popFQ(FQ *q)
Definition: fq.c:96
peekFQ
void * peekFQ(FQ *q)
Definition: fq.c:102
pushFQ
void pushFQ(FQ *q, void *e)
Definition: fq.c:88
delFQ
void delFQ(FQ *q)
Definition: fq.c:81
_FQ::q
void ** q
Definition: fq.c:53
nFQ
int nFQ(FQ *q)
Definition: fq.c:118
peekiFQ
void * peekiFQ(FQ *q, int i)
Definition: fq.c:112
_FQ
Definition: fq.c:51
setMemFuncsFQ
void setMemFuncsFQ(void *(*newmalloc)(size_t size), void *(*newrealloc)(void *ptr, size_t size), void(*newfree)(void *ptr))
Definition: fq.c:126
_FQ::grow
int grow
Definition: fq.c:57