while(fgets(buf, sizeof buf, in)) {
if(sscanf(buf, "Name = %s", name) == 1) {
+ firstline = false;
+
if(!check_id(name)) {
fprintf(stderr, "Invalid Name in input!\n");
return 1;
}
count++;
- firstline = false;
continue;
} else if(firstline) {
fprintf(stderr, "Junk at the beginning of the input, ignoring.\n");