fills in the current record, allocates storage for the next and adds it to the list, and, if there is no data for the current record, terminates the list and sets done to true

addrecord(&stocks,recordpointer,&done);