chiark / gitweb /
add DLIST2_PREPEND
authorian <ian>
Wed, 14 Jun 2006 16:59:46 +0000 (16:59 +0000)
committerian <ian>
Wed, 14 Jun 2006 16:59:46 +0000 (16:59 +0000)
hostside/dliste.h

index 72a235c5c0351af5eae35ee61ba1125a27b6063f..bade3d4a47dd283346ba87cf468870bd2d53fc5b 100644 (file)
                  : ((list).head= (node))),             \
     (list).tail= (node)))
 
+#define DLIST2_PREPEND(list,node,link)                 \
+  ((void)                                              \
+   ((node)->link.next= (list).head,                    \
+    (node)->link.back= 0,                              \
+    ((list).head ? ((list).head->link.back= (node))    \
+                 : ((list).tail= (node))),             \
+    (list).head= (node)))
+
      
 #endif /*DLIST_H*/