insertbefore(3C)
_________________________________________________________________
insertbefore function
Insert an element into a queue before another queue element.
_________________________________________________________________
Calling Sequence
#include <queue.h>
struct queue *que;
struct element *ptr, *elem;
ptr = insertbefore(&que, ptr, elem);
Description
The insert_before function inserts an element before a specific
element in a doubly-linked list. You must define your element in
the program. The first two double words of the element are
reserved to hold the forward and backward pointers. For example:
struct element1 {
int *forwardptr;
int *backwardptr;
char dataitem;
} *ptr;
The pointer that you pass to the insert_before function is the
pointer to the element that you define and declare in the
program.
The insert_before function, defined in the include file queue.h,
uses the hardware representation for queues. For more detail,
consult The ECLIPSE 32-Bit Systems Principles of Operation.
Returns
The insert_before function returns the pointer inserted.
Related Functions
See also the insert_after, insert_head, and insert_tail
functions.
DG/UX 4.00 Page 1
Licensed material--property of copyright holder(s)