Re: [AD] New mode selector, or get_gfx_mode_list(), broken [djgpp, possibly others]

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


On 19 Sep 2001, Laurence Withers <lwithers@xxxxxxxxxx> wrote:
> In reply to Peter Wang <tjaden@xxxxxxxxxx>:
> >I also think an array is the right choice here, rather than a linked
> >list, but I'm not sure why.
> 
> But what if I want to join or delete lists, etc. This would be useful in
> the mode selector. This is fiddly, annoying and bug-ridden with arrays,
> and simple and easy with linked lists.

Wouldn't you still have a bunch of allocations and pointer voodoo to
do?  How would you free your list?  It be ugly to use `malloc' to
create your own list elements, then use `destroy_gfx_mode_list' (and
might actually be wrong, in some circumstances).  And sorting a
linked list is relatively hard.



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