Maybe what you want is: iniparser
iniParser: stand-alone ini Parser library in ANSI C