PrevNextAll


Insertion into an asymmetric doubly linked list

After a given item

	newitem->prev = &p->next;
	newitem->next = p->next;
	if (newitem->next) newitem->next->prev = &newitem->next;
	p->next = newitem;

At the start

	newitem->prev = &head;
	newitem->next = *head;
	if (newitem->next) newitem->next->prev = &newitem->next;
	head = newitem;