2 |
This file is in the public domain. */ |
This file is in the public domain. */ |
3 |
|
|
4 |
/* |
/* |
|
NAME |
|
|
insque, remque -- insert, remove an element from a queue |
|
5 |
|
|
6 |
SYNOPSIS |
@deftypefn Supplemental void insque (struct qelem *@var{elem}, struct qelem *@var{pred}) |
7 |
struct qelem { |
@deftypefnx Supplemental void remque (struct qelem *@var{elem}) |
8 |
struct qelem *q_forw; |
|
9 |
struct qelem *q_back; |
Routines to manipulate queues built from doubly linked lists. The |
10 |
char q_data[]; |
@code{insque} routine inserts @var{elem} in the queue immediately |
11 |
}; |
after @var{pred}. The @code{remque} routine removes @var{elem} from |
12 |
|
its containing queue. These routines expect to be passed pointers to |
13 |
void insque (struct qelem *elem, struct qelem *pred) |
structures which have as their first members a forward pointer and a |
14 |
|
back pointer, like this prototype (although no prototype is provided): |
15 |
void remque (struct qelem *elem) |
|
16 |
|
@example |
17 |
DESCRIPTION |
struct qelem @{ |
18 |
Routines to manipulate queues built from doubly linked lists. |
struct qelem *q_forw; |
19 |
The insque routine inserts ELEM in the queue immediately after |
struct qelem *q_back; |
20 |
PRED. The remque routine removes ELEM from its containing queue. |
char q_data[]; |
21 |
|
@}; |
22 |
|
@end example |
23 |
|
|
24 |
|
@end deftypefn |
25 |
|
|
26 |
*/ |
*/ |
27 |
|
|
28 |
|
|