From: Caolan McNamara (cmc at domain stardivision.de)
Date: Mon 10 Jul 2000 - 10:14:51 IST
At 09:58 10.07.00 +0100, gormo at domain itc.nuigalway.ie wrote:
>Does anyone know of a nice lib for parsing files ie. for getting options
>from a .conf files?....I'm starting to run out of letters for command
>line options;)
http://www.snippets.org/#section1group3 for a simple one, I used this
for one project, changing the comment letter to # for unix standard
behavior. Its simple and effective and you dont spend all your life
managing the configuation file. There are all sorts of xml based
horrors, I used xml for the config file for wv and it works but I am not
convinced that it is a good way to go, especially for a xml based config
file to customize xml/html output which makes the syntax absolutely horrific
for a user to read. I fiddled with lex for another project and lex input
is horrifically unportable due to the immense number of broken crap lex's
out there, accusing finger at solaris,hpux and aix. I believe that the gnome
stuff has a standardized configuration interface which would be a good thing
for an app in that family. I did look at one or two other libraries whose names
escape me but whos utility was depressing.
Of course with getopt you can just make the uncommon options long options
only and drop single letter support for those ones. And even without this
you have all the numbers as well as upper and lower case for a total of 62
command line options! though there are pedants who look askance at ludicrous
amounts of options, personally I think it displays a certain manhood to have
a list manpage command line options which can cover a medium sized wall.
C.
This archive was generated by hypermail 2.1.6 : Thu 06 Feb 2003 - 13:06:49 GMT