Listing 1 This function passes a pointer to the data, to store a value in the list. The calling program keeps the address of the data valid until the link is removed or the list destroyed.

add_pointer_to_linked_list(void * pointer_to_data)
   {
   struct s_link *new_link;
   new_link = malloc(sizeof(struct s_link));
   new_link->pointer_to_data = pointer_to_data;
   ...
   }

/* End of File */