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

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


> Well there seems a problem with it, such use/detection of the LANG
> environment variable completely overwrites any allegro.cfg used by
> the user.

Oops!

> Do we want this?

No, we don't.

> 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.

I agree. Config files ought to have precedence over detection based on 
environment variables. And we must certainly not write the result of the 
latter in config files.

> 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.

Pure Allegro5 material anyway.

-- 
Eric Botcazou




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