Re: [AD] keyconf without pckeys

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


> It appears the utility declares various pointers if not using pckeys; the
> problem is pckeys itself makes them point to valid tables, while in
> keyconf when it redeclares them they point to random location. This causes
> troubles later in main() when memcpy() is used on those pointers...

Yes. I think these fake pointers were only added to let keyconf.c link on 
platforms that don't use pckeys.c. This was probably deemed sufficient 
because you need to use pckeys.c, or provide a replacement for it which 
defines valid tables, to benefit from keyboard.dat/keyconf.

Do you plan to do so for the MacOS X port? If no, I don't really see the 
point for adding these fake tables. I think it would be better to #if/#endif 
the whole code and add a sorry message (see tools/dat2s.c for example).

> The patch fixes the issue, but I wanted to know if there are other ports
> affected by the problem (are there other ports not using pckeys?).

The Linux console port doesn't use pckeys.c but, since it is almost always 
built in conjunction with the X11 port which uses pckeys.c, the problem has 
been overlooked until now.

-- 
Eric Botcazou




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