From 7843026e97722a4cefd445c4c3eff28dd75c1727 Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Sat, 19 Nov 2005 14:22:44 +0000 Subject: [PATCH] Added clist_insert_list_after(). --- lib/clists.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/lib/clists.h b/lib/clists.h index 846752fc..9c0f816a 100644 --- a/lib/clists.h +++ b/lib/clists.h @@ -90,4 +90,17 @@ static inline void clist_init(clist *l) head->next = head->prev = head; } +static inline void clist_insert_list_after(clist *what, cnode *after) +{ + if (!clist_empty(what)) + { + cnode *w = &what->head; + w->prev->next = after->next; + after->next->prev = w->prev; + w->next->prev = after; + after->next = w->next; + clist_init(what); + } +} + #endif -- 2.39.5