What c lib to use when I need to parse a simple config file under linux?
I find it worth mentioning libConfuse here, and quote its description:
libConfuse is a configuration file parser library, licensed under the terms of the ISC license, and written in C. It supports sections and (lists of) values (strings, integers, floats, booleans or other sections), as well as some other features (such as single/double-quoted strings, environment variable expansion, functions and nested include statements). It makes it very easy to add configuration file capability to a program using a simple API.
The goal of libConfuse is not to be the configuration file parser library with a gazillion of features. Instead, it aims to be easy to use and quick to integrate with your code. libConfuse was called libcfg before, but its name was changed to not confuse itself with other similar libraries.
It seems fairly similar to the already mentioned libconfig. There is a short comparison of C and C++ parsers in A study of the existing libraries to read from configuration files that might be a useful start for anyone choosing among the alternatives.
libconfig but it does quite more than what you're asking