Hi!
isnt that we should change n->prev = (node *) &l->head to n->prev = (node *) &l->null
No. I admit the list structure is very tricky and also somewhat awkward, but it's both efficient and easy to manipulate once one understand the basic trick: The list head always contains two synthetic nodes which are always present in the list: the head and the tail. But because the `next' entry of the tail and the `prev' entry of the head are both NULL, the nodes can be overlayed over each other:
head head_node.next null head_node.prev tail_node.next tail tail_node.prev
Maybe this mail should be taken as a comment and pasted at begining of lists.h? Pavel -- The best software in life is free (not shareware)! Pavel GCM d? s-: !g p?:+ au- a--@ w+ v- C++@ UL+++ L++ N++ E++ W--- M- Y- R+