Lab 5 Starter Code Plus Input Data File
PERSON *getRecords(FILE *fp, int *count)
{
    char line[MAXLINE + 1], *name, *ss, *age, *city, *state;
    int years;
    PERSON *people = NULL, *mover;
 
/***
 ***  Use usual Realloc bucketing scheme to get a new bucket of records
 ***  when the current bucket gets used up.
 ***/

    while(fgets(line, MAXLINE, fp))
    {
         name   = strtok(line, ":");
         ss     = strtok(NULL, ":");
         age    = strtok(NULL, ":");
         city   = strtok(NULL, ":");
         state  = strtok(NULL, "\n");
         sscanf(age, "%d", &years);

/***************************************************************************/
 
Dup,Mess:555-55-5555:29:Flagstaff:AZ
Smith,Mary:654-32-1098:35:Tucson:AZ
Wood,Ed:111-11-1111:56:Northridge:CA
Wonka,Willie:888-88-8888:54:Sand Point:ID
Person,Roderick:415-56-7665:71:Couch Potato:IL
Clean,Mister:607-94-9494:41:South Bend:IN
Jones,Ed:123-45-6789:28:Willow Hill:NC
Smith,Bob:444-44-4444:59:Chapel Hill:NC
Doubt,Flip:432-90-0974:40:Santa Fe:NM
Discussion,Frank:987-65-4321:32:Las Vegas:NM
Ferapples,Bob:765-43-2109:39:Carson City:NV
Seinfeld,Jerry:076-90-5676:44:New York:NY
Wood,Ply:999-87-0123:42:Pittsburgh:PA
Cross,Chris:345-09-6545:45:St. George:UT
Blow,Joe:555-44-4444:52:Foobar:VT
Smith,Edward:222-22-2222:57:Tatoosh Island:WA
Dover,Ben:545-45-5465:34:Walla Walla:WA
Devver,Wudd:909-09-0758:33:Busted Wheel:WA
Kramer,Cosmo:764-77-7777:49:Wheeling:WV