[gtkada] configuration files

Jacob Sparre Andersen sparre at nbi.dk
Tue May 28 13:41:51 CEST 2002


Stephen Leake wrote:

> For the same reason, I would like to not use "dot files"
> on Unix. These are not "personal preferences", they are
> "application settings". They should be bound to the
> application, not the user.

"dot files" are certainly intended for storing personal
preferences!

If your objection is based on the Unix style of letting the
user having one configuration file for each program or group
of programs, then I would like to remind you that it is
generally easier to handle data in managable chunks rather
than in one huge file.

> Let's take the Windex Profiles API as a starting point:
> 
> http://users.erols.com/leakstan/Stephe/Ada/Windex_Packages/index.htm
> 
> file windex-profiles.ads

It looks reasonable execept for a few details:

 * I would like to have the option of reading the settings
   from a prioritised list of configuration files, and not
   just a single named file.

 * The above mentioned prioritised list of configuration
   files should be initialised according to the conventions
   of the operating system used.

 * It would be practical to include a function for reading
   the configuration file(s) into a suitable data structure,
   so the files only need to be read once during the
   execution of a program.

> It would be nice to have a standard file syntax, as well
> as a standard API, so I can bundle a default or example
> profile file with an app, and it would work for any OS.

Yes. Both the syntax used in "ini files" and the syntax
sketched for some Java configuration files seems reasonable
to me. Should we go for the "ini files"?

Jacob
-- 
"Skal restauratører nu til at forsikre sig imod evt.
 patentkrænkelser, hvis de har en kreativ kok ansat?"
 -- Erik Lange





More information about the gtkada mailing list