summaryrefslogtreecommitdiff
path: root/src/common/dllist.h
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2009-12-13 11:54:32 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2009-12-13 11:54:32 (GMT)
commit7468875c1022337efbff78069d715672ae083150 (patch)
tree0a8e5ce9cce113506a601539c9aa0a1b4ae48680 /src/common/dllist.h
parentc6409e2c6a390a7cca40da8572c93a5268e90a27 (diff)
Loaded and saved binary parts.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@140 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/common/dllist.h')
-rw-r--r--src/common/dllist.h29
1 files changed, 11 insertions, 18 deletions
diff --git a/src/common/dllist.h b/src/common/dllist.h
index 3feef5c..499151e 100644
--- a/src/common/dllist.h
+++ b/src/common/dllist.h
@@ -58,9 +58,6 @@ void __dl_list_add(dl_list_item *, dl_list_head *, dl_list_item *, dl_list_item
/* Supprime un élément d'une liste doublement chaînée. */
void __dl_list_del(dl_list_item *, dl_list_head *);
-/* Insère une liste au sein d'une autre. */
-void __dl_list_splice(dl_list_item *, dl_list_head);
-
#define dl_list_empty(head) \
((head) == NULL)
@@ -79,6 +76,17 @@ void __dl_list_splice(dl_list_item *, dl_list_head);
} \
while (0)
+#define dl_list_add_before(new, head, pos, member) \
+ do \
+ { \
+ pos->member.prev->next = &new->member; \
+ new->member.prev = pos->member.prev; \
+ pos->member.prev = &new->member; \
+ new->member.next = &pos->member; \
+ if (pos == *head) *head = new; \
+ } \
+ while (0)
+
#define dl_list_add_tail(new, head, type, member) \
do \
{ \
@@ -109,21 +117,6 @@ void __dl_list_splice(dl_list_item *, dl_list_head);
_result; \
})
-#define dl_list_splice_before(pos, head1, head2, type, member) \
- do \
- { \
- if (pos == *head1) \
- { \
- __dl_list_splice(head2->member.prev, &(*head1)->member); \
- *head1 = head2; \
- } \
- else __dl_list_splice(pos->member.prev, &head2->member); \
- } \
- while(0)
-
-#define dl_list_splice_after(pos, head2, type, member) \
- __dl_list_splice(&pos->member, &head2->member);
-
#define dl_list_next_iter(iter, head, type, member) \
(iter->member.next == &head->member ? \
NULL : container_of(iter->member.next, type, member))