>>678
char *p = strchr(str,';');
if(p){
*p = '\0';
strcpy(dat.a, str);
str=p+1;
}
...以下同

こんな感じ?何か不良っぽいが。