http://www.fourmilab.ch/smartall/
-
+
Version $Id$
*/
};
#endif
-/*
+/*
* To define a queue, use the following
*
- * static BQUEUE xyz = { &xyz, &xyz };
+ * static BQUEUE xyz = { &xyz, &xyz };
*
* Also, note, that the only real requirement is that
* the object that is passed to these routines contain
/* QREMOVE -- Remove next object from the queue given
- the queue head (or any item).
+ the queue head (or any item).
Returns NULL if queue is empty */
BQUEUE *qremove(BQUEUE *qhead)
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
-}
+}
/* QDCHAIN -- Dequeue an item from the middle of a queue. Passed