<p>I find it worth mentioning <a href="http://www.nongnu.org/confuse/" rel="noreferrer">libConfuse</a> here, and quote its description:</p>
<blockquote>
<p>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.</p>
<p>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.</p>
</blockquote>
<p>It seems fairly similar to the already mentioned libconfig. There is a short comparison of C and C++ parsers in <a href="http://arxiv.org/pdf/1103.3021.pdf?origin=publication_detail" rel="noreferrer">A study of the existing libraries to read from configuration files</a> that might be a useful start for anyone choosing among the alternatives.</p>
What c lib to use when I need to parse a simple config file under linux?
<p>Let's say I have a simple config file that my c program needs to read/parse.</p>

<p>Let's say it looks a little bit like this:</p>

<pre><code>#Some comment
key1=data1
key2=data2
</code></pre>

<p>Is there a standard c lib that I can use instead of writing my own parser?</p>

<p>Thanks
Johan</p>

<hr>

<p><em>Note</em>: Today I have my own little parser, but there must be some standard libs that solves this simple problem.</p>