Re: [AD] config routines bug |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
Eric Botcazou wrote:
> I think I've found a serious bug in the config routines: according to the
> docs "the section name may be set to NULL to accept variables from any part
> of the file".
>
> It turns out that the current behaviour seems to be rather "if the section
> name is set to NULL, only variables outside all sections (i.e at the top of
> the file) will be accepted".
>
> This is a little dangerous: try to put a little [a] at the beginning of
> allegro.cfg and you will see all your settings (except sound) cancelled.
How would you suggest fixing this though? I can imagine it's not
desirable to search for a setting through all sections, no matter what
the section header is. What if two sections contain an identical
keyword?
I think if you want a setting specific for a certain section [sound]
you need to always specify the section. That leaves global settings as
a problem. I see only 2 options to make sure a setting is 'global':
- leave it at the very top of the file
- introduce some sort of [end section] command, to indicate a section
is finished and the following entries are global settings until a
new section begins.
Hein Zelle
>-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-<
Hein Zelle hein@xxxxxxxxxx
http://www.icce.rug.nl/~hein
>-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-<