-/*! \name Extract an element from the head/tail of the list. If the list empty, return NULL. */
-/*\{*/
-#define REMHEAD(l) _list_rem_head(l)
-#define REMTAIL(l) _list_rem_tail(l)
-/*\}*/
+/*!
+ * \name Unlink a node from the head of the list \a l.
+ * \return Pointer to node, or NULL if the list was empty.
+ */
+INLINE Node *REMHEAD(List *l)
+{
+ Node *n;
+
+ if (ISLISTEMPTY(l))
+ return (Node *)0;
+
+ n = l->head;
+ l->head = n->succ;
+ n->succ->pred = (Node *)l;
+ return n;
+}
+
+/*!
+ * \name Unlink a node from the tail of the list \a l.
+ * \return Pointer to node, or NULL if the list was empty.
+ */
+INLINE Node *REMTAIL(List *l)
+{
+ Node *n;