Re: [rfc] keytables - the new keycode->keysym mapping

From: Andries Brouwer
Date: Wed Feb 16 2005 - 16:51:56 EST


On Wed, Feb 16, 2005 at 07:20:35PM +0100, Jirka Bohac wrote:

> Now ... are there any more suggestions for any of the patches?

For the time being I look only at the diacr for unicode part.
The fragment below looks like a strange kludge.

> - if (diacr)
> - value = handle_diacr(vc, value);
> + if (diacr) {
> + v = handle_diacr(vc, value);
> +
> + if (kbd->kbdmode == VC_UNICODE) {
> + to_utf8(vc, v & 0xFFFF);
> + return;
> + }
> +
> + /*
> + * this makes at least latin-1 compose chars work
> + * even when using unicode keymap in non-unicode mode
> + */
> + value = v & 0xFF;
> + }
>
> if (dead_key_next) {
> dead_key_next = 0;
> @@ -637,7 +652,7 @@
> {
> if (up_flag)
> return;
> - diacr = (diacr ? handle_diacr(vc, value) : value);
> + diacr = (diacr ? handle_diacr(vc, value) & 0xff : value);

I see twice "& 0xff" but why?
I think this is broken.

Maybe the above "return" is broken as well. The original code
was good, so the only change should be to transport more than 8 bits.

Andries
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/