/*a loop to get the last node*/
for( ; list->nextPTR != NULL ; list = list->nextPTR)
/*you can also use a global pointer of type struct node not to find the last node every time
and it makes your code faster
last_node=new;*/

new->prevPTR=list;
new->value = data;
new->nextPTR = NULL;
return new;
}
If you already have a 'last node' pointer, then the fastest way to do it as I've shown. If the pointer exists, simply make it's next point to the new node, and the new node's prev point back to it. Then change it so 'last node' now points to the new one. There is no faster way.

Quzah.