The next question is (when we're ready) does it make sense for every app to have a config file, or one for all apps?

(a) per-application .ini
Each application needs to parse a file - parsing times would be shorter with specific .ini files.
Would enable each application to have several [headings] - allowing flexibility without confusion or conflicts
Might make a common parser more complex.
JEmplode would need to be clever enough to hunt for application_name.ini and edit it.

(b) One .ini
Each application would have to parse the same file looking for smallish pieces of information. Doesn't scale well to many applications.
Common parser might be easier to write.
[headings] would have be unique - realistically speaking, that means one [heading] per application.
JEmplode only has to deal with one file.


The parsing is key here. Ideally we could have one config_parse.c file to handle config.ini files, and that could be built into each application. If the parser was smart, it would enable developers to do something along the lines of hijacks config.ini parsing:

static const config_option_t config_options[] {
/* option text, variable, default, min, max */
{ "my_option1", &my_option1, 2, 0, 4 },
{ "my_label", &my_label, (int)"Hello World", 0, sizeof(my_label)-1 },
{ "my_option2", &my_option2, 42, 0, 100 },
...
};

parse_config("myini.ini", "heading", &config_options);


and the parser over-rides anything valid that it finds. Whether we need to consider the AC/DC or home/work capability is another question for debate. (Actually, I'm not sure if home/work is made visible to userland in anyway at the moment.)

I find hijacks way of adding options rather easy to understand and work with - as a C newbie I was quickly able to work out how to add stuff. Having consistency (with HJ) in the way that the option code works will also aid end users - they already know how to make hijacks options AC/DC/home/work dependant.

I haven't really looked at how hijack deals with different headings in config.ini, or how much code complexity that might add.




Edited by genixia (21/10/2002 22:50)
_________________________
Mk2a 60GB Blue. Serial 030102962 sig.mp3: File Format not Valid.