FindNodeFromHead()
function:
Node *FindNodeFromHead( const List *l, uint32 position )
l
argument is a pointer to the list to search; the position
argument is the position of the node sought within the list, counting from the head of the list. The first node in the list has position 0. The function returns a pointer to the node, or NULL if there are not enough nodes in the list for the requested position.
To find a node from the end of a list, use the FindNodeFromTail()
function:
Node *FindNodeFromTail( const List *l, uint32 position )
l
argument is a pointer to the list to search; the position
argument is the position of the node sought within the list, counting from the tail of the list. The last node in the list has position 0. The function returns a pointer to the node, or NULL if there are not enough nodes in the list for the requested position.