long FUNCTION c_qnext(q, ptr)
long q; void **ptr;
The number of the queue to access. This number is returned by c_qcreate().
A pointer to the next object in the queue. ptr will be set to NULL if the queue is empty, or if the end of the queue is reached.
This routine is used to access the next object in a queue. ptr is set to point to the next object in the queue, so the application should not free this memory. If the end of the queue is encountered, ptr is set to NULL.
After calling this function the current position in the queue is advanced by one.
c_qnext() returns
0 --> Successful completion. The next object was found, or the queue is empty or at the end. -1 --> Operation failed. No such queue exists.