src/lib/queue.c
BQUEUE *qnext(BQUEUE *qhead, BQUEUE *qitem)
{
#define qh ((BQUEUE *)qhead)
#define qi ((BQUEUE *)qitem)

        BQUEUE *object;

        if (qi == NULL)
           qitem = qhead;
        ASSERT(qi->qprev->qnext == qi);
        ASSERT(qi->qnext->qprev == qi);

        if ((object = qi->qnext) == qh)
           return NULL;
        return object;
#undef qh
#undef qi
}
/*  QNEXT   --   Return next item from the queue
 *               returns NULL at the end of the queue.
 *               If qitem is NULL, the first item from
 *               the queue is returned.
 */
QNEXT   --   Return next item from the queue
returns NULL at the end of the queue.
If qitem is NULL, the first item from
the queue is returned.
QNEXT -- Return next item from the queue returns NULL at the end of the queue . If qitem is NULL the first item from the queue is returned .
BQUEUE *qnext(BQUEUE *qhead, BQUEUE *qitem)
{
#define qh ((BQUEUE *)qhead)
#define qi ((BQUEUE *)qitem)
        BQUEUE *object;
        if (qi == NULL)
           qitem = qhead;
        ASSERT(qi->qprev->qnext == qi);
        ASSERT(qi->qnext->qprev == qi);
        if ((object = qi->qnext) == qh)
           return NULL;
        return object;
#undef qh
#undef qi
}
BQUEUE * qnext ( BQUEUE * qhead , BQUEUE * qitem ) { #define qh  ((BQUEUE *)qhead) #define qi  ((BQUEUE *)qitem) BQUEUE * object ; if ( qi == NULL ) qitem = qhead ; ASSERT ( qi -> qprev -> qnext == qi ) ; ASSERT ( qi -> qnext -> qprev == qi ) ; if ( ( object = qi -> qnext ) == qh ) return NULL ; return object ; #undef  qh #undef  qi }
QNEXT   --   Return next item from the queue
               returns NULL at the end of the queue.
QNEXT -- Return next item from the queue returns NULL at the end of the queue .