Date: Mon, 29 May 2000 21:58:17 +0900 From: "Daniel C. Sobral" <dcs@newsguy.com> To: Wes Peters <wes@softweyr.com> Cc: Boris Popov <bp@butya.kz>, A G F Keahan <ak@freenet.co.uk>, freebsd-hackers@FreeBSD.ORG Subject: Re: Generic config file parser? Message-ID: <39326969.D00C057F@newsguy.com> References: <Pine.BSF.4.10.10005291001250.22349-100000@lion.butya.kz> <39321407.40926B57@softweyr.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Wes Peters wrote: > > > I'm really want to make this thing generic and unite it with > > others config file parsers (if memory serves me right, Daniel Sobral wrote > > RW version for rc.conf style files). > > Not needed, there is such a parser library included in OpenSSL, which > is included in FreeBSD by default as of 4.0. The documenation is > non-existent, but I suspect it will show up sooner than yet another > development effort would produce. Well, it _doesn't_ handle loader/rc.conf format, hosts format, inetd.conf format, pccard.conf format, etc, which is what bp is talking about. And, remember, _his_ library is already in the system too. But, alas, the format thing isn't even the beginning. That stuff doesn't do HALF the stuff my own libconf does. It doesn't handle nested sections, it doesn't handle multiple input files (which is pretty much the way we decided to do things), it does _update_ the files, it doesn't handle descriptions, it doesn't handle set/unset with comments, it doesn't handle unset (commented-out) options for reference purposes, doesn't handle multiple instances of a setting... and, then, it's access methods are pitiable. You can't enumerate settings in a section, enumerate sections, etc. Now, my library, which does all of the above, was shot down by msmith because *IT* doesn't handle a lot of stuff that ought to be handled. > A better choice might be found in XML. Exploring the port of libxml > (in ports/textproc) might be enlightening. As long as we don't have to change the format the options are in. :-) It can get difficult once you are receiving input by NIS or NDAP, or the file formats are beyond your control. :-) -- Daniel C. Sobral (8-DCS) dcs@newsguy.com dcs@freebsd.org capo@another.bsdconspiracy.org "Sentience hurts." 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?39326969.D00C057F>