I have fscanf to read lines of setting from a configuration file. Those settings have strictly predefined format which looks like
name1=option1; name2=option
An alternative is to use fgets() to read the entire line into a string, then use sscanf(). This has an advantage in debugging in that you can see exactly what data the function is working on.
fgets()
sscanf()