On Friday 24 January 2003 17.27, Paul Davis wrote: [...] > >(btw, why jackd doesn't read /etc/jackrc or ~/.jackrc ?) > > because that means we have a config file, which means we need a > config file parser, which means we need to replicate a bunch of > code or link against another library. if jackd was a commonly > executed command for users, i could justify that. as it is, i > can't.
Seems like it would be useful for the "no jackd" case, though. (Or you'd have to force code changes upon applications anyway.) For Kobo Deluxe, I just hacked a simple integrated command line and config file parser. Inherit the parser class, add your argument variables and implement a function that registers the variables. Then tell it to read your config file and/or hand it argc + argv. You can have default values and check whether default values were overidden, and there's support for integers, floats, switches and strings. Unfortunately, it's in C++, though the actual code is mostly C style, and shouldn't be too hard to port. (The key registering won't look as sexy, but that's no major issue.) Licence is LGPL, like most of my engine/lib sort of stuff. I don't have it as a separate package, but that can be arranged if there's interest. //David Olofson - Programmer, Composer, Open Source Advocate .- The Return of Audiality! --------------------------------. | Free/Open Source Audio Engine for use in Games or Studio. | | RT and off-line synth. Scripting. Sample accurate timing. | `---------------------------> http://olofson.net/audiality -' --- http://olofson.net --- http://www.reologica.se ---