From owner-freebsd-hackers Sun May 28 16:52:26 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from nts.mapisrael.com (nts.mapa.co.il [192.116.157.1]) by hub.freebsd.org (Postfix) with ESMTP id BBC2337B625 for ; Sun, 28 May 2000 16:52:21 -0700 (PDT) (envelope-from ak@freenet.co.uk) Received: from freenet.co.uk (ALEX [192.116.157.120]) by nts.mapisrael.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2650.21) id LRLMW5V7; Mon, 29 May 2000 02:52:05 +0200 Message-ID: <3931BF15.3D2870EF@freenet.co.uk> Date: Mon, 29 May 2000 02:51:33 +0200 From: A G F Keahan X-Mailer: Mozilla 4.72 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Cc: Doug Barton Subject: Re: Generic config file parser? References: <3931B325.BB166270@freenet.co.uk> <3931AAF9.BE1846A@gorean.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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