[AD] Allegro 5 new config routines, alpha 2

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


Following the feedback I've received so far, I've coded another release
of the config system.
New things:

- Unique hash table for all entries.
- The table is a table of pointers to structs, saving much memory.
- The table starts with a capacity of 16 entries, and grows by doubling
it each time the number of entries set reaches the current max capacity
/ 2. So when you pass from 8 to 9 entries, the table is resized to a
capacity of 32, and all entries already set are relocated onto it.
- The hash function rotates by increments of 3 by default now, and it is
char-based, no typecasting involved.
- The al_get_* functions now require an additional paramenter for error
reporting. This is optional though and can be NULL.

I hope I'm not forgiving anything; have a look at the code, test it and
let me know!

--
Angelo Mottola
a.mottola@xxxxxxxxxx
http://www.ecplusplus.com

Attachment: config2.c
Description: Binary data



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