Re: [PATCH] console UTF-8 fixes

From: Alan Cox
Date: Thu Apr 12 2007 - 09:10:43 EST


> So please accept these hard-coded tables in the first round. Maybe one day
> somebody will come up with a better solution. This one should be okay until
> then. (I can also send the script I've written so he can improve it.)

You can pack them a little differently and they'll shrink a lot.

Firstly store
start, size

Secondly pack the offset as 16 bit with the top 4 bits

0-3 value
4 - F
5 - 1D
6 - E0

And the size as an 8 bit range. You need to open code the rule for
20000/30000 but that is tiny anyway.

Unpack is trivial

start = (toptab[*entry>>4]|(*entry&0x0F)) << 8 | entry[1];
end = start + entry[2];

-
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/