Re: [AD] Figuring out the language from the environment variable LANG

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On Sat, Jan 25, 2003 at 12:45:01AM +0100, Eric Botcazou wrote:
> > Try this patch instead, should give another example to the word
> > pedantic.
> 
> Indeed! Fine with me.

Well there seems a problem with it, such use/detection of the LANG
environment variable completely overwrites any allegro.cfg used by
the user. Do we want this? What is the precedence of configuration
files? I would say environment -> global.cfg -> user.cfg -> local.cfg
-> switches (external to configuration files, but the application
could use them to override values), but at the moment LANG is set
and it's value written to local .cfg at exit, which seems very bad.

It doesn't seem to be solved in the proposed routines for a5, which
only deal with one 'tree' or level of configuration variables. The
above example would need a system where the environment would be
converted to a root tree, then global.cfg, user.cfg, local.cfg
would be read, inserted in order, all with a read only data except
for local.cfg, where the program would write data.

Retrieving values would go from local to environment reading keys
if available, and writting would be done only in local.cfg, only
if a variable was modified.

Otherwise this problems will persist in the future.




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/