int deleteList ( int list ) { clear ( list ) ; int prevList = m_lists . getField ( list , 2 ) ; int nextList = m_lists . getField ( list , 3 ) ; if ( prevList != nullNode ( ) ) setNextList_ ( prevList , nextList ) ; else m_list_of_lists = nextList ; if ( nextList != nullNode ( ) ) setPrevList_ ( nextList , prevList ) ; freeList_ ( list ) ; return nextList ; }
Deletes a list and returns the index of the next list .