chiark
/
gitweb
/
~ijackson
/
trains.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9aad240
)
add DLIST2_PREPEND
author
ian
<ian>
Wed, 14 Jun 2006 16:59:46 +0000
(16:59 +0000)
committer
ian
<ian>
Wed, 14 Jun 2006 16:59:46 +0000
(16:59 +0000)
hostside/dliste.h
patch
|
blob
|
history
diff --git
a/hostside/dliste.h
b/hostside/dliste.h
index 72a235c5c0351af5eae35ee61ba1125a27b6063f..bade3d4a47dd283346ba87cf468870bd2d53fc5b 100644
(file)
--- a/
hostside/dliste.h
+++ b/
hostside/dliste.h
@@
-61,5
+61,13
@@
: ((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*/