aboutsummaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'util.c')
-rw-r--r--util.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/util.c b/util.c
index 1e44194..22300ba 100644
--- a/util.c
+++ b/util.c
@@ -126,6 +126,17 @@ listinsert(struct list *list, struct list *new)
}
void
+listinsertlist(struct list *list, struct list *new)
+{
+ if (new->next == new)
+ return;
+ new->next->prev = list;
+ new->prev->next = list;
+ list->next->prev = new->prev;
+ list->next = new->next;
+}
+
+void
listremove(struct list *list)
{
list->next->prev = list->prev;