[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] TOSWIN2 and cursor keys (solved?)



Hello,

I think I've found the bug...

it's the last commit to textwin.c in toswin2:

http://sparemint.atariforge.net/cgi-bin/cvsweb/freemint/tools/toswin2/textwin.c.diff?r1=1.33&r2=1.34

The additional check before entering the function key/cursor input translation is nonsense:

That's what we had before:
if (t->vt_mode == MODE_VT100 && code >= 0x3b00 && code <= 0x5000)

It became:
if (t->vt_mode == MODE_VT100 && code >= 0x3b00 && code <= 0x5000 && ((code&0xFF00)<=0x20))

This will never evaluate to true... AFAIK.

How can this: (code&0xFF00)<=0x20) evaluate to true at any time?
There must be at least an shift:
((code&0xFF00)>>8)<=0x20)

However, I don't know the reason for this addition.

Greets,
Ole