Page 154, Exercise 1

 

The delete() function with 2 pointers
void delete(listPointer *first, listPointer trail)
{/* deletefrom the list, trail is the preceding node
and *first is the front of the list */
if (trail)
   trail->link = (*first)->link;
else
  *first = (*first)->link;
free(x);
}