Re: [AD] Allegro 5 new config routines, alpha 1

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


> I've coded a first version of the new config routines for Allegro 5,
> following Shawn's original suggestions on the topic.

What about using . (dot) as the sub-key delimiter instead of / (slash) ?
Gosh ! I'm being Mozilla-ized ;-)

> I've used a simple hash code based system to retrieve proper entries
> from the tables; each "directory" has a dedicated table (default size =
> 4096 entries).

Given that sizeof(struct CONFIG_ENTRY) == 32, each table weights 128kb !
Assuming the hash function works well, I think a good compromise between
memory footprint and look-up efficiency could be 128 entries, which gives 4
kb per table.

> If two names collide onto the same entry, a linked list of names is used
> onto the same entry, and the proper real entry is searched using normal
> strcmp(). Look in the code!

Is it Unicode-safe ? Even if we switch to UTF-8 internally, there are
specific things to be taken care of.

--
Eric Botcazou
ebotcazou@xxxxxxxxxx




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