Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!news.musoftware.de!wum.musoftware.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Rainer Weikusat Newsgroups: comp.os.linux.development.apps Subject: Re: file parsing Date: Tue, 13 Dec 2011 22:56:22 +0000 Lines: 20 Message-ID: <87r508ulm1.fsf@sapphire.mobileactivedefense.com> References: <8762hkyu5j.fsf@araminta.anjou.terraraq.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: individual.net t4X+ykZrwZwTxHO0KZxLRgvxQ2DTG+UEPuwfl3zEsEJ2DhLAU= Cancel-Lock: sha1:BpN6cRuH1rCg1uaW8nS+v4Dttvk= sha1:4HiZ21/HfPydXUE2JphsdmadNaA= User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) Xref: x330-a1.tempe.blueboxinc.net comp.os.linux.development.apps:314 Bill M writes: > On 12/13/2011 4:38 PM, Richard Kettlewell wrote: [...] >> XML is a poor choice for config files, [...] > I found this for parsing ini config files: > > http://code.google.com/p/inih/ > > Looks like exactly what I'm looking for. If your requirements are simple enough, consider not parsing a config file: Anything which can be expressed as otherwise unstructured list of name=value pairs can be put into a file the shell can source and then start another program with a set of command-line arguments derived from the parameters.