Re: [AD] CPU info changes

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


On October 26, 2001 03:51 am, you wrote:
> 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.

Lets hope it doesn't go too far :) Or else we might have to rewrite
allegro in perl just to get any speed out of the 'key-data' pairs. ;)

-- 
Thomas Fjellstrom
tfjellstrom@xxxxxxxxxx
http://strangesoft.net



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