Ingres CL QU
From Ingres Community Wiki
|
Ingres Compatability Library |
Contents |
Compatibility Library Specification - QU
Abstract
This is the specification of the QU facility provided by the compatibility library.
Revision: 1.1, 14-Nov-1997
Document History
- Revision 1.1, last modified 14-Nov-1997.
- Converted to HTML.
- Revision 1.0, last modified 2-Jan-91.
Specification
Introduction
QU provides a common way of working with circular doubly-linked lists (queues).
Library
CL
Header File <qu.h>
The header file <qu.h> must be included before using any of the functions provided.
If defines the following type whose contents are well-known to clients. A QUEUE is often used as the first element in client structures to provide a way to thread a list of structures together.
typedef struct _QUEUE
{
struct _QUEUE *q_next;
struct _QUEUE *q_prev;
} QUEUE;
Executable Interface
QUinit - initialize a queue
"q" is a pointer to the header element of a queue. Perform all necessary initializations to set up a queue.
Inputs:
| q | Pointer to head element in queue. |
Outputs:
| None |
Returns:
| None |
Definition:
VOID QUinit(q) QUEUE *q;
QUinsert - insert an element in a queue
Insert element "element" immediately after queue pointer "current". The procedure returns the value of "element".
Inputs:
| element | QUEUE element to insert into queue. |
| current | Where to insert "element". "element" will be inserted immediately after this QUEUE element. |
Outputs:
| None |
Returns:
| the element inserted. |
Definition:
QUEUE * QUinsert( element, current ) QUEUE *element; QUEUE *current;
QUremove - remove an element from a queue
"element" is a pointer to an element in a queue. Remove and return a pointer to that element, or NULL if only the user-declared header element was found.
Inputs:
| element | QUEUE element to remove from queue. |
Outputs:
| None |
Returns:
| "element", or NULL if only the user-declared header element was found. |
Definition:
QUEUE * QUremove(element) QUEUE *element;
|
Ingres Compatability Library |
