Re: [AD] CPU info changes

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


On Friday 26 October 2001 10:47, Martijn Versteegh wrote:

> >Martijn's idea seems a bit hackish, hooking over another API for something
> >completely (IMO) unrelated. Now, if the rest of Allegro worked that way
> >(al_read_config("desktop width", w) for example) then it would make sense.
> >Then again, maybe for Allegro 5.0...
>
> It *is* a bit hackish ;-) but the code is already there, and the # sections
> were developed exactly for this sort of situation (actually they were added
> as a way for addon libs to pass version info in a standardised way, but it
> never got very popular). For a # section you don't need to write all sorts
> of hook functions: you just let check_cpu use set_config_string("#cpuinfo",
> "family", "i386") for example.
>
> I agree it is a bit different from the way the rest of allegro works, but
> it is exactly the extensible name-value pairs that were suggested.
> The advantage is that you don't need to fill in all fields for each cpu,
> since the config routines are very good at handling defaults.

i like this idea a lot. if you look at it from a purely objective point of 
view, it is more convenient to use than the string solution. in fact more of 
allegro should use the config system to store key-data pairs. re-use of code 
is always a good thing. BTW, i don't think using the config system is *that* 
unrelated, after all it exists for the purpose of storing and retreiving 
information easily.

-- 
Sincerely Henrik Stokseth.
-----------------------------------------------------------------------
"Our hardware runs better without Windows" - BMW advertisement.
E-mail: hstokset@xxxxxxxxxx  Homepage: http://hstokset.n3.net



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