Please fix your indentation next time you post code so people can actually read and understand it.
Global Variables Are Bad
node *head, *current, *a, *b;
When you assign the next and prev elements, head is NULL, so you don't actually have a circular list here. That might throw off your subsequent inserts. You probably want head = newNode as the first line in this block.
head = newNode;
Your loop condition looks backwards. You want to keep while the next element doesn't point to the head of the list (i.e. while current isn't the last node in the list).
current->next = current;
You probably want to set newNode->prev to current here.
newNode->next = head;