src/lib/queue.c
BQUEUE *qremove(BQUEUE *qhead)
{
#define qh ((BQUEUE *)qhead)
        BQUEUE *object;

        ASSERT(qh->qprev->qnext == qh);
        ASSERT(qh->qnext->qprev == qh);

        if ((object = qh->qnext) == qh)
           return NULL;
        qh->qnext = object->qnext;
        object->qnext->qprev = qh;
        return object;
#undef qh
}
/*  QREMOVE  --  Remove next object from the queue given
                 the queue head (or any item).
     Returns NULL if queue is empty  */
QREMOVE  --  Remove next object from the queue given
the queue head (or any item).
Returns NULL if queue is empty
QREMOVE -- Remove next object from the queue given the queue head ( or any item ) . Returns NULL if queue is empty
BQUEUE *qremove(BQUEUE *qhead)
{
#define qh ((BQUEUE *)qhead)
        BQUEUE *object;
        ASSERT(qh->qprev->qnext == qh);
        ASSERT(qh->qnext->qprev == qh);
        if ((object = qh->qnext) == qh)
           return NULL;
        qh->qnext = object->qnext;
        object->qnext->qprev = qh;
        return object;
#undef qh
}
BQUEUE * qremove ( BQUEUE * qhead ) { #define qh  ((BQUEUE *)qhead) BQUEUE * object ; ASSERT ( qh -> qprev -> qnext == qh ) ; ASSERT ( qh -> qnext -> qprev == qh ) ; if ( ( object = qh -> qnext ) == qh ) return NULL ; qh -> qnext = object -> qnext ; object -> qnext -> qprev = qh ; return object ; #undef  qh }
QREMOVE  --  Remove next object from the queue given
the queue head (or any item).
QREMOVE -- Remove next object from the queue given the queue head ( or any item ) .