while(fgets(buffer,1024,fptr))
{
char* cptr=buffer;
while(isspace(*cptr++))
;
if(!*cptr)
continue;//blank line
cptr=buffer;
while(*cptr && '.'!=*cptr)
cptr++;
if(!*cptr)
continue;
//now cptr points to sth. like AOL,IBM,and so on.
//you can do what you want.
}