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