Is there a C/C++ library available to parse a configuration file and get the value of different variables specified therein? I know about gnome-config. Maybe there is something similar for Qt. But I wanted to know if there was any other independent library.
http://freshmeat.net/projects/libcfgparse/
Amitay.
On Tue, 2004-01-27 at 18:04, Abhir Joshi wrote:
Is there a C/C++ library available to parse a configuration file and get the value of different variables specified therein? I know about gnome-config. Maybe there is something similar for Qt. But I wanted to know if there was any other independent library.
-- Abhir Joshi http://education.vsnl.com/abhir/
Amitay.
There are code generators for C, which will generate code for you. May be you want to look at them.
Here is one of them. -Krishna
krd@s3:~$ apt-cache show gengetopt Package: gengetopt Priority: optional Section: devel Installed-Size: 376 Maintainer: Luca Filipozzi lfilipoz@debian.org Architecture: i386 Version: 2.10-1 Depends: libc6 (>= 2.3.1-1), libgcc1 (>= 1:3.3-0pre9), libstdc++5 (>= 1:3.3-0pre9) Filename: pool/main/g/gengetopt/gengetopt_2.10-1_i386.deb Size: 109806 MD5sum: f9e879a9f2103390eb24d3f973ce160c Description: skeleton main.c generator gengetopt reads an interface description file, and writes a skeleton main.c file. gengetopt supports: long and short options, 11 types of parameters (including flag, int, double, string, and function call), and a usage message.
Package: gengetopt Status: install ok installed Priority: optional Section: devel Installed-Size: 392 Maintainer: Luca Filipozzi lfilipoz@debian.org Version: 2.9-1 Depends: libc6 (>= 2.3.1-1), libgcc1 (>= 1:3.3), libstdc++5 (>= 1:3.3) Description: skeleton main.c generator gengetopt reads an interface description file, and writes a skeleton main.c file. gengetopt supports: long and short options, 11 types of parameters (including flag, int, double, string, and function call), and a usage message.
Abhir Joshi wrote:
Is there a C/C++ library available to parse a configuration file and get the value of different variables specified therein? I know about gnome-config. Maybe there is something similar for Qt. But I wanted to know if there was any other independent library.
-- Abhir Joshi http://education.vsnl.com/abhir/
On Tue, Jan 27, 2004 at 06:19:10PM +0530, Krishna Dagli wrote:
There are code generators for C, which will generate code for you. May be you want to look at them.
err. I am not looking for programs that will generate C code from some description file. I am looking for a library which will give me the value of a variable existing in a plain text configuration file. The format of the configuration file will be <variable name> = <value>
And maybe there will be sections starting with [<section name>]. Something like wvdial.conf, .muttrc, etc.
Just a thought then why not to use xml and libxml2. -Krishna
On Tue, Jan 27, 2004 at 06:39:28PM +0530, Abhir Joshi wrote:
On Tue, Jan 27, 2004 at 06:19:10PM +0530, Krishna Dagli wrote:
There are code generators for C, which will generate code for you. May be you want to look at them.
err. I am not looking for programs that will generate C code from some description file. I am looking for a library which will give me the value of a variable existing in a plain text configuration file. The format of the configuration file will be <variable name> = <value>
And maybe there will be sections starting with [<section name>]. Something like wvdial.conf, .muttrc, etc.
-- Abhir Joshi http://education.vsnl.com/abhir/