Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 29 May 2000 02:51:33 +0200
From:      A G F Keahan <ak@freenet.co.uk>
To:        freebsd-hackers@freebsd.org
Cc:        Doug Barton <DougB@gorean.org>
Subject:   Re: Generic config file parser?
Message-ID:  <3931BF15.3D2870EF@freenet.co.uk>
References:  <3931B325.BB166270@freenet.co.uk> <3931AAF9.BE1846A@gorean.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Doug Barton wrote:
> 
> A G F Keahan wrote:
> >
> > This may be a silly question, but is there such a thing?    Almost every
> > program that I know uses configuration files, often in different,
> > incompatible formats.   I personally prefer Samba/Wine-style config
> > files which are split into "sections" like this:
> >
> > [SECTIONNAME1]
> > wibble1 = blah
> > wibble2 = 35
> > wibble3 = "a string that has more than one word"
> > ; this is a comment -- ignored
> > wibble4 = 4.567e9
> 
> > A trivial thing to write, and a very useful one -- surely it's been done
> > before, no?
> 
>         It's possible, though unlikely, since what you're describing is a
> windows style config format.


Which does not necessarily make it bad, of course, it's just nice to
separate things out.   Many UNIX applications use similar formats;  you
don't have to go very far to find an example -- look at e.g.
/etc/defaults/rc.conf, which has distinct sections separated by comments
like this one:

##############################################################
###  Important initial Boot-time options  ####################
##############################################################

I'll say it again -- I'm not specifically after a Windows-style config
file parser, just any similar type thing.

Alex


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3931BF15.3D2870EF>