insque, remque
Purpose
Inserts or removes an element in a queue.
Library
Berkeley Library (libbsd.a)
Syntax
struct qelem {
struct qelem *q_forw;
struct qelem *q_back;
char q_data[ ];
};
insque (elem, pred)
struct qelem *elem, *pred;
remque (elem)
struct qelem *elem;
Description
The insque and remque subroutines manipulate queues built
from doubly linked lists. Each element in the queue must
be in the form of a qelem structure. The q_forw and
q_back elements of that structure must point to the ele-
ments in the queue immediately before and after the
element to be inserted or deleted.
The insque subroutine inserts the element pointed to by
the elem parameter into a queue immediately after the
element pointed to by the pred parameter.
The remque subroutine removes the element defined by the
elem parameter from a queue.