Doubly circular linked list implementation
Heads and tails
I got confused reading this code because in my mind, a circular list doesn't have a tail.  Or at least, the tail is the same as the head.
The code appears to be correct, but you could have only kept a head pointer.  Anywhere where you use tail, you could essentially replace that with head-&gt;prev and get the same functionality.