A configuration file consists of sections and entries. Each section is defined inside a "", and each entry is delimited by an "=" sign. The value of each entry can be either string or an integer, double, alphanumerical or just an empty string. Comments start with "#" sign.
The following is a sample of the config file:
## This is a sample config file
Entry2=THIS IS A TEST # This is entry 2
Entry1=rev 0 # This is entry 1
Entry2=TM 2001-12-44 23:20 Ttl 5
1. Are there any libraries available that implement the processing of a config file such as the above, preferably licensed by some open source like LGPL, Apache or BSD.? If yes, what is it or where I can find it?
2. If this is to be a custom implementation, how to develop this is C (and not C++) where the config file is parsed, entries are stored in some structure, then the values are assigned to variables or defaule values.