/* locate the position of this node in the list */ while (curr != NULL && item < curr->data) { prev = curr; curr = curr->next;
} /* let this node point to the next node in the list */ np->next = curr;
/* let the previous node in the list point to this node */ if (prev != NULL) prev->next = np;
else/* this node is the first in the list */ *list = np;